Skip to content

Instantly share code, notes, and snippets.

@Tomiwa-Ot
Created June 1, 2021 20:06
Show Gist options
  • Select an option

  • Save Tomiwa-Ot/70e588cddf58e073e7eb843419438f73 to your computer and use it in GitHub Desktop.

Select an option

Save Tomiwa-Ot/70e588cddf58e073e7eb843419438f73 to your computer and use it in GitHub Desktop.
import hashlib
import requests
from bs4 import BeautifulSoup
url ="http://178.62.54.97:31517/"
text = ""
reqs = requests.get(url)
soup = BeautifulSoup(reqs.text, 'lxml')
for heading in soup.find_all("h3"):
print(heading.name + ' ' + heading.text.strip())
text = heading.text.strip()
headers = {
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0',
'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Language' : 'en-US,en;q=0.5',
'Accept-Encoding' : 'gzip, deflate',
'Referer' : 'http://178.62.54.97:31517/',
'Content-Type' : 'application/x-www-form-urlencoded'
}
text = hashlib.md5(text).hexdigest()
r = requests.post(url, data={
"hash" : text
}, verify=False, headers=headers)
print(r.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment