From f6e4ea22704e99e0a31f66e78a89e14f824c1c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 11 Feb 2016 12:19:03 +0100 Subject: [PATCH] Fix logging, fix URL regex --- bin/Credential.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/Credential.py b/bin/Credential.py index 4588796d..3ac61faf 100755 --- a/bin/Credential.py +++ b/bin/Credential.py @@ -15,7 +15,7 @@ if __name__ == "__main__": critical = 8 - regex_web = "/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/" + regex_web = "((?:https?:\/\/)[-_0-9a-zA-Z]+\.[0-9a-zA-Z]+)" regex_cred = "[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}:[a-zA-Z0-9\_\-]+" while True: message = p.get_from_set() @@ -39,7 +39,7 @@ if __name__ == "__main__": sites = set(re.findall(regex_web, content)) - message = '{} credentials found.'.format(len(creds)) + message = 'Checked {} credentials found.'.format(len(creds)) if sites: message += ' Related websites: {}'.format(', '.join(sites))