去掉RAR右鍵解壓菜單的VBS代碼
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
相關(guān)文章
VBS實(shí)現(xiàn)GB2312,UTF-8,Unicode,BIG5編碼轉(zhuǎn)換工具
VBS寫的GB2312,UTF-8,Unicode,BIG5編碼轉(zhuǎn)換工具,轉(zhuǎn)換工具下載:GB2Ue.vbs (3.34 kb)2010-06-06
用VBS實(shí)現(xiàn)一個(gè)小鍵盤動(dòng)作CTRL+V粘貼操作與思路分析
我想實(shí)現(xiàn)當(dāng)有跳出窗口"請(qǐng)輸入"時(shí)的1.8秒后就發(fā)送一次 CTRL + V,把本來已經(jīng)復(fù)制到剪切版中的文字自動(dòng)粘貼過去呢2009-12-12
使用 Iisftpdr.vbs 刪除FTP虛擬目錄(支持本地與遠(yuǎn)程)
這篇文章主要介紹了如何通過 iisftpdr.vbs 刪除本地或遠(yuǎn)程計(jì)算機(jī)上的 FTP 虛擬目錄的方法,需要的朋友可以參考下2014-07-07
vbscript 調(diào)用WebService實(shí)現(xiàn)代碼
vbscript 調(diào)用WebService實(shí)現(xiàn)代碼,需要的朋友可以參考下。2009-11-11

