[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Re: any way to batch protect?

From: Matthias Kramm
Subject: [Swftools-common] Re: any way to batch protect?
Date: Sun, 30 Nov 2003 12:00:01 +0100
User-agent: Mutt/1.4i

On Mon, Nov 24, 2003 at 07:22:17PM -0700, michael geary wrote:
> Thanks again for such cool tools. Is there any way to use these tools 
> to batch protect swfs? I know that there are tools out there to batch 
> UN-protect swfs, but my client would still like to have the swfs that 
> we are generating be protected.

Hm. Are you able to compile the Python extension in the current SWFTools CVS
(./configure;make;cd lib/python/;make)

If yes it's easy- just place something like the following script
in ${SWFTOOLS}/lib/python:


import SWF

swf = SWF.load("file.swf")
swf.tags += SWF.Protect() # or: SWF.Protect("password")


If you run it will create a protected version of "file.swf" and name
it "file_protected.swf" (You could also name the destination file
"file.swf", too, so you don't need a new file).

So, in order to make this a proper command-line tool, you could
write something like the following:

import SWF
import sys

for f in sys.argv[1:]:
    print "Protecting f..."
    swf = SWF.load(f)
    swf.tags += SWF.Protect()

If you now name this protect.py, you can now do e.g.:
    ./protect.py file1.swf file2.swf file3.swf 

Is this what you wanted?



PS: The Protect() code is still somewhat beta, especially the password
    encryption (which I can't test myself because I don't have the
    Flash authoring software)- so I'll be very interested in feedback
    on this one.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]