Changeset 224

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

Integration testing.

Files:

Legend:

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

    r202 r224  
    1515use MIME::Base64 qw(encode_base64 decode_base64); 
    1616 
    17 # Include Getoptions parser 
     17# Include Getopt Parser 
    1818use Getopt::Long; 
    1919 
     
    3030my $urllist= ""; 
    3131 
    32 GetOptions(    'driver=s'  => \$driver, 
    33                        'config=s'  => \$config, 
    34                        'urllist=s' => \$urllist, 
    35                        'maxrel=i'  => \$maxrel ); 
     32GetOptions('driver=s'             => \$driver, 
     33           'master_vm_config=s'   => \$config, 
     34           'url_list=s'           => \$urllist, 
     35           'max_relative_links:i' => \$maxrel); 
    3636 
    3737# Go through the list of urls to create the array 
     
    4141push( @urls, @ARGV );  
    4242if( -e $urllist ){ 
    43    open URL, $urllist; 
    44    push(@urls, <URL>); 
     43    open URL, $urllist; 
     44    push(@urls, <URL>); 
    4545} 
    4646 
     
    5252my @remaining_urls; 
    5353foreach(@urls){ 
    54     push(@remaining_urls,($_,1));    
     54    push(@remaining_urls,($_,1));     
    5555} 
    5656 
    57 my $agentState = HoneyClient::Manager->run( 
    58                     driver           => $driver, # Change to 'IE' or 'FF' 
    59                     master_vm_config => $config, 
    60                     agent_state      => encode_base64(nfreeze({ 
    61                         $driver => { # Change to 'IE' or 'FF' 
    62                             next_link_to_visit => $firsturl, 
    63                             # Enable this line, if you want to only go to the 
    64                             # first 5 links for each domain. 
    65                             max_relative_links_to_visit => $maxrel, 
    66                                                         links_to_visit => { @remaining_urls } 
    67                          }, 
    68                     })),  
    69                  ); 
     57print Dumper($firsturl) . "\n"; 
     58print Dumper(@remaining_urls) . "\n"; 
    7059 
     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