Skip to content
Snippets Groups Projects
Commit 86dc120f authored by ulif's avatar ulif
Browse files

Simplify regular expressions.

parent 2c9dd75f
No related branches found
No related tags found
No related merge requests found
......@@ -24,14 +24,14 @@ WORDLISTS_DIR = os.path.abspath(
#: A regular expression matching allowed wordlist names. We
#: allow names that cannot easily mess up filesystems.
RE_WORDLIST_NAME = re.compile('^[a-zA-Z0-9_-]+$')
RE_WORDLIST_NAME = re.compile('^[\w-]+$')
#: A regular expression matching numbered entries in wordlists.
RE_NUMBERED_WORDLIST_ENTRY = re.compile('^[0-9]+\s+([^\s]+)$')
#: A regular expression describing valid wordlist file names.
RE_VALID_WORDLIST_FILENAME = re.compile(
'^wordlist_([a-zA-Z0-9_-]+)\.[a-zA-Z0-9][a-zA-Z0-9\.]+[a-zA-Z0-9]+$')
'^wordlist_([\w_-]+)\.[\w][\w\.]+[\w]+$')
def get_wordlist_names():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment