Came across strange javascript while fixing a page
I've been working on a page that's been开发者_如何学运维 sabotaged by somebody and well that person added extra code. I have no clue what it does but i know it doesn't belong there.
I have included a link right here to pastebin right here
The code at the bottom of the page is strange (at line 130 till 179)... can someone explain it to me?
Prolly should mention not to run this in any circumstances
EDIT: I have jsbeautified it and put it on pastebin
You could start by jsbeautifying the code, although that didn't help much. It's most likely some malicious code, but it could take a while to determine what it does.
If you are interested, the code is obfuscated, meaning it's made as hard as possible to comprehend what it does. Some people use this to hide source code, some use it to inject malicious code without showing what it does.
The code is obfuscated and you can try to understand the intention by doing unescape('\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74')
in javascript console which resolves to createElement.
Seems to be malicous code! Check your computer for malware etc.
精彩评论