Changeset 218

Show
Ignore:
Timestamp:
03/07/07 16:53:35 (2 years ago)
Author:
kindlund
Message:

Integration testing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent.pm

    r217 r218  
    8787use URI::URL; 
    8888use HoneyClient::Agent::Driver::ActiveContent::Flash qw(extract); 
     89use File::Temp; 
    8990 
    9091####################################################################### 
     
    107108 
    108109  # Sanity check: make sure the URL points to a resource we understand  
    109   if ($args{'file'} =~ /\.swf$/) { 
     110  if ($args{'file'}->filename =~ /\.swf$/) { 
    110111    my %urls = HoneyClient::Agent::Driver::ActiveContent::Flash::extract(%args); 
    111112    return %urls; 
  • honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent/Flash.pm

    r217 r218  
    8686 
    8787use URI::URL; 
     88use File::Temp; 
    8889 
    8990####################################################################### 
     
    121122 
    122123  # Call flasm and capture the output in an array 
    123   my @bytecode = `./thirdparty/flasm/flasm.exe -d $args{'file'}`; 
     124  my $filename = $args{'file'}->filename; 
     125  my @bytecode = `./thirdparty/flasm/flasm.exe -d $filename`; 
    124126 
    125127  # Parse out lines that contain the getURL method 
  • honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/Browser.pm

    r217 r218  
    237237# TODO: Need unit testing. 
    238238use URI::URL; 
     239 
     240# TODO: Need unit testing. 
     241use File::Temp qw(tempfile); 
    239242 
    240243=pod 
     
    10051008 
    10061009            # TODO: Save content to a temp file on disk. 
     1010            my $tempFile = new File::Temp(SUFFIX => '.swf'); 
     1011            print $tempFile $content; 
     1012            $tempFile->close(); 
    10071013 
    10081014            %scored_links = HoneyClient::Agent::Driver::ActiveContent::process( 
    1009                                 file     => "t/test_flash/welcome.swf"
    1010                                 base_url => $base, 
     1015                                file        => $tempFile
     1016                                base_url    => $base, 
    10111017                            ); 
    10121018