Created
November 1, 2020 09:36
-
-
Save InersIn/d2a308c2f69b8f30a9150082c4d8b3e4 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 base64 | |
def checkPassword(password): | |
if(len(password) != 40): | |
return False | |
newPass = list(password) | |
for i in range(0,40): | |
newPass[i] = chr(ord(newPass[i]) ^ 0x55) | |
finalPass = "".join(newPass) | |
passBytes = finalPass.encode("ascii") | |
base64_bytes = base64.b64encode(passBytes) | |
base64_string = base64_bytes.decode("ascii") | |
return base64_string == "FgwWARMuF2UhPQotZScKFTsxCjcVJmYKY2FqCiE9FSEmCjJlMTksKA==" | |
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