加密 as3 flash .swf
我试图保护我的 as3 .swf flash 文件代码免遭反编译。但我不能在商业编译器上花费 $$$。如何免费加密我的 swf?
I'm trying to protect my as3 .swf flash file code from decompilation. I cannot spend $$$ on commercial compilers though. How can i encrypt my swf for free?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我残酷诚实的回答:甚至不要尝试。如果某人有能力使用您的应用程序中的资源或代码,那么他们将具备反编译您的 SWF 并获得所需内容所需的基本知识。
如果您想尝试,那么这就是我所能建议的:http://www.kindisoft.com/
希望这会有所帮助..或者至少解释了为什么您不应该花时间尝试。
My brutally honest answer: don't even try. If someone has skill to make use of assets or code from your application, then they're going to have the basic knowledge needed to decompile your SWF and get what they need.
If you even want to try, then this is all I can suggest: http://www.kindisoft.com/
Hope this helps.. Or at least explains why you shouldn't spend time trying.
不幸的是,使用广泛可用的免费工具反编译 swf 相当容易,因此您应该假设任何人都可以阅读它来构建您的代码。就像在 JavaScript 中一样,永远不要将敏感信息放入 swf 中,并且您想要防止窥探的任何特别有价值的算法都需要在您的服务器上运行,作为您可以调用并从中获取响应的服务器端脚本。
Unfortunately it's fairly easy to decompile a swf with widely available free tools, so you should architect your code on the assumption that anyone can read it. Just like in JavaScript, never put sensitive information in the swf, and any particularly valuable algorithms that you want to protect from prying eyes need to run on your server, as a server-side script that you can call and get a response from.
正如该线程中的其他人所说,老实说,我不会浪费您的时间;即使您要花钱购买 SecureSWF;您只能真正实现混淆而不是完全加密,因为字节码必须加载到内存中才能在 Flash 播放器中执行(因此可以转储出来)。
如果您想了解有关该主题的更多信息(实际上,了解有关如何绕过常见 SWF 加密技术的更多信息),那么我建议您花一些时间在 Jean-Philippe Auclair 的博客,尤其是安全类别中的文章。
As others in this thread have said, I honestly wouldn't waste your time; even if you were to shell out for SecureSWF; you can only really achieve obfuscation rather than full encryption as the bytecode has to be loaded into memory in order to execute in the flash player (and can therefore be dumped out).
If you want to read more about the subject (and indeed, learn more about how to get around common SWF encryption techniques) then I'd suggest spending some time on Jean-Philippe Auclair's blog, especially the articles in the security category.
虽然这是一个老话题..我想我把它扔在这里..它并没有真正被认为是“加密”,但它有助于提供一些保护,首先你需要解压缩你的闪存文件..你可以使用某些工具..我正在尝试用java制作flash解压缩器/压缩器,但是..我对java有点菜鸟,但我已经非常擅长AS3..这是简单的解决方案...
首先要做的事情..重命名所有你的类在 AS3 中不常见。不要将其命名为 Class 或 Main,将它们全部更改为 SillySilly1、SillySilly2 ...等。完成后,转到下一步
获取解压缩器...以解压缩文件从 CWS 到 FWS
使用解压缩器非常简单,我的只需将文件拖入并选择一个您想要保存解压缩副本的名称..
获取一个十六进制编辑器.. 所以这就是帮助保护您的文件的部分
打开你最喜欢的十六进制编辑器我的 HxD.. 继续将解压缩的文件拖到十六进制编辑器中,如果它的 CWS 仍然压缩,则前三个字节应该是 FWS..
下一步是使用搜索功能并搜索所有类名找到它们后,开始将它们替换为“@%F$@!fd#!”等名称只是一堆随机字符..我说回去并在帖子中更高的项目中更改它们的原因是这样你可以在十六进制编辑器中更容易地找到它们..但是是的,在替换所有类名后,您发现它将替换它在反编译中看起来如何,当他们查看代码时,类名也在那里发生了变化,所以它就像
private var Hello:$@#!!$
学习做的很好的事情..希望这对任何人都有帮助将来谁会读到这篇文章
Though this is an old Topic.. I Thought id throw this in here.. Its not really considered 'Encryption' But it helps with a bit of protection , First you would need to Decompress your flash file.. You can do so with certain tools .. I Am trying to make a flash Decompressor / Compressor in java but.. Im sort of a noob to java but i've gotten quite good at AS3.. heres the simple solution...
First things first.. Rename all your classes to something that isnt common in AS3 .. dont name it like Class or Main change them all to like SillySilly1,SillySilly2 ... etc.. After your do that go to the next step
Get a Decompressor... to Decompress the file from CWS to FWS
Using a Decompressor is pretty easy well mine is just drag the file in and choose a name you want to save a decompressed copy as..
Grab a Hex Editor.. So this is the part that is gonna help protect your file
open your favorite hex editor mines HxD.. Go ahead and drag your decompressed file into the hex editor its first three bytes should be FWS if its CWS its still compressed..
Next step is to use the search function and search for all your class names individually.. After you find them start replacing them with names such as '@%F$@!fd#!' Just a bunch of random characters.. The reason i said go back and change them in your project higher in the post is so you can find them easier in the hex editor.. But yea after you replace all class names you find it will replace how it looks in a decompile and when they look at the code the class names are changed in there as well so it would be like
private var Hello:$@#!!$
Pretty nice thing to learn to do .. Hope this helps anyone who reads this in the future..