简体   繁体   English

Flash AS3 Main SWF的二进制校验和

[英]Flash AS3 Main swf's binary checksum

I have a 'Shell' swf as the main swf to protect other things in the project. 我有一个“ Shell” SWF作为主要的SWF文件,以保护项目中的其他内容。

Shell swf's procedure is: Shell swf的过程为:

  1. check stage property, so it can't be loaded as a child. check stage属性,因此不能作为子项加载。
  2. check Capabilities.isDebugger, so it can't be run in a debugger. 检查Capabilities.isDebugger,使其无法在调试器中运行。
  3. load a decoder lib. 加载解码器库。 the decoder lib is built by flascc, quite difficult to decompile. 解码器库是由flascc构建的,很难反编译。
  4. use decoder to validate self. 使用解码器来验证自己。 if failed or skipped, decoder won't do any decoding job. 如果失败或跳过,解码器将不执行任何解码工作。
  5. load encoded main entry of the project, decode it & add it to stage. 加载项目的编码主条目,对其进行解码并将其添加到阶段。

The problem is step 4, I want to do binary checksum of Shell swf. 问题是步骤4,我想对Shell swf做二进制校验和。

Questiones are: 问题是:

  1. How can i get the original binary content of the Shell swf file on startup ? 如何在启动时获取Shell swf文件的原始二进制内容?
  2. if not, is Shell swf's LoaderInfo.bytes consistent in different versions of flash player ? 如果不是,Shell swf的LoaderInfo.bytes在不同版本的Flash Player中是否一致?
  3. if not, is there any good way to do the validation job in step 4 ? 如果不是,是否有任何好的方法来完成步骤4中的验证工作?

If you create an AIR app you can temporarily load original file ("Shell.swf") in application bundle using standard URLLoader or File and FileStream. 如果创建AIR应用程序,则可以使用标准URLLoader或File and FileStream在应用程序捆绑包中临时加载原始文件(“ Shell.swf”)。 If your app will work in browser then you can get self-file-name and URL from loaderInfo and load it using URLLoader. 如果您的应用程序可以在浏览器中运行,那么您可以从loaderInfo获取自身的文件名和URL,然后使用URLLoader进行加载。 Anyway after your verification process complete you need unload it. 无论如何,验证过程完成后,您需要将其卸载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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