[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
version?
(./configure;make;cd lib/python/;make)
If yes it's easy- just place something like the following script
in ${SWFTOOLS}/lib/python:
-----------------------------------------------------------------------
#!/usr/bin/python2.2
import SWF
swf = SWF.load("file.swf")
swf.tags += SWF.Protect() # or: SWF.Protect("password")
swf.save(name="file_protected.swf")
-----------------------------------------------------------------------
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:
-----------------------------------------------------------------------
#!/usr/bin/python2.2
import SWF
import sys
for f in sys.argv[1:]:
print "Protecting f..."
swf = SWF.load(f)
swf.tags += SWF.Protect()
swf.save(f)
-----------------------------------------------------------------------
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?
Greetings
Matthias
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.
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, (continued)
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Matthias Kramm, 2003/11/18
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Amartyo Banerjee, 2003/11/18
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Matthias Kramm, 2003/11/23
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Amartyo Banerjee, 2003/11/23
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Matthias Kramm, 2003/11/23
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Amartyo Banerjee, 2003/11/23
- Re: [Swftools-common] New info -- Was: Problems with avi2swf, Matthias Kramm, 2003/11/30
- [Swftools-common] any way to batch protect?, michael geary, 2003/11/24
- [Swftools-common] Re: any way to batch protect?,
Matthias Kramm <=