[英]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: 我正在学习
JavaScript
,我找到了这段代码:
<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. 这只是变量
_0x98bd
,只有两个字符串元素的数组。
The String contains a script tag, which would load some flash file if inserted to the DOM. String包含一个脚本标记,如果插入DOM,它将加载一些flash文件。 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相当于'<'字符。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.