Changeset 654
- Timestamp:
- 07/17/07 16:18:39 (1 year ago)
- Files:
-
- honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent.pm (modified) (1 diff)
- honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent/Flash.pm (modified) (2 diffs)
- honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/Browser.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent.pm
r640 r654 183 183 184 184 # Make sure a base URL is defined 185 unless (defined($args{' base_url'})) {186 $LOG->fatal("No baseURL provided!");187 Carp::croak "Error: No baseURL provided!";185 unless (defined($args{'url'})) { 186 $LOG->fatal("No URL provided!"); 187 Carp::croak "Error: No URL provided!"; 188 188 } 189 189 honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/ActiveContent/Flash.pm
r640 r654 94 94 use HoneyClient::Util::Config qw(getVar); 95 95 96 # Include URL Parsing Library 97 use URI::URL; 98 96 99 =pod 97 100 … … 196 199 my %args = @_; 197 200 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(); 199 213 # Chop any trailing slash off the base URL 200 $base_url = $args{'base_url'};201 214 $base_url =~ s/\/$//; 202 215 honeyclient/branches/exp/jpuchalski-active_content/lib/HoneyClient/Agent/Driver/Browser.pm
r653 r654 647 647 648 648 # Get the hostname supplied. 649 #XXX: Delete these.650 $LOG->info("_extractHostname: " . URI::URL->new($arg)->authority());651 649 return URI::URL->new($arg)->authority(); 652 650 } … … 773 771 $link = $url->canonical()->as_string(); 774 772 775 # XXX: Delete this.776 $LOG->info("_validateLink: " . $link);777 778 773 # First, check to see if the link is either an 779 774 # "http://" or "https://" URL. 780 775 unless (is_uri($link) && is_web_uri($link)) { 781 776 782 # XXX: Delete this.783 $LOG->info("_validateLink: NOT VALID");784 777 # The link is invalid, so we check to see if it's already 785 778 # in our 'links_ignored' history. … … 797 790 return ""; 798 791 } 799 # XXX: Delete this.800 $LOG->info("_validateLink: VALID");801 792 802 793 # Next, we check to see if we've already visited or ignored this … … 1058 1049 %scored_links = HoneyClient::Agent::Driver::ActiveContent::process( 1059 1050 file => $tempFile, 1060 base_url => $base,1051 url => $args{'url'}, 1061 1052 ); 1062 1053 # TODO: Check to make sure that temp files are getting deleted
