A trick to hack the confusing JavaScript code

Source: Internet
Author: User

JavaScript is not very strong, want to how to crack on how to crack! This article teaches you not only the solution, but also the source protection consciousness!

First, the principle:

JavaScript is an explanatory language, no suspense, it relies heavily on the browser, especially the mobile phone games 59600.com Such sites, heavily dependent on mobile browsers.

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 don't need to know the anti-aliasing algorithm, I just know an interface,

With the help of ie9->f12, everything changed very simply, 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.

In my eyes, 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, an example? That's good, isn't that the interface I want? First of all remember, as long as the JS source contains a throw, then we have a big step.

First find this interface, well, parameters everything is OK. It's not what we want, okay?

What we really want to do is let the source code throw an exception and let eval code restore the most realistic code.

I deliberately changed a wrong argument into it. Well, the source code has been shown in front of me.

Third, source protection solutions:

1. Make the variable, method name unreadable before confusing:

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 a problem that the API provided by your external developer must be meaningful,

Otherwise no one can read, the mapping work during this period is also very complex.

2. Browser Vendor:

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.

3. Eliminate the existence of a throw in the source code

If you are using jquery or ExtJS, try to throw errors to these libraries and avoid throwing exceptions 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.