Created
January 14, 2012 09:24
-
-
Save tioover/1610800 to your computer and use it in GitHub Desktop.
判断傻密码的函数
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_stupid_password(password): | |
'''look here http://coolshell.cn/articles/6193.html .''' | |
stupid_password_list = [ | |
'123456789', | |
'12345678', | |
'dearbook', | |
'123123123', | |
'1234567890', | |
'147258369', | |
'987654321', | |
] | |
clean = list(set(password)) # 如果是 aaaaaaa这样的密码,就会返回['a'] | |
if password in stupid_password_list or len(clean) is 1: | |
return True | |
else: return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment