A trick to hack the confusing JavaScript code

Source: Internet
Author: User

http://www.cnblogs.com/zjyuan/archive/2011/12/14/2287647.html JavaScript is not very force, want to how to crack on how to crack! This article teaches you not only the solution, but also the sense of source protection!

First, the principle:

JavaScript is an explanatory language, and there is no suspense, it relies heavily on viewers. No matter how JavaScript is confused, the final browser will know the most real code. A friend raises questions, confuses thousands of ways, if you know how to confuse it, and develop anti-aliasing algorithms? If you think so, then you're stuck in the mire, why don't you go for it? First of all, as a mature JavaScript product, confusion is a must. However, he must provide the browser with an anti-aliasing algorithm because the user needs to run. And running these two words gives me unlimited opportunities. I do not need to know the anti-aliasing algorithm, I just know an interface, with IE9->F12 help, everything is very simple, because the browser kernel has something I desperately want. Have friends ask questions, I confuse after, do not give you interface or do not give the browser anti-obfuscation algorithm. I give the answer is always: not to run the code, all are scrap code, nothing, I am too lazy to crack.

Second, the programme:

When you need to learn the source code of a JavaScript product, but ruthlessly confused, the mood is probably bad. So you can only get the official website example, and then further study. What the? Example? That's a good thing, isn't that the interface I want? First of all remember, as long as the JS source contains a throw, then we have succeeded a big step. First find this interface, well, parameters everything is OK. Normal? is not what we want, what we really want to do is let the source code throw an exception, let eval code restore the most real code. I deliberately changed a wrong argument into it. Well, the source code has been shown in front of me.

Third, source protection solutions:

Make the variable, method name unreadable before ① is confused:

Yin strokes Ah, the absolute yin strokes. When someone else has cracked your code, one eye looks at it and feels due time. However, in doing so, there is another problem, is that your external developers to provide the API must be meaningful, otherwise no one can read, this period of mapping work is also very complex.

② Browser Vendors:

The real realization of JS source protection, non-browser vendors can not participate, in vain to use JS full realization of the source code protection is not realistic.

③ eliminate the existence of the source of throw

If you are using jquery or ExtJS, throw the class libraries as far as possible and avoid throwing exceptions to the browser from the source file.

A trick to hack the confusing JavaScript code

Related Article

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.