@@ -65,6 +65,8 @@ def util_checks(util=None):
65
65
def main ():
66
66
parser = CliArgumentParser ()
67
67
arguments = parser .parse (sys .argv [1 :])
68
+ dns_servers = ''
69
+
68
70
69
71
if arguments .output_directory .endswith ('/' or '\\ ' ):
70
72
arguments .output_directory = arguments .output_directory [:- 1 ]
@@ -96,29 +98,20 @@ def main():
96
98
97
99
if arguments .find_dns_servers is True :
98
100
print ("[#] Identifying DNS Servers" )
99
- find_dns (
101
+ dns_servers = find_dns (
100
102
arguments .target_hosts ,
101
103
arguments .output_directory ,
102
104
arguments .quiet )
103
105
104
106
if arguments .perform_service_scan is True :
105
107
print ("[#] Performing service scans" )
106
- if arguments .find_dns_servers is True :
107
- service_scan (
108
- arguments .target_hosts ,
109
- arguments .output_directory ,
110
- arguments .find_dns_servers ,
111
- arguments .quiet ,
112
- arguments .quick ,
113
- arguments .no_udp_service_scan )
114
- else :
115
- service_scan (
116
- arguments .target_hosts ,
117
- arguments .output_directory ,
118
- '' ,
119
- arguments .quiet ,
120
- arguments .quick ,
121
- arguments .no_udp_service_scan )
108
+ service_scan (
109
+ arguments .target_hosts ,
110
+ arguments .output_directory ,
111
+ dns_servers ,
112
+ arguments .quiet ,
113
+ arguments .quick ,
114
+ arguments .no_udp_service_scan )
122
115
123
116
if arguments .perform_snmp_walk is True :
124
117
print ("[#] Performing SNMP walks" )
0 commit comments