Skip to content

Commit

Permalink
alter output (Again)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmckennirey committed Jun 27, 2020
1 parent a5077ff commit 67a1985
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions main/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -45,4 +45,8 @@ def github(args: Namespace):
def trufflePy_main():
parser = gen_arg_parser()
args = parser.parse_args()
return args.func(args)
print("Beginning serach!!!")
try:
return args.func(args)
except AttributeError:
print("Please supply parameters, use the -h switch for help.")
2 changes: 1 addition & 1 deletion regexes/searches.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-----",
Expand Down
2 changes: 1 addition & 1 deletion search/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 67a1985

Please sign in to comment.