A site js confuse simple structure analysis

Hello everyone, today we are in terms of a reduction of manual analysis js confused thinking.

It is a long way

After testing, he also direct debit run out, but we look at him this odd mix of ideas, we analyze and then write down, write after convenience we obfuscation tool as one of the ways for us to use.

Because he is a closure, so we look directly at last

Finally performs a V function first and then pass a bunch of garbled characters, it is clear that the second pass a bunch of built-in browser object functions, this confusion is true a little problem, so the key function to play us directly replace it ok.

    We analyze him the entrance where v

Copy out this closure is then performed

Then this point, it is a function of position can be positioned to v

Jump here, where V is the entrance, as to how to decrypt the string garbled he does not care about us, being able to run the code Anzhuang no need to analyze, then we look at the structure of his beginning

V stated that it was possible to see where we look, first of all from the middle analysis

We can be determined by the scope of the brackets, the mouse click of the Google developer tools will highlight the corresponding

In fact this js () {} is not inside the scope he would only return to the last object, so

This large segment of this function returns only i

By the rules we know that () he would only return to the last (1,2,3,4) will return to the middle of the 4 is the last one, we are going to look a s

s is an empty array, the next

All he is not one saw this law, we know that () brackets regardless of how many returns only one we see at the beginning

Mouse point of the first end of his look

He finally a V Z That this function, this large segment of executing the will return a Z

Then we look at where this function Z

Ai

Z is here to return to the last one is here, is not very familiar

We begin with here is directly targeted to, so that we complete the analysis of this confused him, now it appears to be not less difficult.

END

Published 28 original articles · won praise 27 · views 40000 +

Guess you like

Origin blog.csdn.net/sergiojune/article/details/104082367