forked from pentestmonkey/yaptest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaptest-httprint.pl
executable file
·49 lines (38 loc) · 1.28 KB
/
yaptest-httprint.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env perl
use strict;
use warnings;
use POSIX;
use yaptest;
use Getopt::Long;
use File::Basename;
my $max_processes = 5;
my $script_name = basename($0);
my $usage = "Usage: $script_name [options]
Runs httprint on any port in database which nmap thinks are HTTP(S) ports.
NB: httprint is required to be in the path. (http://www.net-square.com/httprint)
A signature file for httprint is also required. Use yaptest-config.pl to
specify its location:
\$ yaptest-config.pl query httprint_sig_file
\$ yaptest-config.pl set httprint_sig_file /usr/local/share/httprint/signatures.txt
";
die $usage if shift;
my $y = yaptest->new();
my $sig_file = $y->get_config('httprint_sig_file');
unless (defined($sig_file)) {
print "ERROR: No Signature file for httprint has been configured.\n";
die $usage;
}
$y->run_test(
command => "httprint -P0 -h http://::IP:::::PORT:: -s $sig_file",
parallel_processes => $max_processes,
filter => { port_info => "nmap_service_name like http", ssl => 0 },
max_lines => 1000,
inactivity_timeout => 180
);
$y->run_test(
command => "httprint -P0 -h https://::IP:::::PORT:: -s $sig_file",
parallel_processes => $max_processes,
filter => { port_info => "nmap_service_name like http", ssl => 1 },
max_lines => 1000,
inactivity_timeout => 180
);