3
# The script looks for files in ../tmpSharedObject/malformed, so you will have
4
# to put your malformed files there or change where the script looks.
6
# Use 'makeswf -v6 SOLrobustness.as -o SOLrobustness.swf' and run with Gnash.
14
my $dir="../tmpSharedObject/malformed";
16
opendir(DIR, $dir) || die("Cannot open directory: $dir");
17
@filelist = readdir(DIR);
20
open(OUTF, ">SOLrobustness.as");
23
// SOL file robustness testing. Feed with malformed SOL files in
24
// tmpSharedObject/malformed
26
// 'makeswf -v6 SOLrobustness.as -o SOLrobustness.swf' and run with Gnash.
30
# ActionScript generation
33
# Skip hidden files, directories and anything that doesn't end in
35
next if ($file =~ m/^\./ || $file !~ m/\.sol$/);
37
print OUTF "so = SharedObject.getLocal(\"malformed/$file\", \"/\");\n";
38
print OUTF "trace(so.getSize());\n";
39
print OUTF "delete so;\n";