achillean / shodan-python

The official Python library for Shodan
https://developer.shodan.io
Other
2.47k stars 552 forks source link

Allow users to specify certificate bundles or ssl verification = False #173

Open JohnOmernik opened 2 years ago

JohnOmernik commented 2 years ago

In requests, users can specify on requests the "verify" variable as either a path to a certificate bundle, or the boolean value False for actually verify certificates.

Allowing the user to specify this upon connection would be very useful for those who may use a corporate proxy and need to run a separate cert bundle or are lazy and just set it to False. By instantiating the requests inside the client Class, it hides that option for the user. Maybe even just providing an option kwargs would be sufficient. (incase you want to use any other options of requests).

I looked at the code, and was considering offering a pull request, but I see requests being used in many of the various python files here. Sometime it's used by instantiating a requests.Session (which you can specify the verify value on so all subsequent requests use that) or you can just pass it to the .request (or the .get, or .post etc) methods for those modules that don't use the requests.Session. Since the usage is different through out the repo, I thought I'd raise an issue and request (no pun intended) someone more knowledgeable of the package itself update it.