Skip to content

Instantly share code, notes, and snippets.

View radiohead-sucks's full-sized avatar

radioheadsucks radiohead-sucks

View GitHub Profile
@vt-idiot
vt-idiot / catbox.ps1
Created February 14, 2023 00:45
Catbox Script for s0hv/foo_discord_rich
<#usage: use the following line as your command in the foobar2000 plugin
pwsh.exe C:\Path\To\catbox.ps1
note: doesn't work right on PowerShell 5 "powershell.exe", you need PowerShell 7#>
$upload = Resolve-Path -LiteralPath $input | Select-Object -ExpandProperty Path
$uri = "https://catbox.moe/user/api.php"
$body = @{
"reqtype"="fileupload"
"fileToUpload"=Get-Item $upload
}
Invoke-WebRequest -Uri $uri -Method POST -Form $body | Select-Object -ExpandProperty Content