Sothink SWF Decompiler在奇怪的地方使用null

时间:2011-06-25 16:12:01

标签: actionscript null flash swf-decompiler

我一直试图通过使用Sothink SWF Decompiler查看ActionScript文件来计算Flash game中的背景数学。不可否认,我对ActionScript知之甚少,但我看到的代码行如下:

_loc_2 = null * (null * true) <= null;

或:

_loc_3 = null & null << (null === false);

从我的立场开始, value&lt; = null 没有多大意义, null * true null&amp;空。我只是没有正确理解ActionScript,或者这是反编译过程中的错误?如果这是一个错误,有什么办法可以解决它吗?

1 个答案:

答案 0 :(得分:0)

swf可能已经用obfuscater加密了,这就是为什么你会看到像这样的废话。您可以自己测试此代码(尽管您必须以非严格模式编译):

trace( "null & null: " + ( null & null ) ); // traces 0
trace( "null === false: " + ( null === false ) ); // traces false
trace( "null & null << (null === false): " + (null & null << (null === false)) ); // traces 0
trace( "null * true: " + ( null * true ) ); // traces 0
trace( "null * null * true " + ( null * ( null * true ) ) ); // traces 0
trace( "null * (null * true) <= null: " + (null * (null * true) <= null) ); // traces true

所以基本上_loc_2是设置为0的局部变量,而_loc_3是设置为true的局部变量