-
-
Save kkrypt0nn/67cfbf20500b9452fd5d6ff4573369ff to your computer and use it in GitHub Desktop.
Cape Kennedy challenge at the Space Heroes 2022 CTF
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 sys | |
def main(): | |
if len(sys.argv) != 2: | |
print("Invalid args") | |
return | |
password = sys.argv[1] | |
builder = 0 | |
for c in password: | |
builder += ord(c) | |
if builder == 713 and len(password) == 8 and (ord(password[2]) == ord(password[5])): | |
if (ord(password[3]) == ord(password[4])) and ((ord(password[6])) == ord(password[7])): | |
print("correct") | |
else: | |
print("incorrect") | |
else: | |
print("incorrect") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment