Changeset 654

Show
Ignore:
Timestamp:
07/17/07 16:18:39 (1 year 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

    r640 r654  
    183183 
    184184  # Make sure a base URL is defined 
    185   unless (defined($args{'base_url'})) { 
    186     $LOG->fatal("No base URL provided!"); 
    187     Carp::croak "Error: No base URL provided!"; 
     185  unless (defined($args{'url'})) { 
     186    $LOG->fatal("No URL provided!"); 
     187    Carp::croak "Error: No URL provided!"; 
    188188  } 
    189189 
  • honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent/Flash.pm

    r640 r654  
    9494use HoneyClient::Util::Config qw(getVar); 
    9595 
     96# Include URL Parsing Library 
     97use URI::URL; 
     98 
    9699=pod 
    97100 
     
    196199  my %args = @_; 
    197200  my $filename = $args{'file'}->filename; 
    198    
     201  
     202  # Extract the base url.  
     203  my $url = URI::URL->new($args{'url'}); 
     204  $url->fragment(undef); # Kill any bookmarks. 
     205  $url->query(undef);    # Kill any queries. 
     206 
     207  # Kill the last path segment. 
     208  @segments = $url->path_segments(); 
     209  pop(@segments); 
     210  $url->path_segments(@segments); 
     211 
     212  $base_url = $url->canonical()->as_string(); 
    199213  # Chop any trailing slash off the base URL 
    200   $base_url = $args{'base_url'}; 
    201214  $base_url =~ s/\/$//; 
    202215 
  • honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/Browser.pm

    r653 r654  
    647647 
    648648    # Get the hostname supplied. 
    649 #XXX: Delete these. 
    650 $LOG->info("_extractHostname: " . URI::URL->new($arg)->authority()); 
    651649    return URI::URL->new($arg)->authority();     
    652650} 
     
    773771    $link = $url->canonical()->as_string(); 
    774772 
    775 # XXX: Delete this. 
    776 $LOG->info("_validateLink: " . $link); 
    777  
    778773    # First, check to see if the link is either an 
    779774    # "http://" or "https://" URL. 
    780775    unless (is_uri($link) && is_web_uri($link)) { 
    781776 
    782 # XXX: Delete this. 
    783 $LOG->info("_validateLink: NOT VALID"); 
    784777        # The link is invalid, so we check to see if it's already 
    785778        # in our 'links_ignored' history. 
     
    797790        return ""; 
    798791    } 
    799 # XXX: Delete this. 
    800 $LOG->info("_validateLink: VALID"); 
    801792 
    802793    # Next, we check to see if we've already visited or ignored this 
     
    10581049            %scored_links = HoneyClient::Agent::Driver::ActiveContent::process( 
    10591050                                file => $tempFile, 
    1060                                 base_url => $base
     1051                                url  => $args{'url'}
    10611052                            ); 
    10621053            # TODO: Check to make sure that temp files are getting deleted