From 340257bd0726213eaa0534d2092fb3110f143f3a Mon Sep 17 00:00:00 2001 From: Dylan Katz Date: Sun, 19 May 2019 17:15:07 -0700 Subject: [PATCH] Cleaned up test code --- liquid_honey.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/liquid_honey.py b/liquid_honey.py index 688d799..cf7cebd 100644 --- a/liquid_honey.py +++ b/liquid_honey.py @@ -47,25 +47,8 @@ def main(stdout, log_path, listen_port, create_rules): server = ProbeServer(listen_port, conf.max_ports_per_service, conf.max_replies, create_rules) - # for port, config in probes: - # server.add_from_config(port, config) - # small_gen = Xeger(limit=80) - # large_gen = Xeger(limit=900) - # - # for port in server.port_options: - # patterns = server.port_options[port][:10] - # for pattern in patterns: - # try: - # response = small_gen.xeger(pattern.pattern) - # except ValueError: - # try: - # logging.warning( - # 'Unable to generate small response for repeat in regex "%s". Trying larger generator...', - # pattern.pattern) - # response = large_gen.xeger(pattern.pattern) - # except ValueError: - # logging.error('Unable to generate response for overly long repeat in regex "%s"', pattern.pattern) - # response = "" + for port, config in probes: + server.add_from_config(port, config) server.run()