Skip to content
Snippets Groups Projects
Commit a5a7a80e authored by Pavel Eis's avatar Pavel Eis
Browse files

Fixed error when runned as daemon, mistake was in stripping None. Some...

Fixed error when runned as daemon, mistake was in stripping None. Some atributes in IDEA wrapped correctly to list
parent 8f61450e
No related branches found
No related tags found
No related merge requests found
...@@ -193,18 +193,18 @@ class IdeaGen(object): ...@@ -193,18 +193,18 @@ class IdeaGen(object):
target = {} target = {}
if src_ip: if src_ip:
af = "IP4" if not ':' in src_ip else "IP6" af = "IP4" if not ':' in src_ip else "IP6"
source[af] = src_ip source[af] = [src_ip]
if src_port: if src_port:
source['Port'] = src_port source['Port'] = [src_port]
if proto: if proto:
source['Proto'] = proto source['Proto'] = [proto]
if url: if url:
source['url'] = url source['url'] = url
if dest_ip: if dest_ip:
af = "IP4" if not ':' in dest_ip else "IP6" af = "IP4" if not ':' in dest_ip else "IP6"
target[af] = dest_ip target[af] = [dest_ip]
if dest_port: if dest_port:
target['Port'] = dest_port target['Port'] = [dest_port]
if source: if source:
event['Source'] = [source] event['Source'] = [source]
if target: if target:
...@@ -431,7 +431,7 @@ def main(): ...@@ -431,7 +431,7 @@ def main():
for log_file in files: for log_file in files:
while True: while True:
line = log_file.readline() line = log_file.readline()
if not line.strip(): if line is None or not line.strip():
logging.info("no line") logging.info("no line")
break break
logging.info("readline") logging.info("readline")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment