Changeset 225

Show
Ignore:
Timestamp:
03/09/07 14:59:28 (2 years ago)
Author:
kindlund
Message:

Finished integration testing; about to merge into trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/flindiakos-multi_urls/bin/StartManager.pl

    r224 r225  
    3030my $urllist= ""; 
    3131 
     32# TODO: Need --help option, along with sanity checking. 
     33# TODO: Also need a decent POD for this code. 
    3234GetOptions('driver=s'             => \$driver, 
    3335           'master_vm_config=s'   => \$config, 
     
    4648 
    4749# 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  
    5051chomp @urls; 
    5152my $firsturl = shift @urls; 
    52 my @remaining_urls; 
     53my %remaining_urls; 
    5354foreach(@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; 
    5559} 
    5660 
    57 print Dumper($firsturl) . "\n"; 
    58 print Dumper(@remaining_urls) . "\n"; 
     61my $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                 ); 
    5974 
    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 the 
    67 #                            # first 5 links for each domain. 
    68 #                            max_relative_links_to_visit => $maxrel, 
    69 #                            links_to_visit => { @remaining_urls } 
    70 #                         }, 
    71 #                    })),  
    72 #                 ); 
    73