Skip to content

Commit 148de24

Browse files
authored
Update FairPlay.py
1 parent 46f18ff commit 148de24

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

FairPlay.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def DealKey(key,omit):
1818

1919
for i in range(97,123):
2020

21-
if chr(i) != omit and result.find(chr(i)) != -1:
21+
if chr(i) != omit and result.find(chr(i)) == -1:
2222

2323
result = result + chr(i)
2424

@@ -80,7 +80,7 @@ def DealPw(pw):
8080

8181
pw = pw.lower()
8282

83-
pw = pw.replace('q','')
83+
# pw = pw.replace('q','')
8484

8585
if not pw.isalpha():
8686

@@ -180,7 +180,15 @@ def main():
180180

181181
key = DealKey(key,omit)
182182

183-
key = ImportKeyRow(key)
183+
option = raw_input('Row or Col:(r or c):')
184+
185+
if option == 'r':
186+
187+
key = ImportKeyRow(key)
188+
189+
else:
190+
191+
key = ImportKeyCol(key)
184192

185193
pw = raw_input('Input your passwd:')
186194

@@ -197,9 +205,6 @@ def main():
197205
main()
198206

199207

200-
201-
202-
203208
'''
204209
def DealKey(key):
205210
@@ -268,4 +273,4 @@ def EncrptPw(pw):
268273
269274
print result
270275
271-
'''
276+
'''

0 commit comments

Comments
 (0)