|
Revision 783, 0.7 kB
(checked in by kindlund, 1 year ago)
|
Added CVS tags to all scripts. Added initial uninstall script.
|
- Property svn:executable set to
*
- Property svn:keywords set to
Id "$file"
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
use File::Temp (); |
|---|
| 6 |
use HoneyClient::Agent::Driver::ActiveContent qw(process); |
|---|
| 7 |
|
|---|
| 8 |
$ARGV[0] or die "Usage: FlashTest.pl <file.swf>\n"; |
|---|
| 9 |
|
|---|
| 10 |
open(SWF, $ARGV[0]); |
|---|
| 11 |
binmode SWF; |
|---|
| 12 |
|
|---|
| 13 |
my $tempFile = new File::Temp(SUFFIX => '.swf'); |
|---|
| 14 |
my $buffer; |
|---|
| 15 |
|
|---|
| 16 |
while ( |
|---|
| 17 |
read(SWF, $buffer, 65536) and print $tempFile $buffer |
|---|
| 18 |
) {}; |
|---|
| 19 |
|
|---|
| 20 |
close(SWF); |
|---|
| 21 |
$tempFile->close(); |
|---|
| 22 |
|
|---|
| 23 |
my %urls = HoneyClient::Agent::Driver::ActiveContent::process( |
|---|
| 24 |
file => $tempFile, |
|---|
| 25 |
base_url => 'http://foo.bar.com', |
|---|
| 26 |
); |
|---|
| 27 |
|
|---|
| 28 |
print "\nURLs:\n"; |
|---|
| 29 |
|
|---|
| 30 |
foreach (sort keys %urls) { |
|---|
| 31 |
print "\t$_\n"; |
|---|
| 32 |
} |
|---|
| 33 |
|
|---|
| 34 |
use Data::Dumper; |
|---|
| 35 |
$Data::Dumper::Terse = 0; |
|---|
| 36 |
$Data::Dumper::Indent = 1; |
|---|
| 37 |
print Dumper(\%urls) . "\n"; |
|---|