File tree 2 files changed +13
-7
lines changed
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
import sys
5
+ import dns .resolver
5
6
from argparse import ArgumentParser
6
- from dns .resolver import Resolver
7
7
from socket import gethostbyaddr
8
8
from lib .core .virtual_host_scanner import *
9
9
from lib .helpers .output_helper import *
@@ -86,11 +86,17 @@ def main():
86
86
print ("[>] First hit is set." )
87
87
88
88
if not arguments .no_lookup :
89
- for ip in Resolver ().query (arguments .target_hosts , 'A' ):
90
- host , aliases , ips = gethostbyaddr (str (ip ))
91
- wordlist .append (str (ip ))
92
- wordlist .append (host )
93
- wordlist .extend (aliases )
89
+ try :
90
+ print ("[+] Resolving DNS for additional wordlist entries" )
91
+ for ip in dns .resolver .query (arguments .target_hosts , 'A' ):
92
+ host , aliases , ips = gethostbyaddr (str (ip ))
93
+ wordlist .append (str (ip ))
94
+ wordlist .append (host )
95
+ wordlist .extend (aliases )
96
+ except (dns .resolver .NXDOMAIN ):
97
+ print ("[!] Couldn't find any records (NXDOMAIN)" )
98
+ except (dns .resolver .NoAnswer ):
99
+ print ("[!] Couldn't find any records (NoAnswer)" )
94
100
95
101
scanner_args = vars (arguments )
96
102
scanner_args .update ({
Original file line number Diff line number Diff line change 2
2
# |V|H|o|s|t|S|c|a|n| Developed by @codingo_ & @__timk
3
3
# +-+-+-+-+-+-+-+-+-+ https://github.com/codingo/VHostScan
4
4
5
- __version__ = '1.6.2 '
5
+ __version__ = '1.6.3 '
You can’t perform that action at this time.
0 commit comments