|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- str='''复制黏贴'''
- 密码库=list(str)
- 开头位置=[]
- 结束位置=[]
- 可能中间=[]
- times=0
- lenth=len(密码库)
- if 密码库[0].isupper() and 密码库[1].isupper() and 密码库[2].isupper() and not 密码库[3].isupper(): #找密码前面部分的三个大写
- 开头位置.append(0)
- for a in range(1,lenth-3):
- if 密码库[a].isupper() and 密码库[a+1].isupper() and 密码库[a+2].isupper() and not 密码库[a+3].islower() and not 密码库[0].isupper():
- 开头位置.append(a)
- if 密码库[lenth-1].isupper() and 密码库[lenth-2].isupper() and 密码库[lenth-3].isupper() and not 密码库[lenth-4].issupper(): #找密码后面部分的三个大写
- 结束位置.append(lenth)
- for b in range(4,lenth-1):
- if 密码库[b].isupper() and 密码库[b-1].isupper() and 密码库[b-2].isupper() and not 密码库[b-3].isupper()and not 密码库[lenth-1].isupper():
- 结束位置.append(b)
-
- for eacha in 开头位置:
- for eachb in 结束位置:
- if eacha+5 < eachb: #提取大写字母中间的内容
- 可能中间=密码库[eacha+3:eachb-2]
- 可能中间的长度=len(可能中间)
- for every in 可能中间: #判断中间是否全为小写
- if every.islower():
- times+=1
- if times==可能中间的长度:
- print('密码是:',可能中间)
-
复制代码 |
|