Ticket #52 (closed improvement: fixed)

Opened 2 years ago

Last modified 1 year ago

Improve StartManager.pl to handle multiple URLs from a specified text file

Reported by: kindlund Assigned to: flindiakos
Priority: normal Milestone: 1.0
Component: HoneyClient::Manager Version: none
Severity: minor Keywords: manager, urls, multiple
Cc:

Description

Currently, the StartManager.pl script accepts a user-specified URL to start the honeyclient drive operations. So, the command format looks something like this:

%/$HC_TRUNK_DIR/src/trunk/bin/StartManager.pl http://www.cnn.com

We want to have StartManager.pl be able to read in a list of URLs. This list of URLs can be in a text file format, like 'urllist.txt', and that file can be in the same directory StartManager.pl is located in. The new command can look something like this:

%/$HC_TRUNK_DIR/src/trunk/bin/StartManager.pl urllist.txt

or

%/$HC_TRUNK_DIR/src/trunk/bin/StartManager.pl

(where you're specifying a text file to read in for the run() function in $agentState portion of StartManager.pl script) Programmatically, if you have a URLs list (URLlist.txt) with these three items in it:

foo
bar
baz

then, you would want the $agentState part of StartManager.pl to look something like this:

my $agentState = HoneyClient::Manager->run(
    driver => 'IE', # Change to 'IE' or 'FF'
    master_vm_config => '/vm/Agent.Master-7/winXPPro.cfg',
    agent_state => encode_base64(nfreeze({
        IE => { # Change to 'IE' or 'FF'
        next_link_to_visit => foo,
        # Enable this line, if you want to only go to the
        # first 5 links for each domain.
        max_relative_links_to_visit => 5,
        links_to_visit => {
            'bar' => 1,
            'baz' => 1,
        },
    },
})),
);

As for testing out the modifications you will make to StartManager.pl, it would probably be easiest/fastest if you made the changes to StartManager.pl, and checked in your changes (please create an experimental branch for your stuff first, though). Then we can test the changes in the environment we've already set up. This means you won't have to set up an Agent side of the honeyclient.

Attachments

Change History

04/09/07 15:46:09 changed by kindlund

Developed initial support in StartManager.pl. Still have to update the script with further documentation, comments, and command-line features (i.e., —version).

09/25/07 11:13:00 changed by xkovah

  • status changed from new to closed.
  • resolution set to fixed.

Pretty sure this is long obsolete and already handled by our current code. It can be reopened if this is not the case.


Add/Change #52 (Improve StartManager.pl to handle multiple URLs from a specified text file)




Change Properties
Action