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

Revision 1684, 1.1 kB (checked in by kindlund, 4 months ago)

Final verdict: Toolkit is nice, but way too bloated. The only way it would be useful would be if we could re-use existing IE sessions, but the problem is that Selenium ends up offering 2 different hacks: *piiexplore or *iehta. The *piiexplore route is about 80% there, but it does NOT support gzip compression (which means visiting google.com would fail). The *iehta is nice, but the Scripting Errors dialog box comes up occasionally which halts the entire framework (i.e., cnn.com).

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.cnn.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.