[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[问题求助] 如何将EXE转换成Base64编码的VBS?

问题:   见如下代码,原本是一个气泡托盘程序是通过工具转换成以下VBS代码的,
     请问各位高手,用什么工具可以转换成像以下Base64编码的VBS代码?
  1. 'VBS 代码內容如下:
  2. '-------------------- test.vbs 代码开始 ------------------------------
  3. bs=_
  4. "NpFAAAAAAAAAAAAAQVEAAwUACAwUMhVIAAAAAAAAAAA4A8QALEAAAAAAAAAAMAAAAAAAAQVAAAAAQAAAMAAAAAAAABAAQAAAAIAAAQAAAAAAAAAAEAAAAAAAAAAAABAAAIAAAAAAAAgAAAAAAAAEAAAEAAAAAABAAABAAAAAAAAE"+_
  5. "AAAAAAAAAAAAAAAN1AAAECAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+_
  6. "AAAAAAAAAAAAAAAIAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAwAAAAAAAAAAAAQAAAAADAAUbBAAAACAAAAAAAAAAAAAAAAAAAgDAAAfYJ4VDQAEGlVRqtA+/Ezl/MJ//EzZxMA//Ez9htAGEsQ8/ESA8c6XnOquO4/PFC"+_
  7. "CY/gZHQdO8/UEsOJsGN601yEJvOGRiUwgjAr/PFB7ME+zpAg8XwcGMI+/dnABFUlLWstAY1i3vC8zTqXr/pXteZrQ9/UQU5iHAEezX3A/PGDQV1/TRxqr7+MJH0/TMRy/Phc4PsASXXBKahRSI9wLVkUOVETzIjLkxGbAAQM4kBQ"+_
  8. "y0TCJRyWIlWkdA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. "YjWKPBYBR9swcOLZTxFRBBF6Pw/6cTtYFafF0sALIkbxcEjw5wmho8gjq2H+W9HBw0DQrIFagLqQEBKJ/fdXayhdABK+C8DidwWJYlKhUYECQZChEgBbDA4QYQY/I4EWMc3PkoaUq8mUMBbQfnERBIZ39TQThjycWTAFDQgfUFiX"+_
  15. "Qk1URals7sYUlQ+A+dwLz0+6rUeNhcKasKUBoa5q8Z9V8FxQWej1olHI+TRVRheMOyfi1wzs3gCCbsMLTJAJEbttgKYN9gzLCeGNsUOLtB18q5dQoUtsGVFNQiSdkvqqkHsldt1kCiWIsoWAhIk3kAVoDdXDVg+xrSlWMo4T/+Lc"+_
  16. "vGw1Kz/k6VI8IalacyuJmZEoRQEZMrIMBgMGluTZZ8S1oeUAlRXTvRWdsxNShdnbKzQQU4TgzRncjBXedxwnu4WKsc4Qv1GHTxEdph/VHXSR4BJdQJ3b9NWcz9KIwa2SFJ1cOdfaLs5AZ/WYpnEl+cmZPCV2220ozBxHJh9VsR2b"+_
  17. "WdHHfEVdrDyMlQE1ZIdedNClgYGDQ+HRARk/z9BchRHFoRV4UJ3RNaObs0vSJVk8Oc3M3pmcUAJdmxQPDRTZXRyVQotE/IlNnxqJ2I3QISG0nYMoDVnc//dnN8gRdlgMKyRVTFfIuvMRIEwXO9GdpZWepFbRi50H9Q1gBJ3Z2dFJ"+_
  18. "RhEJpUCzc1mOltkYWUkdDVX5yAxUIK7DgdVSO104ZFmDBob7ACAj1AAAAAAAAAAAAAg8BAAAMWDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAMABASYAEAAAAAAwXNABAgAAAAA0HAAwVNABA6BAEAcHAQA4dAABAMWAEAWWDA"+_
  19. "AQaNAAAAAAAAM9WYkxUaiJXYylXQAAwRlRHUy92YBRGZyV2czBA="+_
  20. "":set rs=CreateObject("ADODB.Recordset")
  21. set ado=CreateObject("ADODB.Stream")
  22. set ws=wscript.createobject("wscript.shell")
  23. l=len(bs):ss="":for k=1 to l step 4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)
  24. rs.fields.append "b",205,l/2:rs.open:rs.addnew:rs("b")=ss+chrb(0):rs.update
  25. ado.mode=3:ado.type=1:ado.open:ado.write rs("b").getchunk(l/2)
  26. ado.savetofile "test.exe",2:ado.close
  27. function ub64(s):dim t(4),b(3):ub64="":n=len(s):r=2
  28. if n mod 4<>0 then exit function:end if:for i=1 to n step 4:for j=0 to 3
  29. 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:_
  30. 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:_
  31. a=a-65:else if a>96 and a<123 then:a=a-71:else:exit function:_
  32. end if:end if:end if:end if:end if:end if:t(j)=a:next
  33. 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
  34. for j=0 to r:if b(j)<16 then ub64=ub64+"0":end if:ub64=ub64+hex(b(j))
  35. next:next:end function
  36. '-------------------- test.vbs 代码结束 ------------------------------
复制代码

返回列表