forked from pentestmonkey/yaptest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaptest-enum4linux.pl
executable file
·35 lines (29 loc) · 999 Bytes
/
yaptest-enum4linux.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
#!/usr/bin/env perl
use strict;
use warnings;
use POSIX;
use yaptest;
use File::Basename;
my $script_name = basename($0);
my $usage = "Usage: $script_name
Runs enum4linux IPs in database with ports 139 or 445/TCP open.
A dictionary of share names is required. This can be configured
with yaptest-config.pl:
\$ yaptest-config.pl query dict_smb_shares
\$ yaptest-config.pl set dict_smb_shares /home/u/dicts/smb_shares.txt
NB: enum4linux is required to be in the path.
";
die $usage if shift;
my $y = yaptest->new();
my $share_file = $y->get_config('dict_smb_shares');
unless (defined($share_file)) {
print "ERROR: No dictionary has been configured for enum4linux.\n";
die $usage;
}
$y->run_test(
command => "enum4linux.pl -a -d -R 500-550,1000-1150 -s $share_file ::IP::",
filter => { port => [139, 445], transport_protocol => 'tcp' },
parallel_processes => 10,
output_file => 'enum4linux-::IP::.out',
parser => "yaptest-parse-enum4linux.pl"
);