Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virus total api key #322

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sublist3r.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
# Check if we are running this on windows platform
is_windows = sys.platform.startswith('win')

# API Keys
vito_apikey = None

# Console Colors
if is_windows:
# Windows deserves coloring too :D
Expand Down Expand Up @@ -103,6 +106,7 @@ def parse_args():
parser.add_argument('-e', '--engines', help='Specify a comma-separated list of search engines')
parser.add_argument('-o', '--output', help='Save the results to text file')
parser.add_argument('-n', '--no-color', help='Output without color', default=False, action='store_true')
parser.add_argument('-vito_apikey', '--virustotal_apikey', help='Virustotal API Key')
return parser.parse_args()


Expand Down Expand Up @@ -685,6 +689,10 @@ def __init__(self, domain, subdomains=None, q=None, silent=False, verbose=True):

# the main send_req need to be rewritten
def send_req(self, url):
global vito_apikey

headers = dict(self.headers)
headers['x-apikey'] = vito_apikey
try:
resp = self.session.get(url, headers=self.headers, timeout=self.timeout)
except Exception as e:
Expand Down Expand Up @@ -987,6 +995,8 @@ def main(domain, threads, savefile, ports, silent, verbose, enable_bruteforce, e


def interactive():
global vito_apikey

args = parse_args()
domain = args.domain
threads = args.threads
Expand All @@ -995,6 +1005,7 @@ def interactive():
enable_bruteforce = args.bruteforce
verbose = args.verbose
engines = args.engines
vito_apikey = args.virustotal_apikey
if verbose or verbose is None:
verbose = True
if args.no_color:
Expand Down