root/honeyclient/branches/exp/kindlund-strace/auto_drive.pl

Revision 1640, 1.1 kB (checked in by kindlund, 5 months ago)

Last update of test script. Going to freeze further development, since STRACE support seems to yield unpredicatable BSO
DS and application crashes (Dr. Watson logs). If development is continued further, then we'd need to update the VM::Clo
ne object to support the new 'work_status' field (i.e., completed, timed_out).

Line 
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6   use HoneyClient::Util::SOAP qw(getClientHandle);
7   use Data::Dumper;
8   use MIME::Base64 qw(encode_base64 decode_base64);
9   use Storable qw(thaw);
10   #$Storable::Deparse = 1;
11   #$Storable::Eval = 1;
12   $Data::Dumper::Indent = 2;
13   $Data::Dumper::Terse = 0;
14
15   # Create a new SOAP client, to talk to the HoneyClient::Agent
16   # module.
17   my $stub = getClientHandle(namespace => "HoneyClient::Agent",
18                              address   => "localhost");
19   my $som;
20
21   # Get the properties of the Agent OS and driven application.
22   $som = $stub->getProperties(driver_name => "HoneyClient::Agent::Driver::Browser::IE");
23   print Dumper($som->result()) . "\n";
24
25   # Drive HoneyClient::Agent::Driver::Browser::IE to a website.
26   $som = $stub->drive(driver_name => "HoneyClient::Agent::Driver::Browser::IE",
27                       parameters  => encode_base64("http://www.google.com"));
28
29   # Check the result to see if any compromise was found.
30   # Look for the 'fingerprint' key in the resulting hastable.
31   print Dumper(thaw(decode_base64($som->result()))) . "\n";
Note: See TracBrowser for help on using the browser.