iocextract
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
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.
- +Catches indicators that plain regexes miss
- +Iterators handle very large inputs
- +Offline, with no external calls
- +Documented on Read the Docs
- −Some URLs may appear twice when several regexes match
- −Extraction only; it does not enrich or score indicators
When to use it
- 01Use it when you need indicators from a threat report in a usable list.
- 02Use it when building a pipeline that ingests defanged indicators from social posts.
Next steps from this result
Suggested from the inputs iocextract takes- Found a resultConfirm it with a second, independent source before you record itDepends
- Found a new identifierPivot on it only if your scope covers the new targetDepends
Quick start
Docs (opens in new tab)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 reviewAlternatives to iocextract
Listed tools that take the same inputs, closest match first.
- MalwareBazaarFree · Passive · logging · APIWhat it does
abuse.ch repository of malware samples searchable by hash, family, tag or signature, with free downloads for research.
FileNo ratings yetVerified 2d ago - ANY.RUNFreemium · Depends · account · logging · APIWhat it does
Interactive malware sandbox where you watch and control a sample's execution in a live virtual machine.
FileURLNo ratings yetVerified 2d ago - Hybrid AnalysisFree · Depends · logging · APIWhat it does
Free malware sandbox from CrowdStrike that detonates files and URLs and publishes behaviour reports.
FileURLNo ratings yetVerified 2d ago

