Browse Source

fix handlers exception

pull/18/head
Yair Fax 2 years ago
committed by Yair
parent
commit
0abac72ddb
  1. 1
      actions/utils.py
  2. 6
      engine.py

1
actions/utils.py

@ -135,6 +135,7 @@ class CustomAdapter(logging.LoggerAdapter):
def __init__(self, logger, extras):
super().__init__(logger, extras)
self.handlers = logger.handlers
self.ips = {}
def debug(self, msg, *args, **kwargs):

6
engine.py

@ -30,7 +30,7 @@ BASEPATH = os.path.dirname(os.path.abspath(__file__))
class Engine():
def __init__(self, server_port, string_strategy, server_side=False, environment_id=None, output_directory="trials", log_level="info"):
def __init__(self, server_port, string_strategy, server_side=False, environment_id=None, output_directory="trials", log_level="info", demo_mode=False):
self.server_port = server_port
self.seen_packets = []
# Set up the directory and ID for logging
@ -45,7 +45,8 @@ class Engine():
__name__,
"engine",
environment_id,
log_level=log_level)
log_level=log_level,
demo_mode=demo_mode)
self.output_directory = output_directory
self.server_side = server_side
@ -313,6 +314,7 @@ def get_args():
parser.add_argument('--log', action='store', default="debug",
choices=("debug", "info", "warning", "critical", "error"),
help="Sets the log level")
parser.add_argument("--demo-mode", action='store_true', help="Replaces all IPs with dummy IPs in log messages so as not to reveal sensitive IP addresses")
args = parser.parse_args()
return args

Loading…
Cancel
Save