Skip to content

Commit

Permalink
Merge pull request sherlock-project#27 from mpieters93/regex-default
Browse files Browse the repository at this point in the history
Removed default regular expression check, only check when regular expression is specified in the settings file.
  • Loading branch information
hoadlck authored Dec 28, 2018
2 parents 4fa74cb + 8659c0f commit dff6e87
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ def sherlock(username, verbose=False):
error_type = data.get(social_network).get("errorType")
regex_check = data.get(social_network).get("regexCheck")

if regex_check is None:
#Use default regular expression check for user names.
regex_check = "^[a-zA-Z][a-zA-Z0-9._-]*$"

if re.search(regex_check, username) is None:
if regex_check and re.search(regex_check, username) is None:
#No need to do the check at the site: this user name is not allowed.
print("\033[37;1m[\033[91;1m-\033[37;1m]\033[92;1m {}:\033[93;1m Illegal User Name Format For This Site!".format(social_network))
continue
Expand Down

0 comments on commit dff6e87

Please sign in to comment.