Skip to content

Instantly share code, notes, and snippets.

@kkrypt0nn
Created April 3, 2022 18:20
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 kkrypt0nn/67cfbf20500b9452fd5d6ff4573369ff to your computer and use it in GitHub Desktop.
Save kkrypt0nn/67cfbf20500b9452fd5d6ff4573369ff to your computer and use it in GitHub Desktop.
Cape Kennedy challenge at the Space Heroes 2022 CTF
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