Skip to content

Commit cffda19

Browse files
committed
Added suppport to disable SSL verification
1 parent 53d70cc commit cffda19

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ them to `pagodo`
220220
Pass a comma separated string of proxies to `pagodo` using the `-p` switch.
221221

222222
```bash
223-
python pagodo.py -g dorks.txt -p https://myproxy:8080,socks5h://127.0.0.1:9050,socks5h://127.0.0.1:9051
223+
python pagodo.py -g dorks.txt -p http://myproxy:8080,socks5h://127.0.0.1:9050,socks5h://127.0.0.1:9051
224224
```
225225

226226
You could even decrease the `-i` and `-x` values because you will be leveraging different proxy IPs. The proxies passed

pagodo.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Custom Python libraries.
1818

19-
__version__ = "2.0.0"
19+
__version__ = "2.1.0"
2020

2121
# Logging
2222
ROOT_LOGGER = logging.getLogger("pagodo")
@@ -47,6 +47,7 @@ def __init__(
4747
save_urls_to_file=False,
4848
minimum_delay_between_dork_searches_in_seconds=37,
4949
maximum_delay_between_dork_searches_in_seconds=60,
50+
disable_verify_ssl=False,
5051
verbosity=4,
5152
):
5253
"""Initialize Pagodo class object."""
@@ -89,6 +90,7 @@ def __init__(
8990
self.save_urls_to_file = save_urls_to_file
9091
self.minimum_delay_between_dork_searches_in_seconds = minimum_delay_between_dork_searches_in_seconds
9192
self.maximum_delay_between_dork_searches_in_seconds = maximum_delay_between_dork_searches_in_seconds
93+
self.disable_verify_ssl = disable_verify_ssl
9294
self.verbosity = verbosity
9395

9496
# Fancy way of generating a list of 20 random values between minimum_delay_between_dork_searches_in_seconds and
@@ -197,6 +199,7 @@ def go(self):
197199
# Max desired valid URLs to collect per dork.
198200
max_search_result_urls_to_return=self.max_search_result_urls_to_return_per_dork,
199201
proxy=proxy,
202+
verify_ssl=not self.disable_verify_ssl,
200203
verbosity=self.verbosity,
201204
)
202205

@@ -261,6 +264,12 @@ def go(self):
261264
except Exception as e:
262265
ROOT_LOGGER.error(f"Error with dork: {dork}")
263266
ROOT_LOGGER.error(f"EXCEPTION: {e}")
267+
if type(e).__name__ == "SSLError" and (not self.disable_verify_ssl):
268+
ROOT_LOGGER.info(
269+
"If you are using self-signed certificates for an HTTPS proxy, try-rerunning with the -l "
270+
"switch to disable verifying SSL/TLS certificates. Exiting..."
271+
)
272+
sys.exit(1)
264273

265274
dork_counter += 1
266275

@@ -318,6 +327,14 @@ def go(self):
318327
default=60,
319328
help="Maximum delay (in seconds) between a Google dork search. Default: 60",
320329
)
330+
parser.add_argument(
331+
"-l",
332+
dest="disable_verify_ssl",
333+
action="store_true",
334+
required=False,
335+
default=False,
336+
help="Disable SSL/TLS validation. Sometimes required if using an HTTPS proxy with self-signed certificates.",
337+
)
321338
parser.add_argument(
322339
"-m",
323340
dest="max_search_result_urls_to_return_per_dork",

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
beautifulsoup4==4.9.3
2-
colorama==0.4.4
3-
yagooglesearch==1.1.0
2+
yagooglesearch==1.2.0
43
requests==2.26.0

0 commit comments

Comments
 (0)