summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsgp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sgp.py b/sgp.py
index 6f5fa88..1671a8e 100755
--- a/sgp.py
+++ b/sgp.py
@@ -36,7 +36,7 @@ def sgp_gen(pwd, length):
for i in range(10):
pwd = b64_md5(pwd)
- while not re.match('^[a-z].*[A-Z0-9].*', pwd[:length]):
+ while not re.match('^[a-z].*([A-Z].*[0-9]|[0-9].*[A-Z]).*', pwd[:length]):
pwd = b64_md5(pwd)
return(pwd[:length])