z497478013 发表于 2017-5-25 16:46:44

一个JS加密 加密代码 都找出来了 但是调试不出来 能帮忙看看吗?

本帖最后由 z497478013 于 2017-5-25 16:49 编辑

一个JS加密加密代码 都找出来了但是调试不出来
加密的结果=H2(论坛版本号+标题.replace(new RegExp('[^A-Za-z0-9_\u4e00-\u9fa5]','g'),'')+P(内容));

论坛版本号=1353154
标题=ddddddddd
内容=<p>dddddddddddddddddd</p>
------------------------------------以下调用的JS


var realPath = '';

function P(in_str) {
    var s = in_str.replace(new RegExp('(<[^>]*>)|([ \f\n\r\t]*)','g'), '');
    for (i = 0; i < 32; i++)
      s = s.replace(new RegExp('&#' + i + ';','g'), String.fromCharCode(i));
    var he = new Array

("AElig",198,"Aacute",193,"Acirc",194,"Agrave",192,"Alpha",913,"Aring",197,"Atilde",195,"Auml",196,"Beta",914,"Ccedil",199,"Chi",935,"Dagger",8225,"Delta",916,"ETH",208,"Eacute"

,201,"Ecirc",202,"Egrave",200,"Epsilon",917,"Eta",919,"Euml",203,"Gamma",915,"Iacute",205,"Icirc",206,"Igrave",204,"Iota",921,"Iuml",207,"Kappa",922,"Lambda",923,"Mu",924,"Ntild

e",209,"Nu",925,"OElig",338,"Oacute",211,"Ocirc",212,"Ograve",210,"Omega",937,"Omicron",927,"Oslash",216,"Otilde",213,"Ouml",214,"Phi",934,"Pi",928,"Prime",8243,"Psi",936,"Rho",

929,"Scaron",352,"Sigma",931,"THORN",222,"Tau",932,"Theta",920,"Uacute",218,"Ucirc",219,"Ugrave",217,"Upsilon",933,"Uuml",220,"Xi",926,"Yacute",221,"Yuml",376,"Zeta",918,"aacute

",225,"acirc",226,"acute",180,"aelig",230,"agrave",224,"alefsym",8501,"alpha",945,"and",8869,"ang",8736,"aring",229,"asymp",8773,"atilde",227,"auml",228,"bdquo",8222,"beta",946,

"brvbar",166,"bull",8226,"cap",8745,"ccedil",231,"cedil",184,"cent",162,"chi",967,"circ",710,"clubs",9827,"cong",8773,"copy",169,"crarr",8629,"cup",8746,"curren",164,"dArr",8659

,"dagger",8224,"darr",8595,"deg",176,"delta",948,"diams",9830,"divide",247,"eacute",233,"ecirc",234,"egrave",232,"empty",8709,"emsp",8195,
   

"ensp",8194,"epsilon",949,"equiv",8801,"eta",951,"eth",240,"euml",235,"euro",8364,"exist",8707,"fnof",402,"forall",8704,"frac12",189,"frac14",188,"frac34",190,"frasl",8260,"gamm

a",947,"ge",8805,"gt",62,"hArr",8660,"harr",8596,"hearts",9829,"hellip",8230,"iacute",237,"icirc",238,"iexcl",161,"igrave",236,"image",8465,"infin",8734,"int",8747,"iota",953,"i

quest",191,"isin",8712,"iuml",239,"kappa",954,"lArr",8656,"lambda",955,"lang",9001,"laquo",171,"larr",8592,"lceil",8968,"ldquo",8220,"le",8804,"lfloor",8970,"lowast",8727,"loz",

9674,"lrm",8206,"lsaquo",8249,"lsquo",8216,"lt",60,"macr",175,"mdash",8212,"micro",181,"middot",183,"minus",8722,"mu",956,"nabla",8711,"nbsp",160,"ndash",8211,"ne",8800,"ni",871

5,"not",172,"notin",8713,"nsub",8836,"ntilde",241,"nu",957,"oacute",243,"ocirc",244,"oelig",339,"ograve",242,"oline",8254,"omega",969,"omicron",959,"oplus",8853,"or",8870,"ordf"

,170,"ordm",186,"oslash",248,"otilde",245,"otimes",8855,"ouml",246,"para",182,"part",8706,"permil",8240,"perp",8869,"phi",966,"pi",960,"piv",982,"plusmn",177,"pound",163,"prime"

,8242,"prod",8719,"prop",8733,"psi",968,"quot",34,"rArr",8658,"radic",8730,"rang",9002,"raquo",187,"rarr",8594,"rceil",8969,"rdquo",8221,"real",8476,"reg",174,"rfloor",8971,"rho

",961,"rlm",8207,"rsaquo",8250,"rsquo",8217,"sbquo",8218,"scaron",353,"sdot",8901,"sect",167,"shy",173,"sigma",963,"sigmaf",962,"sim",8764,"spades",9824,"sub",8834,"sube",8838,"

sum",8722,"sup",8835,"sup1",185,"sup2",178,"sup3",179,"supe",8839,"szlig",223,"tau",964,"there4",8756,"theta",952,"thetasym",977,"thinsp",8201,
   

"thorn",254,"tilde",732,"times",215,"trade",8482,"uArr",8657,"uacute",250,"uarr",8593,"ucirc",251,"ugrave",249,"uml",168,"upsih",978,"upsilon",965,"uuml",252,"weierp",8472,"xi",

958,"yacute",253,"yen",165,"yuml",255,"zeta",950,"zwj",8205,"zwnj",8204,"amp",38);
    for (i = 0; i < he.length / 2; i++)
      s = s.replace(new RegExp('&' + he + ';','g'), String.fromCharCode(he));
    s = s.replace(new RegExp('[^A-Za-z0-9_\u4e00-\u9fa5]','g'), '');
    return s;
}
function C(x, l) {
    function B(n, c) {
      return (n << c) | (n >>> (32 - c));
    }
    function S(x, y) {
      var l = (x & 0xFFFF) + (y & 0xFFFF);
      var w = (x >> 16) + (y >> 16) + (l >> 16);
      return (w << 16) | (l & 0xFFFF);
    }
    function M(q, a, b, x, s, t) {
      return S(B(S(S(a, q), S(x, t)), s), b);
    }
    function F(a, b, c, d, x, s, t) {
      return M((b & c) | ((~b) & d), a, b, x, s, t);
    }
    function G(a, b, c, d, x, s, t) {
      return M((b & d) | (c & (~d)), a, b, x, s, t);
    }
    function H(a, b, c, d, x, s, t) {
      return M(b ^ c ^ d, a, b, x, s, t);
    }
    function I(a, b, c, d, x, s, t) {
      return M(c ^ (b | (~d)), a, b, x, s, t);
    }
    function BH(b) {
      var h = "0123456789ABCDEF";
      var s = "";
      for (var i = 0; i < b.length * 4; i++) {
            s += h.charAt((b >> ((i % 4) * 8 + 4)) & 0xF) + h.charAt((b >> ((i % 4) * 8)) & 0xF);
      }
      return s;
    }
    x |= 0x80 << ((l) % 32);
    x[(((l + 64) >>> 9) << 4) + 14] = l;
    var a = 1732584193;
    var b = -271733879;
    var c = -1732584194;
    var d = 271733878;
    for (var i = 0; i < x.length; i += 16) {
      var oa = a;
      var ob = b;
      var oc = c;
      var od = d;
      a = F(a, b, c, d, x, 7, -680876936);
      d = F(d, a, b, c, x, 12, -389564586);
      c = F(c, d, a, b, x, 17, 606105819);
      b = F(b, c, d, a, x, 22, -1044525330);
      a = F(a, b, c, d, x, 7, -176418897);
      d = F(d, a, b, c, x, 12, 1200080426);
      c = F(c, d, a, b, x, 17, -1473231341);
      b = F(b, c, d, a, x, 22, -45705983);
      a = F(a, b, c, d, x, 7, 1770035416);
      d = F(d, a, b, c, x, 12, -1958414417);
      c = F(c, d, a, b, x, 17, -42063);
      b = F(b, c, d, a, x, 22, -1990404162);
      a = F(a, b, c, d, x, 7, 1804603682);
      d = F(d, a, b, c, x, 12, -40341101);
      c = F(c, d, a, b, x, 17, -1502002290);
      b = F(b, c, d, a, x, 22, 1236535329);
      a = G(a, b, c, d, x, 5, -165796510);
      d = G(d, a, b, c, x, 9, -1069501632);
      c = G(c, d, a, b, x, 14, 643717713);
      b = G(b, c, d, a, x, 20, -373897302);
      a = G(a, b, c, d, x, 5, -701558691);
      d = G(d, a, b, c, x, 9, 38016083);
      c = G(c, d, a, b, x, 14, -660478335);
      b = G(b, c, d, a, x, 20, -405537848);
      a = G(a, b, c, d, x, 5, 568446438);
      d = G(d, a, b, c, x, 9, -1019803690);
      c = G(c, d, a, b, x, 14, -187363961);
      b = G(b, c, d, a, x, 20, 1163531501);
      a = G(a, b, c, d, x, 5, -1444681467);
      d = G(d, a, b, c, x, 9, -51403784);
      c = G(c, d, a, b, x, 14, 1735328473);
      b = G(b, c, d, a, x, 20, -1926607734);
      a = H(a, b, c, d, x, 4, -378558);
      d = H(d, a, b, c, x, 11, -2022574463);
      c = H(c, d, a, b, x, 16, 1839030562);
      b = H(b, c, d, a, x, 23, -35309556);
      a = H(a, b, c, d, x, 4, -1530992060);
      d = H(d, a, b, c, x, 11, 1272893353);
      c = H(c, d, a, b, x, 16, -155497632);
      b = H(b, c, d, a, x, 23, -1094730640);
      a = H(a, b, c, d, x, 4, 681279174);
      d = H(d, a, b, c, x, 11, -358537222);
      c = H(c, d, a, b, x, 16, -722521979);
      b = H(b, c, d, a, x, 23, 76029189);
      a = H(a, b, c, d, x, 4, -640364487);
      d = H(d, a, b, c, x, 11, -421815835);
      c = H(c, d, a, b, x, 16, 530742520);
      b = H(b, c, d, a, x, 23, -995338651);
      a = I(a, b, c, d, x, 6, -198630844);
      d = I(d, a, b, c, x, 10, 1126891415);
      c = I(c, d, a, b, x, 15, -1416354905);
      b = I(b, c, d, a, x, 21, -57434055);
      a = I(a, b, c, d, x, 6, 1700485571);
      d = I(d, a, b, c, x, 10, -1894986606);
      c = I(c, d, a, b, x, 15, -1051523);
      b = I(b, c, d, a, x, 21, -2054922799);
      a = I(a, b, c, d, x, 6, 1873313359);
      d = I(d, a, b, c, x, 10, -30611744);
      c = I(c, d, a, b, x, 15, -1560198380);
      b = I(b, c, d, a, x, 21, 1309151649);
      a = I(a, b, c, d, x, 6, -145523070);
      d = I(d, a, b, c, x, 10, -1120210379);
      c = I(c, d, a, b, x, 15, 718787259);
      b = I(b, c, d, a, x, 21, -343485551);
      a = S(a, oa);
      b = S(b, ob);
      c = S(c, oc);
      d = S(d, od);
    }
    return BH(Array(a, b, c, d));
}
function H2(s, z) {
    function SB(s) {
      var b = Array();
      var m = (1 << z) - 1;
      for (var i = 0; i < s.length * z; i += z)
            b |= (s.charCodeAt(i / z) & m) << (i % 32);
      return b;
    }
    if (!z)
      z = 16;
    E = document.cookie;
    Z = C(SB(s), s.length * z) + "-" + E.substr(E.indexOf("SessionID") + 10, 16);
    return C(SB(Z), Z.length * z);
}

揰掵佲 发表于 2017-5-25 17:38:39

这个是MD5的~

z497478013 发表于 2017-5-25 17:43:28

乐易运营 发表于 2017-5-25 17:38
这个是MD5的~

冯古屋 帮我解决了 提醒了 我   蛮 恶心的 这个 JS
页: [1]
查看完整版本: 一个JS加密 加密代码 都找出来了 但是调试不出来 能帮忙看看吗?