as3求解释Recover()function Recover(){var o = { valueOf:function(){ return "32676200272615929482"; }}; var s=+os=""+ss=s.replace(/(\d{5})/g,"$1,").split(/[,]/)s[3]=1482+Number(s[3])trace(String.fromCharCode(s[0],s[1],s[2],s[3]))}
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/31 07:57:12
as3求解释Recover()function Recover(){var o = { valueOf:function(){ return "32676200272615929482"; }}; var s=+os=""+ss=s.replace(/(\d{5})/g,"$1,").split(/[,]/)s[3]=1482+Number(s[3])trace(String.fromCharCode(s[0],s[1],s[2],s[3]))}
as3求解释
Recover()
function Recover(){
var o = {
valueOf:function(){ return "32676200272615929482"; }
};
var s=+o
s=""+s
s=s.replace(/(\d{5})/g,"$1,").split(/[,]/)
s[3]=1482+Number(s[3])
trace(String.fromCharCode(s[0],s[1],s[2],s[3]))
}
as3求解释Recover()function Recover(){var o = { valueOf:function(){ return "32676200272615929482"; }}; var s=+os=""+ss=s.replace(/(\d{5})/g,"$1,").split(/[,]/)s[3]=1482+Number(s[3])trace(String.fromCharCode(s[0],s[1],s[2],s[3]))}
这是谁写的呢,其根本目的一句话就行:trace("群主是猪");这些代码写了这么多就实用性来说完全不可取,不过用来耍酷还行,其中涉及的知识点挺多
Recover()//执行函数
function Recover(){
//定义变量o为Object类型,其覆写了valueOf方法
var o = {
valueOf:function(){ return "32676200272615929482"; }
};
//变量s的值将是o.valueOf();的返回值并变为Number类型,即32676200272615929482
//又因flash在数值处理上有一些BUG:很大的数值在其低分位上可能有误差
//所以s最终值经测试是32676200272615928000,少了1428,此值将在后面会补上
//注:此时s为Number类型
var s=+o
//将s变为字符串类型,即"32676200272615928000"
s=""+s
//先用正则(\d{5})将s变为"32676,20027,26159,28000"
//然后以,分割字符串得到数组:["32676","20027","26159","28000"]
//此时s类型为数组
s=s.replace(/(\d{5})/g,"$1,").split(/[,]/);
//将数组s的第四个元素变为数值再加上1428,其最终值是29482
//此时数组的内容将是:["32676","20027","26159",29482]
//其实这四个数字正是“群主是猪”的Unicode码
s[3]=1482+Number(s[3])
//将数组中的四个元素以Unicode码形式转为字符串,即“群主是猪”
trace(String.fromCharCode(s[0],s[1],s[2],s[3]))
}