Skip to content
OSINTtools.io

iocextract

Verified 2d agoDormant

Python library and CLI that extracts URLs, IPs, hashes, emails and YARA rules from text, including defanged indicators.

Python library · CLI · Open source · API · Threat intelligence · inquest.readthedocs.io

Takes
File
Pricing
Open source
Footprint
Passive · no contact with target
Account
Not needed
API
Yes
Last verified
Nov 23, 2026
Summary

Python library and CLI that extracts URLs, IPs, hashes, emails and YARA rules from text, including defanged indicators. It takes file. Read the cons before you build a workflow on it.

What it does

iocextract pulls indicators of compromise such as URLs, IP addresses, MD5 and SHA hashes, email addresses and YARA rules out of text. Its regexes catch defanged forms such as example[.]com or hxxp:// and can refang them.

Threat analysts use it to turn reports, posts and other text into machine-readable indicator lists. It runs as a Python library or a command-line tool and works entirely offline.

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

Pros
  • +Catches indicators that plain regexes miss
  • +Iterators handle very large inputs
  • +Offline, with no external calls
  • +Documented on Read the Docs
Cons
  • −Some URLs may appear twice when several regexes match
  • −Extraction only; it does not enrich or score indicators

When to use it

  1. 01Use it when you need indicators from a threat report in a usable list.
  2. 02Use it when building a pipeline that ingests defanged indicators from social posts.
Key featuresURL, IP, hash and email extractionYARA rule extractionDefanged indicator detectionOptional refangingCustom regex supportPython library and CLI

Next steps from this result

Suggested from the inputs iocextract takes
  • Found a resultConfirm it with a second, independent source before you record it
  • Found a new identifierPivot on it only if your scope covers the new target
    Depends
Terminal · Python
pip install iocextract
iocextract --input report.txt

Technical details

Listing verified by an editor on Nov 23, 2026
API
Yes, see the vendor docs for auth and limits
Account
Not needed
Footprint
Passive · no contact with target
Pricing
Open source · Free and open source (GPL-2.0).
Platforms
Python library · CLI
Repository
pedramamini/iocextract 581 stars
Language
Python
Licence
GPL-2.0
Last commit
Aug 2024 (dormant)
Listed
Nov 23

Reviews

No reviews yet

Written by signed-in members. Each review appears here after an editor has read it.

Used iocextract? Sign in to say what you used it for and how it went.

Sign in to review

Alternatives to iocextract

Listed tools that take the same inputs, closest match first.

iocextractOpen source · API · verified 2d ago
Visit inquest.readthedocs.io (opens in new tab)