# Getting Passed SSL Warnings on ExploitDB Scripts for OSCP

By [int0x33](https://paragraph.com/@int0x33) · 2021-11-15

---

Here is code that allows you to bypass SSL warnings for OSCP

    import urllib2
    import ssl
    
    ctx = ssl.create_default_context()
    ctx.check_hostname = False
    ctx.verify_mode = ssl.CERT_NONE
    
    urllib2.urlopen("https://your-test-server.local", context=ctx)
    

The key lines are as follows:

    ctx = ssl.create_default_context()
    ctx.check_hostname = False
    ctx.verify_mode = ssl.CERT_NONE
    

This is the same as -k with curl and –no-check-certificate for wget.

---

*Originally published on [int0x33](https://paragraph.com/@int0x33/getting-passed-ssl-warnings-on-exploitdb-scripts-for-oscp)*
