Skip to content

Commit 37a3815

Browse files
committed
Added --no-lookups flag
1 parent 8eb17c7 commit 37a3815

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

VHostScan.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ def main():
3030
parser.add_argument('--unique-depth', dest='unique_depth', type=int, help='Show likely matches of page content that is found x times (default 1).', default=1)
3131
parser.add_argument("--ssl", dest="ssl", action="store_true", help="If set then connections will be made over HTTPS instead of HTTP (default http).", default=False)
3232
parser.add_argument("--fuzzy-logic", dest="fuzzy_logic", action="store_true", help="If set then fuzzy match will be performed against unique hosts (default off).", default=False)
33+
parser.add_argument("--no-lookups", dest="no_lookup", action="store_true", help="Disable reverse lookups (identifies new targets and appends to wordlist).", default=False)
3334
parser.add_argument("--rate-limit", dest="rate_limit", type=int, help='Amount of time in seconds to delay between each scan (default 0).', default=0)
3435
parser.add_argument("--waf", dest="add_waf_bypass_headers", action="store_true", help="If set then simple WAF bypass headers will be sent.", default=False)
3536
parser.add_argument("-oN", dest="output_normal", help="Normal output printed to a file when the -oN option is specified with a filename argument." )
3637
parser.add_argument("-", dest="stdin", action="store_true", help="By passing a blank '-' you tell VHostScan to expect input from stdin (pipe).", default=False)
37-
38+
3839
arguments = parser.parse_args()
3940
wordlist = list()
4041

@@ -80,11 +81,12 @@ def main():
8081
if(arguments.ignore_content_length > 0):
8182
print("[>] Ignoring Content length: %s" % (arguments.ignore_content_length))
8283

83-
for ip in Resolver().query(arguments.target_hosts, 'A'):
84-
host, aliases, ips = gethostbyaddr(str(ip))
85-
wordlist.append(str(ip))
86-
wordlist.append(host)
87-
wordlist.extend(aliases)
84+
if not arguments.no_lookup:
85+
for ip in Resolver().query(arguments.target_hosts, 'A'):
86+
host, aliases, ips = gethostbyaddr(str(ip))
87+
wordlist.append(str(ip))
88+
wordlist.append(host)
89+
wordlist.extend(aliases)
8890

8991
scanner_args = vars(arguments)
9092
scanner_args.update({'target': arguments.target_hosts, 'wordlist': wordlist})

0 commit comments

Comments
 (0)