Skip to content

Instantly share code, notes, and snippets.

@asdofindia
Last active February 1, 2017 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 asdofindia/9831b7f20098506ec9048f8f84cfaa37 to your computer and use it in GitHub Desktop.
Save asdofindia/9831b7f20098506ec9048f8f84cfaa37 to your computer and use it in GitHub Desktop.
Breakin CTF '17 - Fast and Furious
#!/bin/env python3
from bs4 import BeautifulSoup
import requests
r = requests.get('https://felicity.iiit.ac.in/contest/extra/fastandfurious/')
while r:
print(r.text)
soup = BeautifulSoup(r.text, 'html.parser')
solve = soup.findAll('p')[1]
# print(solve)
solve = solve.get_text()
print(solve)
solve = solve[9:-2]
# print(solve)
answer = eval(solve)
print(answer)
r = requests.post('https://felicity.iiit.ac.in/contest/extra/fastandfurious/', data = {'ques_ans': answer}, cookies=r.cookies)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment