小林给推荐了个解密的页面,提取出代码如下:
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Base64 and URL and Hex Encoding and Decoding</title>
<meta name="description" content="Encodes or decodes data in Base64 or URL encoding using client side JavaScript" />
<meta name="keywords" content="base64, base 64, urlencode, urldecode, hexencode, hex encode, hexdecode hex decode, javascript base64, javascript base 64, javascript urlencode, javascript urldecode, javascript hexencode, javascript hexdecode" />
<link rel="shortcut icon" href="http://ostermiller.org/favicon.ico" type="image/x-icon" />
<script language=javascript type="text/javascript">
<!--
function urlDecode(str){
str=str.replace(new RegExp('\\+','g'),' ');
return unescape(str);
}
function urlEncode(str){
str=escape(str);
str=str.replace(new RegExp('\\+','g'),'%2B');
return str.replace(new RegExp('%20','g'),'+');
}
var END_OF_INPUT = -1;
var base64Chars = new Array(
'A','B','C','D','E','F','G','H',
'I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X',
'Y','Z','a','b','c','d','e','f',
'g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v',
'w','x','y','z','0','1','2','3',
'4','5','6','7','8','9','+','/'
);
var reverseBase64Chars = new Array();
for (var i=0; i < base64Chars.length; i++){
reverseBase64Chars[base64Chars[i]] = i;
}
var base64Str;
var base64Count;
function setBase64Str(str){
base64Str = str;
base64Count = 0;
}
function readBase64(){
if (!base64Str) return END_OF_INPUT;
if (base64Count >= base64Str.length) return END_OF_INPUT;
var c = base64Str.charCodeAt(base64Count) & 0xff;
base64Count++;
内容版权声明:除非注明,否则皆为本站原创文章。