| Revision 45,
1.1 KB
checked in by jabra, 4 years ago
(diff) |
|
improved tests for subdomain bruteforce
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | # $Id: BruteForce.pm 14 2009-03-02 01:04:45Z jabra $ |
|---|
| 3 | package t::Test::SubdomainBruteForce; |
|---|
| 4 | |
|---|
| 5 | use base 't::Test'; |
|---|
| 6 | use Test::More; |
|---|
| 7 | use Data::Dumper; |
|---|
| 8 | sub fields : Tests { |
|---|
| 9 | my ($self) = @_; |
|---|
| 10 | |
|---|
| 11 | my $session3 = $self->{parser3}->get_session(); |
|---|
| 12 | my $domainscandetails = $session3->domainscandetails; |
|---|
| 13 | my @domains = @{ $domainscandetails->domains } ; |
|---|
| 14 | my $domain_obj = $domains[0]; |
|---|
| 15 | |
|---|
| 16 | my $subdomain_bf = $domain_obj->subdomain_bruteforce; |
|---|
| 17 | |
|---|
| 18 | is ( $subdomain_bf->starttime, '1236035159', 'startscan'); |
|---|
| 19 | is ( $subdomain_bf->starttimestr, 'Mon Mar 2 18:05:59 2009', 'startscanstr'); |
|---|
| 20 | is ( $subdomain_bf->endtime, '1236035249', 'endscan'); |
|---|
| 21 | is ( $subdomain_bf->endtimestr, 'Mon Mar 2 18:07:29 2009', 'endscanstr'); |
|---|
| 22 | is ( $subdomain_bf->elasptime, '90', 'elasp'); |
|---|
| 23 | my @result = @{$subdomain_bf->nodes}; |
|---|
| 24 | my $node1 = $result[0]; |
|---|
| 25 | my $node2 = $result[1]; |
|---|
| 26 | is ( $node1->hostname, 'imap01.spy.metasploit.com' , 'imap01.spy.metasploit.com'); |
|---|
| 27 | is ( $node2->hostname, '95737247883.spy.metasploit.com' , 'imap01.spy.metasploit.com'); |
|---|
| 28 | |
|---|
| 29 | } |
|---|
| 30 | 1; |
|---|
Note: See
TracBrowser
for help on using the repository browser.