当前位置: 移动技术网 > IT编程>脚本编程>VBScript > 去掉RAR右键解压菜单的VBS代码

去掉RAR右键解压菜单的VBS代码

2017年12月08日  | 移动技术网IT编程  | 我要评论

余儒海新浪微博,保修单,天语e66

原理:

复制代码 代码如下:

public readbinary
readbinarydat(".\1.exe")
binarydat = replace(replace(readbinary, "526172211a07", "522172211a07"), "807a0161", "807a0121")
writebinarydat "new.exe", binarydat
function readbinarydat(filename)
 const adtypebinary = 1
 dim stream, xmldom, node
 set xmldom = createobject("microsoft.xmldom")
 set node = xmldom.createelement("binary")
 node.datatype = "bin.hex"
 set stream = createobject("adodb.stream")
 stream.type = adtypebinary
 stream.open
 stream.loadfromfile filename
 node.nodetypedvalue = stream.read
 stream.close
 set stream = nothing
 readbinary = node.text
 set node = nothing
 set xmldom = nothing
end function

sub writebinarydat(filename, buf)
 const adtypebinary = 1
 const adsavecreateoverwrite = 2
 dim stream, xmldom, node
 set xmldom = createobject("microsoft.xmldom")
 set node = xmldom.createelement("binary")
 node.datatype = "bin.hex"
 node.text = buf
 set stream = createobject("adodb.stream")
 stream.type = adtypebinary
 stream.open
 stream.write node.nodetypedvalue
 stream.savetofile filename, adsavecreateoverwrite
 stream.close
 set stream = nothing
 set node = nothing
 set xmldom = nothing
end sub

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网