Skip to content

Commit

Permalink
Cleaned up test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Plazmaz committed May 20, 2019
1 parent 6bf52d3 commit 340257b
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions liquid_honey.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 340257b

Please sign in to comment.