Created
November 1, 2020 09:30
-
-
Save InersIn/53dffda617fc4942283c3e02575f1f47 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
import random | |
def checkPassword(password): | |
if(len(password) != 47): | |
return False | |
newPass = list(password) | |
for i in range(0,9): | |
newPass[i] = password[i] | |
for i in range(9,24): | |
newPass[i] = password[32-i] | |
for i in range(24,47,2): | |
newPass[i] = password[70-i] | |
for i in range(45,25,-2): | |
newPass[i] = password[i] | |
password = "".join(newPass); | |
print(password) | |
return password == "CYCTF{ju$@rcs_3l771l_@_t}bd3cfdr0y_u0t__03_0l3m" | |
password = input("Enter password: ") | |
if(checkPassword(password)): | |
print("PASSWORD ACCEPTED\n") | |
else: | |
print("PASSWORD DENIED\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment