标题: [问题求助] 如何将EXE转换成Base64编码的VBS? [打印本页]
作者: jim515 时间: 2013-4-12 21:19 标题: 如何将EXE转换成Base64编码的VBS?
问题: 见如下代码,原本是一个气泡托盘程序是通过工具转换成以下VBS代码的,
请问各位高手,用什么工具可以转换成像以下Base64编码的VBS代码?- 'VBS 代码內容如下:
- '-------------------- test.vbs 代码开始 ------------------------------
- bs=_
- "NpFAAAAAAAAAAAAAQVEAAwUACAwUMhVIAAAAAAAAAAA4A8QALEAAAAAAAAAAMAAAAAAAAQVAAAAAQAAAMAAAAAAAABAAQAAAAIAAAQAAAAAAAAAAEAAAAAAAAAAAABAAAIAAAAAAAAgAAAAAAAAEAAAEAAAAAABAAABAAAAAAAAE"+_
- "AAAAAAAAAAAAAAAN1AAAECAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+_
- "AAAAAAAAAAAAAAAIAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAwAAAAAAAAAAAAQAAAAADAAUbBAAAACAAAAAAAAAAAAAAAAAAAgDAAAfYJ4VDQAEGlVRqtA+/Ezl/MJ//EzZxMA//Ez9htAGEsQ8/ESA8c6XnOquO4/PFC"+_
- "CY/gZHQdO8/UEsOJsGN601yEJvOGRiUwgjAr/PFB7ME+zpAg8XwcGMI+/dnABFUlLWstAY1i3vC8zTqXr/pXteZrQ9/UQU5iHAEezX3A/PGDQV1/TRxqr7+MJH0/TMRy/Phc4PsASXXBKahRSI9wLVkUOVETzIjLkxGbAAQM4kBQ"+_
- "y0TCJRyWIlWkdAz/C83ia4ME3RJDMObKFjcCnG55isvZPkTHJQUK7k4TS0lJXmTZJmQ1ygUvk06ZwPFalxm4zshMuQGDHeLdRAnOvc8upFvYhBNZ1x+Y/8WbwMHHslHedw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Mc3PkoaUq8mUMBbQfnERBIZ39TQThjycWTAFDQgfUFiX"+_
- "Qk1URals7sYUlQ+A+dwLz0+6rUeNhcKasKUBoa5q8Z9V8FxQWej1olHI+TRVRheMOyfi1wzs3gCCbsMLTJAJEbttgKYN9gzLCeGNsUOLtB18q5dQoUtsGVFNQiSdkvqqkHsldt1kCiWIsoWAhIk3kAVoDdXDVg+xrSlWMo4T/+Lc"+_
- "vGw1Kz/k6VI8IalacyuJmZEoRQEZMrIMBgMGluTZZ8S1oeUAlRXTvRWdsxNShdnbKzQQU4TgzRncjBXedxwnu4WKsc4Qv1GHTxEdph/VHXSR4BJdQJ3b9NWcz9KIwa2SFJ1cOdfaLs5AZ/WYpnEl+cmZPCV2220ozBxHJh9VsR2b"+_
- "WdHHfEVdrDyMlQE1ZIdedNClgYGDQ+HRARk/z9BchRHFoRV4UJ3RNaObs0vSJVk8Oc3M3pmcUAJdmxQPDRTZXRyVQotE/IlNnxqJ2I3QISG0nYMoDVnc//dnN8gRdlgMKyRVTFfIuvMRIEwXO9GdpZWepFbRi50H9Q1gBJ3Z2dFJ"+_
- "RhEJpUCzc1mOltkYWUkdDVX5yAxUIK7DgdVSO104ZFmDBob7ACAj1AAAAAAAAAAAAAg8BAAAMWDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAMABASYAEAAAAAAwXNABAgAAAAA0HAAwVNABA6BAEAcHAQA4dAABAMWAEAWWDA"+_
- "AQaNAAAAAAAAM9WYkxUaiJXYylXQAAwRlRHUy92YBRGZyV2czBA="+_
- "":set rs=CreateObject("ADODB.Recordset")
- set ado=CreateObject("ADODB.Stream")
- set ws=wscript.createobject("wscript.shell")
- l=len(bs):ss="":for k=1 to l step 4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)
- rs.fields.append "b",205,l/2:rs.open:rs.addnew:rs("b")=ss+chrb(0):rs.update
- ado.mode=3:ado.type=1:ado.open:ado.write rs("b").getchunk(l/2)
- ado.savetofile "test.exe",2:ado.close
- function ub64(s):dim t(4),b(3):ub64="":n=len(s):r=2
- if n mod 4<>0 then exit function:end if:for i=1 to n step 4:for j=0 to 3
- a=asc(mid(s,i+j,1)):if a=43 then:a=62:else if a=47 then:a=63:else if a>47 and a<58 then:_
- a=a+4:else if a=61 then:a=0:if r=2 then r=j-2:end if:else if a>64 and a<91 then:_
- a=a-65:else if a>96 and a<123 then:a=a-71:else:exit function:_
- end if:end if:end if:end if:end if:end if:t(j)=a:next
- b(0)=t(0)+t(1)*64 mod 256:b(1)=t(1)\4+t(2)*16 mod 256:b(2)=t(2)\16+t(3)*4
- for j=0 to r:if b(j)<16 then ub64=ub64+"0":end if:ub64=ub64+hex(b(j))
- next:next:end function
- '-------------------- test.vbs 代码结束 ------------------------------
复制代码
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |