Javascript compiled or not? Check inside

前端 未结 7 918
后悔当初
后悔当初 2021-01-19 16:36

Note that I am not experienced with Javascript. If a javascript code starts like this:

javascript:var _0x89f8=[\"\\x69\\x6E\\x6E\\x65\\x72\\x48\\x54\\x4D\\x4         


        
7条回答
  •  南方客
    南方客 (楼主)
    2021-01-19 17:15

    This looks like obfuscated javascript - whoever put it up doesn't want it to be easily read. Without meaningful variable names, it will be difficult to understand (i.e. what does _0x89f8 mean?).

    The string parameters are escaped strings - \x69 is the hex for the character i etc...

    Enter the following to your browser address bar to see how it looks:

    javascript:alert("\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C");
    

    Chances are that the function being called builds up a javascript string from the parameters and then calls eval on them.

提交回复
热议问题