Skip to content

Instantly share code, notes, and snippets.

@ShyftXero
Last active April 13, 2021 16:33
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 ShyftXero/fdb4020e0c2aa96f61e16f067e7acdce to your computer and use it in GitHub Desktop.
Save ShyftXero/fdb4020e0c2aa96f61e16f067e7acdce to your computer and use it in GitHub Desktop.
leaky starter code
import requests
import bs4
# you are searching for a message that starts with 'FLAG{' and ends in '}'
url = 'https://leaky.shyft.us'
sess = requests.session()
ab = [chr(x) for x in range(0, 255) if chr(x).isprintable()]
print(ab)
flag = 'FLAG{'
end = '}'
solved = False
while solved == False:
for c in ab:
soup = bs4.BeautifulSoup(sess.get(url).text, 'html.parser')
csrf = soup.find(id='csrf_token').get('value')
d = sess.post(url, data={'q':flag+c, 'csrf_token':csrf})
# What code can go here to reveal the entire flag?
if end in flag:
solved = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment