diff --git a/hp-tipping-point/tpToIdea.py b/hp-tipping-point/tpToIdea.py index 86408bd74d21fe67f86263f38b697060c12f21a6..3e1f6de8878cf108094c2258bf4d580f1efc62a7 100644 --- a/hp-tipping-point/tpToIdea.py +++ b/hp-tipping-point/tpToIdea.py @@ -193,18 +193,18 @@ class IdeaGen(object): target = {} if src_ip: af = "IP4" if not ':' in src_ip else "IP6" - source[af] = src_ip + source[af] = [src_ip] if src_port: - source['Port'] = src_port + source['Port'] = [src_port] if proto: - source['Proto'] = proto + source['Proto'] = [proto] if url: source['url'] = url if dest_ip: af = "IP4" if not ':' in dest_ip else "IP6" - target[af] = dest_ip + target[af] = [dest_ip] if dest_port: - target['Port'] = dest_port + target['Port'] = [dest_port] if source: event['Source'] = [source] if target: @@ -431,7 +431,7 @@ def main(): for log_file in files: while True: line = log_file.readline() - if not line.strip(): + if line is None or not line.strip(): logging.info("no line") break logging.info("readline")