Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save InersIn/d2a308c2f69b8f30a9150082c4d8b3e4 to your computer and use it in GitHub Desktop.
Save InersIn/d2a308c2f69b8f30a9150082c4d8b3e4 to your computer and use it in GitHub Desktop.
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