鼠标右键增加快捷项目~~ xxxxxxxxx.reg
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\bbbbbbbbbbbbb] @="----------二进制----------" [HKEY_CLASSES_ROOT\*\shell\bbbbbbbbbbbbb\command] @="cscript c:\\bbs\\test.vbs \"%1\""
vbs文件
'----------------接收参数----------------------- Set oArgs = WScript.Arguments filepath = oArgs(0) '-------------- Set stream = CreateObject("ADODB.Stream") stream.Type = 1 'binary stream.Open stream.LoadFromFile filepath '载入文件
'-------------写到另一个stream里--------------- Set stream2 = CreateObject("ADODB.Stream") stream2.Type = 2 'text stream2.charset="iso-8859-1" stream2.Open mmax = stream.size for i= 1 to mmax hh = hex(ascb(stream.read(1))) if len(hh)=1 then hh = "0" & hh end if stream2.writeText hh 'stream2.writeText " " next stream2.SaveToFile filepath & "_hex.txt",2 '覆盖 stream2.Close Set stream2 = Nothing '--------------------------------------- stream.Close Set stream = Nothing
可能因为是脚本执行,速度有点慢,3M的文件就得20秒左右。 封成exe或许能快点吧。
出来的txt文件是源文件的两倍大小,随便用用就好。
|