add support for h0neytr4p v0.4#16
Conversation
|
Working on that |
elivlo
left a comment
There was a problem hiding this comment.
I have two minor objections.
Once that's sorted I will approve the PR :)
|
|
||
| h0neytr4p.data('timestamp', datetime.fromisoformat(line['timestamp']).strftime('%Y-%m-%d %H:%M:%S')) | ||
| h0neytr4p.data("timezone", time.strftime('%z')) | ||
| if 'timestamp' in line: |
There was a problem hiding this comment.
Why did you change the timestamp parsing here? The logs for testing do not need that change because they already are in isoformat. I would remove the helper methods, because they are redundant and python datetime is able to do the same.
We drop all alerts that don't contain the timestamp so I would remove the condition.
Let's implement it like that if we don't need the actual timezone of the honeypot. If we need that, we should refactor all honeypots at the same time so all use the exact same logic.
h0neytr4p.data('timestamp', datetime.fromisoformat(line['timestamp'].replace('Z', '+00:00')).strftime('%Y-%m-%d %H:%M:%S'))
h0neytr4p.data('timezone', time.strftime('%z'))| if payloaddir and payload_filename: | ||
| candidates.append(os.path.join(payloaddir, os.path.basename(payload_filename))) | ||
|
|
||
| if payloaddir and payload_hash: |
There was a problem hiding this comment.
I would elif that with the preceding if to prevent possible duplication of payloaddir.
@trixam @elivlo Please review and test (updated images for h0neytr4p have been pushed).
Here are testing logs: