-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChallenge1.py
39 lines (32 loc) · 1.13 KB
/
Challenge1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import logging
import threading
import time
# TODO: Threading and OpenCL
password = input("ENTER ZEH PASSWORD: ")
print("Muhchines arr fihring, Mahster")
def main():
fourLetter('A','Z')
fiveLetter('A','Z')
def fourLetter(beginChar,endChar):
check = "{}{}{}{}"
for a in range(ord(beginChar),ord(endChar)+1):
for b in range(ord('A'),ord('Z')+1):
for c in range(ord('A'),ord('Z')+1):
for d in range(ord('A'),ord('Z')+1):
textCheck = check.format(chr(a),chr(b),chr(c),chr(d))
passCheck(textCheck)
def fiveLetter(beginChar,endChar):
check = "{}{}{}{}{}"
for a in range(ord(beginChar),ord(endChar)+1):
for b in range(ord('A'),ord('Z')+1):
for c in range(ord('A'),ord('Z')+1):
for d in range(ord('A'),ord('Z')+1):
for e in range(ord('A'),ord('Z')+1):
textCheck = check.format(chr(a), chr(b), chr(c), chr(d),chr(e))
passCheck(textCheck)
def passCheck(check):
if check == password:
print(check)
exit(0)
if __name__== "__main__":
main()