# xortool

> Python command-line tool that guesses the key length and key of multi-byte XOR-encrypted data.

Source: https://osinttools.io/tools/xortool/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** File
- **Category:** Data analysis and case notes
- **Pricing:** Free
- **Footprint:** passive (does not contact the target)
- **Account required:** no
- **API:** no public API
- **Platforms:** Python CLI
- **Website:** https://github.com/hellman/xortool
- **GitHub:** hellman/xortool, 1,490 stars · Python · last commit 2025-05-21 · dormant (no commit on the default branch in 18 months)
- **Listed:** Nov 26
- **Last verified by an editor:** Nov 26, 2026

## What it does

xortool analyses data encrypted with a repeating XOR key. It estimates the most likely key lengths from repeated characters, then guesses the key on the assumption of a most frequent plaintext character, such as a space in text or a null byte in binaries. It can also use known plaintext, brute-force the most frequent character and filter outputs to a character set like printable, Base64 or Base32.

Analysts use it on XOR-obfuscated malware payloads, configuration blobs and capture-the-flag puzzles. Decrypted candidates are written to files for review, and a companion xortool-xor utility applies a key to data.

Footprint is passive: it reads its own index or third-party records and does not contact the target. No account is needed. There is no public API.

## Features

- Key length estimation
- Key guessing from the most frequent character
- Known-plaintext mode
- Brute force over printable characters
- Output filtering by character set
- Hex-encoded input support

## Pros

- Simple to install with pip
- Handles multi-byte keys
- Several attack modes for different kinds of plaintext

## Cons

- Only for XOR; other encodings need other tools
- Guesses can be wrong on short or random-looking data
- Command line only

## When to use it

- Use it when you suspect a file or payload is obfuscated with a repeating XOR key.
- Use it when you know part of the plaintext and want to recover the full key.

## Quick start

pip:

```
pip3 install xortool
```

## Alternatives

- [CyberChef](https://osinttools.io/tools/cyberchef/): GCHQ's in-browser toolkit for decoding, decrypting, converting and parsing data by chaining operations into recipes. (Open source · File · passive · 36,536 GitHub stars)
- [Datasette](https://osinttools.io/tools/datasette/): Open-source tool that turns SQLite databases and CSV files into a browsable, searchable website with a JSON API. (Open source · File · passive · 11,661 GitHub stars)
- [Datawrapper](https://osinttools.io/tools/datawrapper/): Web tool for turning spreadsheets into interactive charts, maps and tables that can be embedded in articles. (Freemium · File · passive)
- [Gephi](https://osinttools.io/tools/gephi/): Open-source desktop app for visualising and measuring networks, with a lighter browser version called Gephi Lite. (Open source · File · passive · 6,708 GitHub stars)
- [Obsidian](https://osinttools.io/tools/obsidian/): Note-taking app built on local Markdown files, with backlinks, a graph view and plugins for organising research. (Freemium · File · passive)
- [QGIS](https://osinttools.io/tools/qgis/): Free open-source desktop GIS for mapping, analysing and combining vector and raster data, extensible with plugins. (Open source · File · passive · 14,887 GitHub stars)

All alternatives to xortool in one table: https://osinttools.io/tools/xortool/alternatives/

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
