Changeset 225 for honeyclient/branches/exp/flindiakos-multi_urls/bin
- Timestamp:
- 03/09/07 14:59:28 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/flindiakos-multi_urls/bin/StartManager.pl
r224 r225 30 30 my $urllist= ""; 31 31 32 # TODO: Need --help option, along with sanity checking. 33 # TODO: Also need a decent POD for this code. 32 34 GetOptions('driver=s' => \$driver, 33 35 'master_vm_config=s' => \$config, … … 46 48 47 49 # Get the first url from the list 48 # Create an array in the form: url => 1 for links_to_visit 49 # I did it this way to keep the same order 50 # Create a hashtable in the form: url => 1 for links_to_visit 50 51 chomp @urls; 51 52 my $firsturl = shift @urls; 52 my @remaining_urls;53 my %remaining_urls; 53 54 foreach(@urls){ 54 push(@remaining_urls,($_,1)); 55 # We assign our initial list of URLs a priority of 1000, so that 56 # they'll be (likely to be) selected first, before going to any other 57 # external URLs found from subsequent drive operations. 58 $remaining_urls{$_} = 1000; 55 59 } 56 60 57 print Dumper($firsturl) . "\n"; 58 print Dumper(@remaining_urls) . "\n"; 61 my $agentState = HoneyClient::Manager->run( 62 driver => $driver, # Change to 'IE' or 'FF' 63 master_vm_config => $config, 64 agent_state => encode_base64(nfreeze({ 65 $driver => { # Change to 'IE' or 'FF' 66 next_link_to_visit => $firsturl, 67 # Enable this line, if you want to only go to the 68 # first 5 links for each domain. 69 max_relative_links_to_visit => $maxrel, 70 links_to_visit => \%remaining_urls, 71 }, 72 })), 73 ); 59 74 60 #my $agentState = HoneyClient::Manager->run(61 # driver => $driver, # Change to 'IE' or 'FF'62 # master_vm_config => $config,63 # agent_state => encode_base64(nfreeze({64 # $driver => { # Change to 'IE' or 'FF'65 # next_link_to_visit => $firsturl,66 # # Enable this line, if you want to only go to the67 # # first 5 links for each domain.68 # max_relative_links_to_visit => $maxrel,69 # links_to_visit => { @remaining_urls }70 # },71 # })),72 # );73
