Decode this strange Javascript

后端 未结 7 642
轻奢々
轻奢々 2020-12-10 18:31

I came across this code in a .js file. What is this code ??

I have downloaded that file onto my localhost webserver.Keeping this code in the .js file redirects me t

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 18:59

    Its Happen once you copy/paste or save as template files from template-help.com

    simply delete that section to run perfectly. If we decode the code , its looks like this -

        []['constructor']['constructor'](
      "if (~location.protocol.indexOf('http:') &&
           ~location.host.indexOf('template-help.com'))
         {}
       else
         (location.href='http://www.google.com')")()
    

    So delete it n enjoy.

提交回复
热议问题