JS Obfuscation code restore-js anti-aliasing: using JS for assignment implementation

Source: Internet
Author: User
<span id="Label3"></p><p><p>Post a confusing test code first:</p></p><pre><pre>Eval (<span style="color: #0000ff;">function</span>(p,a,c,k,e,d) {e=<span style="color: #0000ff;">function</span>(c) {<span style="color: #0000ff;">return</span>(c<a? "": e (parseint (c/a))) + ((c=c%a ) >35? String.fromCharCode (c+29): c.tostring (+))};if (! ". Replace (/^/,string)) {while (c--) d[e (c)]=k[c]| | E (c); k=[function (e) {return d[e]}];e=function () {return ' \\w+ '};c=1;}; While (c--) if (k[c]) p=p.replace (new RegExp (' \\b ' +e (c) + ' \\b ', ' G '), k[c]); return p;} (' 1 ("0-6"); 2 4 () {1 ("0-5")}8 3=2 () {1 ("0-7")};4 (); 3 () ', 9, 9, ' Melancholy of the peak |alert|function|b|a| anti-aliasing test 2| anti-aliasing test 1| anti-obfuscation test 3|var '. Split (' | '), 0,{}))</pre></pre>Anti-aliasing method <ol> <ol> <li>Create a new Web page xxx.html</li> <li>Add a div container id= "divtest"</li> <li>Assignment Execution: (in The code that is confused above, extract the contents of eval () and assign (or print directly) to document.getElementById (' divtest '). InnerText)</li> </ol> </ol><pre><pre>document.getElementById (' divtest '). innertext=<span style="color: #0000ff;">function</span>(p,a,c,k,e,d) {e=<span style="color: #0000ff;">function</span>(c) {<span style="color: #0000ff;">return </span>(c<a? ": e (parseint (c/a))) + ((c=c%a) >35? String.fromCharCode (c+29): c.tostring (+))};if (! ". Replace (/^/,string)) {while (c--) d[e (c)]=k[c]| | E (c); k=[function (e) {return d[e]}];e=function () {return ' \\w+ '};c=1;}; While (c--) if (k[c]) p=p.replace (new RegExp (' \\b ' +e (c) + ' \\b ', ' G '), k[c]); return p;} (' 1 ("0-6"); 2 4 () {1 ("0-5")}8 3=2 () {1 ("0-7")};4 (); 3 () ', 9, 9, ' Melancholy of the peak |alert|function|b|a| anti-aliasing test 2| anti-aliasing test 1| anti-obfuscation test 3|var '. Split (' | '), 0,{})</pre></pre><p><p></p></p> <ol> <ol> <li>Open xxx.html display result: (anti-confusing code has been compressed, removing the characters such as Newline)</li> </ol> </ol><pre><pre>Alert ("melancholy pip-anti-confusion Test 1"); <span style="color: #0000ff;">function</span> a () {alert ("melancholy pip-anti-obfuscation test 2")}<span style="color: #0000ff;">var</span> b=<span style="color: #0000ff;">function</span>() {alert ("melancholy pip-anti-aliasing test 3")};a (); b ()</pre></pre><p><p></p></p><p><p> JS obfuscation code restore-js anti-aliasing: using JS to implement the assignment </p> </p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.