Closed scolby33 closed 6 years ago
I don't think monkey patch - just override the functions in our inherited version of the class... maybe re-write bits?
If you want to add hooks in then it might even be a good idea to refactor the class and make a PR to them
The Censys api creates a requests.Session()
here. It should be easy to update the headers with the new User-Agent just like they do on line 62.
Perhaps we should also use a Session
in server_query
and the cli
to manage the headers.
P.S. I tried just putting the link in, but I guess code snippets only work on your own repo.
I'll change this for our usages of requests
explicitly but I'll wait on modifying the Censys api stuff until I hear back from the pull request or too much time passes.
Well that was fast! It got merged. Now do we just specify the GitHub commit in setup.py and requirements until they make a release? I think so.
Never mind, that doesn't work. We'll have to wait for a release from Censys' end.
See a5903154ccd6be5404e5929056b893dcb272a4a3
You can specify the git location in requirements not setup.py On Wed 23. Aug 2017 at 22:50, Scott Colby notifications@github.com wrote:
Nevermind, that doesn't work. We'll have to wait for a release from Censys' end.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/scolby33/OCSPdash/issues/12#issuecomment-324458352, or mute the thread https://github.com/notifications/unsubscribe-auth/AE1bqIOOFy9xiW5M3OsjIqka90gzGqSoks5sbJB_gaJpZM4O-PxX .
You can set it in setup.py with some strange contortions.
However, the real problem is if I specify version 0.0.7, then it gets it directly from PyPI. If I make up a version like 0.0.7-dev, then it'll get it from GitHub but then pkg_resources can't verify it's there when running the CLI--it sees a version mismatch.
shrug I'm willing to wait.
Hmm okay i saw what you did. It's wayyy complicated so hopefully they'll make a new release soon
In case something goes terribly wrong and we start taking down other people's servers, it'd be nice if they could know who did it.
Easy to set on the
requests
requests, but might require monkeypatching the Censys API thing to change it there.