codingo / VHostScan

A virtual host scanner that performs reverse lookups, can be used with pivot tools, detect catch-all scenarios, work around wildcards, aliases and dynamic default pages.
GNU General Public License v3.0
1.2k stars 231 forks source link

Add support for random user agent and specified agent (#41) #48

Closed DeKaN closed 7 years ago

codingo commented 7 years ago

Got the following exception when testing this:

+-+-+-+-+-+-+-+-+-+  v. 1.3
|V|H|o|s|t|S|c|a|n|  Developed by @codingo_ & @__timk
+-+-+-+-+-+-+-+-+-+  https://github.com/codingo/VHostScan

[+] Starting virtual host scan for <redacted> using port 80 and wordlists: ./wordlists/virtual-host-scanning.txt
[>] Ignoring HTTP codes: 404
Traceback (most recent call last):
  File "./VHostScan.py", line 113, in <module>
    main()
  File "./VHostScan.py", line 99, in main
    scanner.scan()
  File "/root/source/testing/VHostScan/lib/core/virtual_host_scanner.py", line 74, in scan
    'User-Agent': random.choice(self.user_agents),
  File "/usr/lib/python2.7/random.py", line 275, in choice
    return seq[int(self.random() * len(seq))]  # raises IndexError if seq is empty
IndexError: list index out of range

Having a look into this now but potentially something stands out to you @DeKaN? Only passed a target.

DeKaN commented 7 years ago

@codingo Fixed

codingo commented 7 years ago

Thank-you @DeKaN - I've added the hacktoberfest (hacktoberfest.digitalocean.com) tag for you and added your changes to the master readme.