无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 3303|回复: 3
打印 上一主题 下一主题

【求助】【exe转vbs,高手请进】如何将EXE转换成Base64编码的VBS

[复制链接]
跳转到指定楼层
1#
发表于 2013-4-8 17:46:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 ljj515 于 2013-4-9 10:53 编辑

问题:   见如下代码,原本是一个气泡托盘程序是通过工具转换成以下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/Phc4PsASXXBKahR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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 代码结束 ------------------------------
复制代码
2#
发表于 2013-4-9 16:51:00 | 只看该作者
编译的时候很多信息已经丢失了,通常反向为汇编,很少能成功反向为高级语言。
回复

使用道具 举报

3#
 楼主| 发表于 2013-4-9 22:43:18 | 只看该作者
本帖最后由 ljj515 于 2013-4-9 22:50 编辑

楼上的同志弄错了,你有没有any2bat.vbs,测试一下就知道了。
不过any2bat.vbs转换的缺点太多了:
1.原exe不能太大,太大你的机器伤不起。(500K勉强还行)
2.转换后占用空间极大,转换后bat体积=2*原exe体积,甚至更加大。
3.需要生产较多临时文件,较耗内存CPU资源等等.....
回复

使用道具 举报

4#
 楼主| 发表于 2013-4-19 12:52:58 | 只看该作者
俺等了好久啊,看来高手都去修炼去了,高手出来帮忙解决问题啊!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-28 05:06

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表