JASKEERAT SINGH a.k.a. paino5
Projects — 1 Source — github.com/jaskeerat01/darkweb-scraper

Projects

One project, built because the research work kept needing the same thing: a way to watch the sources I care about without re-reading them by hand every time.

01

Featured project

01

Dark Web Threat Intelligence Engine

A background collector for Tor hidden services that filters posts for relevance, extracts indicators of compromise, summarises threats with a local model, stores the results and pushes the matches to a chat channel.

Status
Built
Stack
Python

The problem

Threat-relevant posts are spread across services that are slow to browse, awkward to search and impossible to monitor consistently. The practical result is that the same pages get re-read over and over, and the genuinely new material is easy to miss in the noise.

What it does

The engine is a background collector for Tor hidden services. It crawls the onion sites you configure, filters what it finds against a keyword set, extracts indicators of compromise, asks a local language model whether a post is actually relevant and what it is about, stores the result, and pushes the matches to a chat channel. It runs on a schedule and keeps its own record of what it has already seen.

Verified capabilities

  • Tor onion service crawling. Crawls configured onion services asynchronously through a local Tor SOCKS5 proxy, following links up to a configurable depth and page limit.
  • Keyword pre-filtering. Target keywords are read from the KEYWORDS environment variable. With LLM_PREFILTER_KEYWORDS enabled, page text is screened for those terms before any inference runs, so irrelevant pages cost nothing.
  • Local LLM classification. A local model classifies threat relevance and writes concise incident summaries. Nothing is sent to an external API, so the material being collected stays on the machine.
  • Indicator of compromise extraction. Extracts cryptocurrency addresses (BTC legacy, SegWit and Bech32, ETH, XMR, LTC, BCH), contact handles (Telegram, Tox, Keybase, email), v3 onion URLs, PGP key blocks and SHA-256 hashes from raw page text.
  • Deduplication and retention. Content hashes are stored in SQLite and enforced through deduplication indexes, so the same post is not alerted on twice. Records older than the retention window are purged.
  • Telegram alert dispatch. Relevant findings are queued and delivered as formatted HTML alerts, with automatic backoff when the bot API rate limit is hit.
  • Circuit rotation and scheduling. The Tor control port is signalled to renew circuits on an interval so crawling does not stall on a dead circuit. Background jobs handle health checks, scheduled scraping, seed synchronisation and log cleanup.

Technologies

Components used by the engine
Category Technology Purpose
RuntimePython 3.10+Asynchronous event loop driving all concurrent network tasks
Tor routingTor Daemon, Stem, aiohttp-socksSOCKS5 proxy tunnelling and control-port circuit renewal
HTTPaiohttpNon-blocking HTTP client for health checks and onion page downloads
ParsingBeautifulSoup4, lxmlDOM traversal, content extraction and link relevance scoring
Local inferencellama-cpp-pythonQuantised GGUF models run locally, with no third-party API calls
ModelQwen2.5-1.5B-Instruct (Q4_K_M GGUF)Relevance classification, entity recognition and summarisation
SchedulingAPSchedulerBackground jobs for health checks, scraping, seed sync and log cleanup
StorageSQLite 3 (WAL mode)Persistent alert store with write-ahead logging and fast indexing
AlertingTelegram Bot APIAsynchronous queue worker delivering formatted HTML alerts
Testingpytest, pytest-asyncioUnit tests for parsers, URL normalisers and IOC patterns

Running it

The repository ships an installer that installs system dependencies, configures Tor to expose a SOCKS port and an authenticated control port bound to loopback, creates a virtual environment, downloads the model file, applies firewall rules and runs the test suite. It can be registered as a systemd service or run manually from the command line. A 4 GB machine is the floor for CPU inference with the 1.5B model, and CUDA acceleration is detected and used automatically when a compatible GPU is present.

Not built yet

The upstream README lists the following as planned work rather than existing features, and none of them are present in the current implementation:

  • A lightweight web dashboard for uptime, health metrics and historical alerts.
  • Additional alerting channels — Discord webhooks, Slack and direct email.
  • Export pipelines for STIX 2.1 and TAXII.
  • A custom rule engine for user-defined matching patterns and severity scores.

Scope and intended use

The project’s own disclaimer restricts it to authorised threat intelligence collection, defensive monitoring and academic research, and asks operators to satisfy the laws that apply to them. It is built for that purpose, and the same expectation applies here.

02

Alert format

The engine queues a formatted HTML message when a post clears the relevance check. The panel below shows the shape of that message. It is a static mock-up built for this page.

Illustrative preview — not a live alert

Telegram — example layout

⚠ Threat alert — example

Source: <monitored onion forum> Category: <classified category> Summary: <one-line summary generated by the local model> Indicators - Crypto: <extracted address> - Handle: <extracted contact handle> - Onion: <extracted .onion URL>

Illustrative preview — not a live alert