站长资源脚本专栏

VBS 16进制验证特定字符

整理:jimmy2024/12/28浏览2
简介复制代码 代码如下: '验证字符:fastslz file=Wscript.ScriptFullName Dim slz set slz = CreateObject("Adodb.Stream") slz.Type = 1 slz.Mode = 3 slz.Open slz.Position =
复制代码 代码如下:
'验证字符: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