Closed diego-lopez8 closed 4 months ago
(hsrn-nids) jiayuansong@soukagens-Air-8 NIDS % python train.py --log-dir /usr/local/logs
2024-02-09 15:36:19,179 - root - INFO - Using logdir: /usr/local/logs (train.py)
2024-02-09 15:36:19,179 - root - INFO - Checking /usr/local/logs/2024-02-09 (train.py)
2024-02-09 15:36:19,180 - root - INFO - Opening file /usr/local/logs/2024-02-09/conn.15:08:52-15:08:54.log.gz (train.py)
Traceback (most recent call last):
File "/Users/jiayuansong/Desktop/NYUDS/HSRN/repo/NIDS/NIDS/train.py", line 99, in
completed by #15
We want to use
history
andduration
fields, however some flows seem to not generate these. Examples areICMP
pings that do not generate history (ping google.com).Here is a stack trace
and the problematic flow in the
line
variable before failingNo duration
No history
Please implement some way to either catch the json KeyError and add the variable to the line, or implement some logic to add these in after.
https://github.com/zoe70416/NIDS/blob/c26a772667d97931d8b6d56acf73745e5db78daa/NIDS/utils.py#L38