Web scraping allows you to extract data from websites, which can be useful during the reconnaissance phase of ethical hacking. The requests library fetches the web page, and BeautifulSoup parses the HTML to extract specific elements.

- requests.get(url) sends an HTTP GET request to retrieve the web page’s HTML.
- BeautifulSoup(response.text, 'html.parser') processes the HTML, making it easy to navigate.
- soup.find_all('a') finds all <a> tags, which represent links on the page.
This basic scraper can be extended to gather emails, images, or other useful information.