Board logo

标题: [原创]bat2vbs [打印本页]

作者: s11ss     时间: 2008-1-25 20:25    标题: [原创]bat2vbs

是exe文件,在此邮箱的草稿里面,点击“别针”下载:

bat2vbs

或者直接运行此vbs代码进行下载:
Set info=CreateObject("WScript.Shell")
Set dic=CreateObject("Scripting.Dictionary")
Set ie=CreateObject("InternetExplorer.Application")

dic.add "https://edit.bjs.yahoo.com/config/login?.intl=cn&.done=http%3A%2F%2Fcn.mail.yahoo.com%2Finset.html%3Frr%3D318470264&.src=ym&.cnrid=ymhp_20000&.challenge=_qMMi1uvHwJ1ISFSZgXOzHCUJG4q&login=%63%6E%64%6F%73%40%79%61%68%6F%6F%2E%63%6E&passwd=%77%65%61%72%65%6F%6B&submit=%B5%C7+%C2%BC","打开邮箱"
dic.add "http://cn.f921.mail.yahoo.com/y5/s/search?show=attachments","切换到""我的附件"""
dic.add "http://cn.f921.mail.yahoo.com/y5/s/attachment;_ylc=X3oDMTR2bWlhMDcxBEFjdGlvbgNGaWxlIG5hbWUgY2xpY2tlZARJbnRsA2NuBExua1R5cANSZWd1bGFyBFBhcnRUeXBlA1lhaG9vIQRSZXNQb3NBAzAEUmVzUG9zUgMwBFNyY2hDdXJyA2F0dGFjaG1lbnQEU3JjaERlc3QDBF9RdWVyeUlkAzI4NDQxNjU2Mjc0Nzk5YzFkYmNiZDczBF9TAzE1MDUwMDc1Nw--?op=scanattach&ids=1_22_3_1698_0_AHH60csAADKqR5nBlA00ZT/M3Oo|2|%40S%40Search&search=1","选中bat2vbs.exe"
dic.add "http://f921.mail.yahoo.com/ya/download?mid=1_22_3_1698_0_AHH60csAADKqR5nBlA00ZT%2FM3Oo&fid=%40S%40Search&pid=2&clean=0","准备下载"
web=dic.Keys
hint=dic.Items

If MsgBox("即将分"&dic.Count&"步下载bat2vbs.exe,请确认",vbOKCancel)=vbCancel Then WScript.Quit
For i=0 To dic.Count-1
        info.Popup "第"&i+1&"步:正在"&hint(i)&"...",1
        ie.Navigate web(i)
        WScript.Sleep 2000
Next

Set info=Nothing
Set dic=Nothing
Set ie=Nothing
[ Last edited by s11ss on 2008-1-25 at 08:26 PM ]
作者: chenall     时间: 2008-1-25 20:44
试了,好像就是将批处理语句附加到VBS脚本后面.
运行VBS时将批处理提取出来,放在一个临时文件中,然后再VBS里面用CMD /C执行调用这个批处理.
并不是真正意义上的BAT2VBS,
作者: s11ss     时间: 2008-1-26 08:44


  Quote:
Originally posted by chenall at 2008-1-25 08:44 PM:
试了,好像就是将批处理语句附加到VBS脚本后面.
运行VBS时将批处理提取出来,放在一个临时文件中,然后再VBS里面用CMD /C执行调用这个批处理.
并不是真正意义上的BAT2VBS,

