Request phpflood and its corresponding js decoding code of the js terminal runtime through a.phpgenerated B .html, encryption is not high, but do not base64 self improved, because php and js code is different, resulting in unable to restore the http://topic.csdn.net/u/20121026/21/aa481d57-5268-43 can be php encoding and corresponding js decoding function
The Digest of the JS code is running in B .html generated through a.php. the encryption requirement is not high, but base64 is not required.
I have improved it myself. due to different php and js codes, it cannot be restored.
Http://topic.csdn.net/u/20121026/21/aa481d57-5268-4377-844a-11e0abf9fdd0.html? Seed = 358554303 & r = 80007043 # r_80007043
------ Solution --------------------
I wonder if it meets your needs
Script
Function compile (code ){
Var c = String. fromCharCode (code. charCodeAt (0) + code. length );
For (var I = 1; I
C + = String. fromCharCode (code. charCodeAt (I) + code. charCodeAt (i-1 ));
}
Return escape (c );
}
Document. write (compile ('CD in AB '));
Script
Echo compile ('CD in AB ');
Function compile ($ code ){
$ Code = array_values (unpack ('n' * ', iconv (strlen ('hang') = 2? 'Gbk': 'utf-8', 'ucs-2', $ code )));
$ C [] = $ code [0] + count ($ code );
For ($ I = 1; $ I
$ C [] = $ code [$ I] + $ code [$ i-1];
}
$ R = '';
Foreach ($ c as $ v ){
If ($ v <256) $ r. = urlencode (chr ($ v ));
Else $ r. = '% u'. strtoupper (dechex ($ v ));
}
Return $ r;
}
Results in GBK environment
F % C3 % u4E8F % u4E90 % C7 f % C3 % u4E8F % u4E90 % C7