Python Forum
Simple Cryptography Capture the Flag
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Cryptography Capture the Flag
#1
I don't really understand how I am supposed to change my code to work to print the proper flag out in the text.
The flag itself is 30 characters long. An example of what the flag would look like is: f l a g { e a s y _ p e a s y _ l e m o n _ s q u e e z y }

f = open("quad_radical.txt")

txt = f.read()

p = 0
count = 0
for i in range(30):
        p = count ** 2
        print txt[p]
        count = count + 1
The text file that I am looking through looks like this: 
Now I obviously can see the flag is in the beginning and it does up by a quadratic formula, but when I run the code I only get the "f" and "l" of flag. Please help. Sorry if my formatting is bad.
Reply


Messages In This Thread
Simple Cryptography Capture the Flag - by DrEastwood - Oct-12-2016, 08:33 PM
RE: Simple Cryptography Capture the Flag - by wavic - Oct-12-2016, 10:41 PM
RE: Simple Cryptography Capture the Flag - by wavic - Oct-12-2016, 10:45 PM
RE: Simple Cryptography Capture the Flag - by Yoriz - Oct-12-2016, 11:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help in using Flag pretty please kamui123 1 1,627 Oct-20-2020, 09:42 AM
Last Post: Larz60+
  Cryptography Problem PYTHONEUR 28 17,704 Jan-25-2017, 08:15 AM
Last Post: PYTHONEUR

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020