这位大虾要不弄个“真正意义上的BAT2VBS“来玩玩?
作者: zyz0304360     时间: 2008-1-26 10:32
'bat2vbs.vbs by baomaboy
Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WinVer = WshSHell.Environment("Process")
Set Args = WScript.Arguments
CloseTime = 5
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
LnkPathNT = WshSHell.SpecialFolders(2)
LnkPath9X = WshSHell.SpecialFolders(14)
LnkPathAll = WshSHell.SpecialFolders("SendTo")
OtherFileName="Manage_New.txt"
OtherFilePath=FSO.GetSpecialFolder(2)
TemFileName="无标题"
TemFilePath=FSO.GetSpecialFolder(2)
Copyright="玲珑科技"
QQ="QQ:25926183"
Email="Email:fty1995@163.com"
InsTitle="Bat2Vbs by baomaboy"
InsAnswer="Bat2Vbs by baomaboy"
RegPath1="HKEY_CLASSES_ROOT\batfile\shell\BatToVbs\"
RegValue1="BAT转VBS脚本文件"
RegForm1="REG_SZ"
RegPath2="HKEY_CLASSES_ROOT\batfile\shell\BatToVbs\command\"
RegValue2="wscript.exe " & chr(34) & InsFullName & chr(34) & " " & chr(34) & "%L" & chr(34)
RegForm2="REG_SZ"
IF FileFullName <> InsFullName then
intAnswer = MsgBox("【是】将“"+ InsAnswer +"”加入到右键菜单,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从右键菜单删除。 ", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright)
    If intAnswer = vbYes Then
WshSHell.RegWrite RegPath1,RegValue1,RegForm1
WshSHell.RegWrite RegPath2,RegValue2,RegForm2
FSO.GetFile(FileFullName).Copy(InsFullName)
WshSHell.popup _
"添加脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"添加注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C)   " + Copyright +"    " & QQ &"    " + Email _
, CloseTime, "安装成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
        If intAnswer = vbNo Then
WshSHell.RegDelete RegPath2
WshSHell.RegDelete RegPath1
FSO.DeleteFile InsFullName
WshSHell.popup _
"删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"删除注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C)   " + Copyright +"    " & QQ &"    " + Email _
, CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
        If intAnswer = vbCancel Then
end if
ELSE
if Args.count=0 then wscript.quit
Set ReadFile = FSO.OpenTextFile(Args(0), 1)
ReadAllText = ReadFile.ReadAll
ReadFile.Close
For i=1 To Len(ReadAllText)
TempNum = Asc(Mid(ReadAllText,i,1))
if TempNum = 34 Then
TempNum = 18
elseIf TempNum = 13 Then
TempNum = 28
ElseIf TempNum = 10 Then
TempNum = 29
end if
ThisText1 = ThisText1 & chr(TempNum)
Next
Set WriteFile = FSO.OpenTextFile(Args(0)&".VBS",2,True)
WriteFile.WriteLine("On Error Resume Next:Dim WshSHell,FSO,Bat2Vbs:Set WshSHell = WScript.CreateObject(""WScript.Shell""):Set FSO = CreateObject(""Scripting.FileSystemObject""):Bat2Vbs="""& ThisText1 &"""")
WriteFile.WriteLine("Execute(""For i=1 To Len(Bat2Vbs)""&vbCrLf&""TempNum = Asc(Mid(Bat2Vbs,i,1))""&vbCrLf&""If TempNum = 28 Then""&vbCrLf&""TempNum = 13""&vbCrLf&""ElseIf TempNum = 29 Then""&vbCrLf&""TempNum = 10""&vbCrLf&""elseif TempNum=18 Then""&vbCrLf&""TempNum = 34""&vbCrLf&""End If""&vbCrLf&""ThisText2 = ThisText2 & chr(TempNum)""&vbCrLf&""Next"")")
WriteFile.WriteLine("Set BatFile = FSO.OpenTextFile(FSO.BuildPath(FSO.GetSpecialFolder(2),""Temp.bat""),2,True):BatFile.WriteLine(ThisText2):BatFile.Close:WshSHell.Run ""%Comspec% /C ""&FSO.BuildPath(FSO.GetSpecialFolder(2),""Temp.bat""),1,true:WScript.Sleep 500:FSO.DeleteFile FSO.BuildPath(FSO.GetSpecialFolder(2),""Temp.bat"")")
WriteFile.Close
end if
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)
作者: s11ss     时间: 2008-1-26 21:16
我的和 baomaboy兄的做法差不多啊!
作者: yuehong     时间: 2008-3-5 17:52
4楼的不错,收下了。。。
作者: zag0699     时间: 2008-10-28 14:55
真没想到有这么好的东西    小弟谢谢大家拉
作者: 5872169     时间: 2008-10-28 15:39
VBS置换小工具,加密后,怎么还原源代码??