Skip to content

Commit 367db75

Browse files
TaroballzTaroballz
authored andcommitted
solve the SSL cert verify failed issue
1 parent 3fa6cfb commit 367db75

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ghdb_scraper.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ def retrieve_google_dorks(
6363
}
6464

6565
print(f"[+] Requesting URL: {url}")
66-
response = requests.get(url, headers=headers, timeout=10)
66+
try:
67+
response = requests.get(url, headers=headers, timeout=10)
68+
except requests.exceptions.SSLError:
69+
import urllib3
70+
requests.packages.urllib3.disable_warnings()
71+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
72+
response = requests.get(url, headers=headers, timeout=10, verify=False)
6773

6874
if response.status_code != 200:
6975
print(f"[-] Error retrieving google dorks from: {url}")

0 commit comments

Comments
 (0)