Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import os
- from bs4 import BeautifulSoup
- url = 'http://5.9.247.121/d34dc0d3'
- h = {'X-0x0ACE-Key' : 'rNpMY4b6gPjyEOqLR0YQMAnVmwDbd7LReD3k5x849KJarWelNGpvZo12zwPJDxRa'}
- r = requests.get(url, headers=h)
- s = r.text
- soup = BeautifulSoup(s, 'html.parser')
- v = soup.input['value']
- s = soup.findAll('span', attrs={'class':'challenge'})[0].contents[0]
- l = s.split()
- a, b = (l[0][1:-1], l[2][:-1])
- os.system('echo "{} {}" | ./a.out > out'.format(a, b))
- f = open('out')
- s = f.read()
- r = requests.post(url, headers=h, data={'solution': s, 'verification': v})
- print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment