Skip to content
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

Added jamesbrine threat feed and parser #2396

Closed
wants to merge 4 commits into from

Conversation

referefref
Copy link

@referefref referefref commented Aug 14, 2023

Commits

Added parser for jamesbrine threat feed
Added threat feed to feeds.yaml

Commit Messages

Changes detailed in commit messages. Added parser instead of generic_csv due to date field not including timestamp, parser adds 00:00UTC.

Description

Thanks

Added parser for jamesbrine.com.au threat feed
Added jamesbrine.com.au feed and parser reference
Copy link
Member

@sebix sebix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution.

Could you please add some tests? They would have shown some errors already

Comment on lines +7 to +9
import dateutil.parser
import posixpath
from urllib.parse import urlparse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these imports for?

"""

def parse_line(self, line, report):
if line.startswith('#') or len(line) == 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wong indentation

intelmq/etc/feeds.yaml Outdated Show resolved Hide resolved

def parse_line(self, line, report):
if line.startswith('#') or len(line) == 0:
self.tempdata.append(line)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.tempdata is never used. Did you intend to write your own recover_line method and using that one for raw?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the intention. I've decided instead to adapt the csv endpoint instead such that a customer parser is not required and will be closing this PR.

@sebix sebix added feature Indicates new feature requests or new features component: bots labels Aug 22, 2023
@referefref
Copy link
Author

CSV endpoint will be modified instead such that a custom parser is not required. PR will be closed and another opened when this has been completed and tested.

@referefref referefref closed this Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: bots feature Indicates new feature requests or new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants