diff --git a/src/n0s1/n0s1.py b/src/n0s1/n0s1.py index 90ef2f6..76dfa50 100755 --- a/src/n0s1/n0s1.py +++ b/src/n0s1/n0s1.py @@ -421,6 +421,7 @@ def scan_text(regex_config, text): def scan(regex_config, controller, scan_arguments): global DEBUG if not regex_config or not controller: + raise ValueError("No regex configuration provided to the scanner") return scan_comment = scan_arguments.get("scan_comment", False) post_comment = scan_arguments.get("post_comment", False) @@ -475,6 +476,8 @@ def main(callback=None): parser = init_argparse() args = parser.parse_args() + DEBUG = args.debug + regex_config = None cfg = {} @@ -596,8 +599,6 @@ def main(callback=None): parser.print_help() return - DEBUG = args.debug - message = f"n0s1 secret scanner version [{n0s1_version}] - Scan date: {date_utc}" log_message(message) if DEBUG: