Talking about _(js reverse) basic essential knowledge

Bold style. With the development of technology, js reverse engineering has become an indispensable technology for crawlers. I just talk about it here, based on my own experience. Do not spray the snake.

  1. js reverse, you first have to understand the function of it example:
    . function per(x,y){ return x+y;}
    For example, this function function he is to declare a function, his name is called per, there are two parameters, x, y. You have to understand the logic of the operation. This function returns the sum of x+y.

  2. Example of li function closure:

  3. (function () { var r = 0; return function () {return r += 1;} })
    This function is a closure function. If you want to call this closure function, you can assign this function to a variable, and then add a bracket at the end of it. For example
    var per=(function () { var r = 0; return function () {return r += 1;} })()
    , if you do not add a registration at the end, it will return a function directly
    ƒ () {return counter += 1;}
    because you only call it once. If you use it without parentheses, just call the per()() function. The name can be called by adding two brackets

  4. js timer, this thing is too big and many newbies don’t know how to do it. In fact, we just imitate the webpage to generate data, then I can also fake some functions from the data on the webpage, such as this timer, we define it like this
    var setInterval=function(x1,x2){x1();}
    Seeing the timer, first of all, we have to think that one of its parameters is a method, so we only need to find a method for it. There are many methods. The method is dead, but man is alive.

  5. The basis of js reverse engineering, know how to get these things in flat flow, how to get its execution order.

  6. At least you have to understand the several loop codes of js.

Guess you like

Origin blog.csdn.net/weixin_44504978/article/details/112421430