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

Improvement for issue #178 in beeswithmachineguns, no helpful informa… #199

Open
wants to merge 1 commit 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
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