forked from pentestmonkey/yaptest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaptest-dns.pl
executable file
·59 lines (50 loc) · 1.54 KB
/
yaptest-dns.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
48
49
50
51
52
53
54
55
56
57
58
#!/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
Performs some misc tests on hosts in the backend database which
have port 53 UDP or TCP open.
NB: dig is required to be in the path.
";
die $usage if shift;
my $y = yaptest->new();
# Recursive lookups (assuming host is connected to Internet)
$y->run_test(
command => 'dig @::IP:: A google.com',
filter => { port => 53, transport_protocol => 'udp' },
output_file => 'dns-recursive-lookup-::IP::.out',
parallel_processes => 10,
parser => 'yaptest-parse-dns.pl'
);
$y->run_test(
command => 'dig @::IP:: A localhost',
filter => { port => 53, transport_protocol => 'udp' },
output_file => 'dns-recursive-lookup-::IP::.out',
parallel_processes => 10,
parser => 'yaptest-parse-dns.pl'
);
$y->run_test(
command => 'dig @::IP:: authors.bind chaos txt',
filter => { port => 53, transport_protocol => 'udp' },
output_file => 'dns-authors.bind-lookup-::IP::.out',
parallel_processes => 10,
parser => 'yaptest-parse-dns.pl'
);
$y->run_test(
command => 'dig @::IP:: version.bind chaos txt',
filter => { port => 53, transport_protocol => 'udp' },
output_file => 'dns-version.bind-lookup-::IP::.out',
parallel_processes => 10,
parser => 'yaptest-parse-dns.pl'
);
$y->run_test(
command => 'dig @::IP:: hostname.bind. chaos txt',
filter => { port => 53, transport_protocol => 'udp' },
output_file => 'dns-hostname.bind-lookup-::IP::.out',
parallel_processes => 10,
parser => 'yaptest-parse-dns.pl'
);