This is my first post here so hopefully someone will be able to give me some help!
I'm currently working on a Capture The Flag (CTF) for a university project, as a part of it I want to involve a Python quiz; to validate whether or not the users answers are correct.
Although I've made a rather simple script that gets the job done, one potential problem that comes to mind is that the user can simply open the Python script in gedit or nano and easily find the answer. I've tried a few solutions, but I can't think of any way that would be reliable.
As I said, the code itself is rather simple, but I thought I'd include it just so you can get an idea of what I've got so far:
import sys
answer = ("Blessed be our saviour, a warrior...")
userInput = input("What does the decrypted text read? ")
if userInput == answer:
print("Correct, the way is open")
else:
print("Incorrect! The way is barred until you find the solution!")
sys.exit(0)
I don't really know if this is possible, but I thought that I'd may as well ask.
Thanks for any advice you can give!