Copilot is great! Look at this great encryption function it wrote for me
To solve this challenge you'll have to do some byte manipulations in python. If you haven't written python before, don't worry! Python is notoriously simple and easy to pick up, granted that you've written in an imperative language before.
- If you haven't set up a programming environment with python installed, start here
- To get started with some byte manipulations in python, read this
All in all this challenge is really straightforward, the main goal is to get comfortable with python and doing byte manipulations
You're given a program that takes a secret file (
flag.txt) and "encrypts" it, changing it to something that is unreadable (
flag.txt.enc). Your goal is to reverse this process
Some advice then:
- Look carefully at
encrypt.py. What information do we not know? What does the
encryptfunction do? What could you do to undo it's effects if you knew the
- What happens if you XOR a byte by the same byte twice?
- Think about the
???value. What are the possible values that it could be? Could you try to guess it? How many guesses would you need to make? How would you know if your guess was correct?