-
Notifications
You must be signed in to change notification settings - Fork 308
Added Shodan Alert API Collector #2618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
test will succeed with #2619 |
raise ValueError("Library 'shodan' is needed but not installed.") | ||
|
||
self.set_request_parameters() | ||
if tuple(int(v) for v in pkg_resources.get_distribution("shodan").version.split('.')) <= (1, 8, 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Looks like
pkg_resources
is not imported - It's deprecated anyway, and will be gone soon, please use replacements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Let's add this check to
check
method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IntelMQ uses pkg_resources
a lot, so to get rid of it, we will need to change a few more code lines.
For the sake of consistency and not to introduce deviant code, I'd like to keep pkg_resources
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add this check to
check
method
Good idea, but the static check method can't call the non-static self.set_request_parameters()
which processes and provides the proxy parameters :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you don't need proxy to check the library version, just extract checking to a static method. Or is there a kind of import/patching race condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, I'd still suggest adding the check method with lib version check :)
c5de2cf
to
059adfc
Compare
I don't yet know what causes the tests fail about the EDIT: Yep, was exactly that 🙈 |
4820306
to
25fd943
Compare
In cooperation with Malawi CERT
Created in cooperation with Malawi CERT