diff --git a/main/app.py b/main/app.py index 89da2c6..325cb37 100644 --- a/main/app.py +++ b/main/app.py @@ -28,7 +28,7 @@ def url(args: Namespace): def github(args: Namespace): - print(f"Searching through repos of Github user: {args.user}\n") + print(f"Searching through repos of Github user: {args.user}") try: g = Github(args.key) except: @@ -45,4 +45,8 @@ def github(args: Namespace): def trufflePy_main(): parser = gen_arg_parser() args = parser.parse_args() - return args.func(args) \ No newline at end of file + print("Beginning serach!!!") + try: + return args.func(args) + except AttributeError: + print("Please supply parameters, use the -h switch for help.") \ No newline at end of file diff --git a/regexes/searches.py b/regexes/searches.py index e629b71..6b14714 100644 --- a/regexes/searches.py +++ b/regexes/searches.py @@ -17,7 +17,7 @@ def get_secret_regexes(rules_file=None) -> Dict: # TODO Validate get_secret_rege :return: The `re` compiled regex matches to be used in secret searching """ if rules_file == None: - # Declare all the secret regexes to look for + # Declare all the secret regexes to look regexes = { "Slack Token": "(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})", "RSA private key": "-----BEGIN RSA PRIVATE KEY-----", diff --git a/search/engine.py b/search/engine.py index 2df8211..e7330b3 100644 --- a/search/engine.py +++ b/search/engine.py @@ -92,7 +92,7 @@ def _print_diff(self, diff: str, secrets: List[str], lines: int) -> None: return the lines before and after everywhere the secret appears in the diff TODO make the number of lines to search for above/below a user flag """ - print("Secrets within the diff:\n") + print("Strings found within the diff:\n") locations = [] for secret in secrets: locations.append(self._get_secret_locations_within_diff(diff, secret))