VBS 16进制验证特定字符
程序员文章站
2024-01-15 23:13:22
复制代码 代码如下: '验证字符:fastslz file=wscript.scriptfullname dim slz set slz = createobject("a...
复制代码 代码如下:
'验证字符:fastslz
file=wscript.scriptfullname
dim slz
set slz = createobject("adodb.stream")
slz.type = 1
slz.mode = 3
slz.open
slz.position = 0
slz.loadfromfile file
bin=slz.read(18)
if ascb(midb(bin,12,1))=&h66 and ascb(midb(bin,13,1))=&h61 and ascb(midb(bin,14,1))=&h73 and ascb(midb(bin,15,1))=&h74 and ascb(midb(bin,16,1))=&h73 and ascb(midb(bin,17,1))=&h6c and ascb(midb(bin,18,1))=&h7a then
wscript.echo "通过验证"
else
wscript.echo "非法修改"
end if
上一篇: VBS和UAC用户帐户控制实现代码