Skip to content

Instantly share code, notes, and snippets.

@dhutty
Created October 26, 2016 13:20
Show Gist options
  • Save dhutty/75b4d1b4f9da359cb71811d692dd169d to your computer and use it in GitHub Desktop.
Save dhutty/75b4d1b4f9da359cb71811d692dd169d to your computer and use it in GitHub Desktop.
try:
logging.debug('Connecting to %s' % (url, ))
sslcontext = ssl.create_default_context()
sslcontext.load_verify_locations("/etc/ssl/certs/ca-bundle.crt")
sslcontext.load_verify_locations("/etc/ssl/certs/ca-bundle.trust.crt")
try:
if args.no_verify:
sslcontext.check_hostname = False
zap.urlopen(url, context=sslcontext)
except ssl.SSLError as e:
logging.error("SSL Error: %s" % (e.reason, ))
sys.exit(1)
except:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment