#!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
# requests.get downloads the webpage and stores it as a variable
html = requests.get('http://10.10.225.228:8000/')
# this parses the webpage into something that beautifulsoup can read over
soup = BeautifulSoup(html.text, "lxml")
# lxml is just the parser for reading the html
# this is the line that grabs all the links # stores all the links in the links variable
links = soup.find_all('a')
for link in links:
if "href" in link.attrs:
print(link["href"])
HTTP brute force
#!/usr/bin/env python3
import requests
for api_key in range(1,100,2): #1, 3, 5, 7...
print(f"api_key {api_key}")
html = requests.get(f'http://10.10.225.228:8000/api/{api_key}')
print(html.text)