Skip to content
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
18 changes: 11 additions & 7 deletions beeswithmachineguns/bees.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,17 @@ def _sting(params):
for key, value in list(dict_headers.items()):
request.add_header(key, value)

if url.lower().startswith("https://") and hasattr(ssl, '_create_unverified_context'):
context = ssl._create_unverified_context()
response = urlopen(request, context=context)
else:
response = urlopen(request)

response.read()
try:
if url.lower().startswith("https://") and hasattr(ssl, '_create_unverified_context'):
context = ssl._create_unverified_context()
response = urlopen(request, context=context)
else:
response = urlopen(request)
response.read()
except Exception as e:
sys.stderr.write("HTTP Error received while stinging URL: %s\n" % str(e))
sys.stderr.write(" Stinging may have resulted in uninteded results, proceeding...\n")
return None


def _attack(params):
Expand Down