开发者

Decompiling SWFs and fonts

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 th开发者_运维技巧at 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


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.


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 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:

    $ swfextract sample.swf 
    Objects in file sample.swf:
     [-F] 2 Fonts: ID(s) 2, 24
    $ swfextract --outputformat "font_extract_%06d.%s" -F 2,24 sample.swf 
    $ ls font_extract_0000*
    font_extract_000002.swf  font_extract_000024.swf
    
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