Python OSINT CLI tool

Table of contents
  1. Overview
  2. How it works
  3. What I learned
  4. Current status and next steps

Overview

This project is an early proof of concept for extracting publicly available contact information from webpages. I started it to learn the basic stages of an OSINT collection pipeline: retrieve a page, reduce it to searchable text, identify structured patterns, and eventually export normalized results.

The current script downloads a public webpage with requests, parses it with Beautiful Soup, and searches the visible text with regular expressions for:

  • Email-address patterns.
  • International and local-looking phone-number patterns.

Matches are currently printed to the terminal.

How it works

Beautiful Soup converts the response HTML into plain text with normalized spacing. Two regular expressions then scan that text: one for conventional email-address structures and one for phone-like sequences that may contain a country prefix, spaces, parentheses, periods, or hyphens.

The phone expression intentionally accepts several formats, which makes it useful for experimentation but also means results can contain numeric text that is not actually a phone number. Validation and normalization are important next stages rather than assumptions the current script makes.

What I learned

  • How to retrieve and parse public HTML with requests and Beautiful Soup.
  • The difference between webpage markup and visible page text.
  • How regular-expression precision affects false positives and false negatives.
  • Why extracted information needs validation, normalization, and source attribution.
  • Why an OSINT collector needs rate limits, timeouts, clear scope, and responsible data handling.

Current status and next steps

This is the earliest of the four Python projects. The extraction proof of concept works against a hard-coded public URL, but it is not yet a complete CLI. Planned work includes accepting target URLs through command-line arguments, request timeouts and error handling, URL and content-type validation, deduplication, phone-number normalization, source attribution, CSV or JSON export, rate limiting, and tests using local fixtures.

The tool is intended for lawful collection of public information and should be used in accordance with site policies, applicable law, and data-minimization principles.