反编译 SWF 和字体
我正在为字体零售商网站开发基于 Flash 的字体查看器。我一直在阅读有关 SWF 反编译器的内容,我想知道反编译器是否可以抓取嵌入在 SWF 中的字体并以某种可重用的格式输出它们?
我还可能将字体嵌入到可能托管在 HTTPS 服务器上的外部 SWF 中。这是保护字体免遭反编译的可行方法吗?
(我手头上有一份硕思反编译器,我本想对这一切进行测试,但不幸的是试用期结束了。)
感谢您的帮助!
安德烈
I'm working on a Flash-based font viewer for a font retailer website. I've been reading up on SWF decompilers, and I was wondering, can decompilers grab fonts embedded in a SWF and output them in some sort of reusable format?
I might also be embedding the fonts in external SWFs, possibly hosted on a HTTPS server. Would that be a feasible way of protecting the fonts from decompiling?
(I've got a copy of the Sothink Decompiler lying around and I was meaning to put all this to the test, but unfortunately the trial period's ended.)
Thanks for your help!
Andrey
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您无法保护客户端中需要存在的任何信息或数据。如果浏览器可以使用它,则可以提取它。加密可以提供攻击者必须删除的附加层,但最终浏览器必须能够解密信息,因此攻击者可以模拟浏览器的行为并以这种方式获取数据。
此问题的解决方案是在服务器上渲染字体并使用 Flash 获取结果(例如图像文件)。这样您就可以将字体数据保留在服务器上并仍然显示输出。我不知道这在您的架构中是否可行,但这似乎是执行此操作的安全方法。
You cannot protect any information or data that is required to be present in the client. If the browser can use it, it can be extracted. Encryption can provide an additional layer that must be removed by an attacker, but in the end, the browser must be able to decrypt the information, and therefor an attacker can emulate what the browser does and get the data that way.
A solution to this problem would be rendering the font on a server and fetching the result (e.g. an image-file) with Flash. This way you can leave the font-data on the server and still display the output. I don't know if this is possible in your architecture, but this seems to be the secure way to do this.
理论上可以,swf 内的资源中包含的所有文件都可以使用该工具(以及许多其他工具)导出。也许您可以搜索 swf 加密软件来保护您的 swf,但这也不是免费的。
我首先发现的是这个
http://www.amayeta.com/
并且它还加密资源。
Theorically they can, all files included in the resources inside a swf can be exported with that tool (and lot of others). Probably you can search for a swf encryption software to protect you swf but that's not free too.
First i've found is this
http://www.amayeta.com/
and it encrypts also resources.
SWFTools - SWF 操作和生成实用程序
您可以安装SWFTools发行版(它也有一个命令行程序),并使用[SWFExtract][2],它可以反编译flash文件。
在 OSX 上,通过以下方式安装:
brew install swftools
。这将安装以下工具:
as3compile
、font2swf
、jpeg2swf
、pdf2swf
、png2swf ,
swfbbox
、swfc
、swfcombine
、swfdump
、swfextract
、swfrender
、swfstrings
、wav2swf
。swfextracts
允许从 swf 文件中提取 swf 影片剪辑和对象,包括字体。字体提取示例:
SWFTools - SWF manipulation and generation utilities
You can install SWFTools distribution (which has also a command line program), and use [SWFExtract][2], that can decompile flash files.
On OSX, install via:
brew install swftools
.This will install tools such as:
as3compile
,font2swf
,jpeg2swf
,pdf2swf
,png2swf
,swfbbox
,swfc
,swfcombine
,swfdump
,swfextract
,swfrender
,swfstrings
,wav2swf
.swfextracts
allows to extract swf movieclips and objects out of swf files, including fonts.Example of font extracting: