各位大哥,有谁可以帮我把这段PB的代码写成VBScript的格式呢?
谢谢!
integer li_char, li_base, li_i
string ls_passwd, ls_str, ls_char, ls_basestr, ls_transpwd
string ls_codestr
if Match(arg_passwd, "[A-Za-z]") then
return arg_passwd
end if
ls_str = arg_passwd
ls_passwd = ""
li_base = this.uf_transbase(Mid(ls_str, 1, 3))
for li_i = 2 to Len(ls_str) / 3
ls_codestr = Mid(ls_str, ((li_i -1) * 3) + 1, 3)
ls_transpwd = ls_transpwd + Char(Integer(ls_codestr))
next
ls_char = Mid(ls_transpwd, 1, 1)
li_char = Asc(ls_char) - li_base
ls_passwd = ls_passwd + Char(li_char)
for li_i = 2 to Len(ls_transpwd)
ls_char = Mid(ls_transpwd, li_i, 1)
if Mod(li_i, 2) = 0 then
li_char = Asc(ls_char) - (li_base + li_i)
else
li_char = Asc(ls_char) + (li_base + li_i)
end if
ls_passwd = ls_passwd + Char(li_char)
next
ls_passwd = RightTrim(ls_passwd)
return ls_passwd