IOC-Splitter is a Python script designed to easily extract and categorize Indicators of Compromise (IOCs) from text files. With this tool, you can split out IP addresses, domains, URLs, and hash values into separate files, and generate a clean, consolidated output file.
- 💡 Extract and categorize IOCs: Automatically separates IP addresses, domains, URLs, and hash values into individual files.
- 📂 Organized output: Creates separate files for IPs, domains, URLs, and hashes.
- 📝 Consolidated IOC file: Combines all extracted IOCs into a single file for easy use.
- 🏃♂️ Simple and fast: No external libraries required — just Python and your input file.
-
Python 3.x:
Install from python.org. -
Input File (
input.txt
):
A text file that contains your IOCs, each on a new line (URLs, IPs, domains, hashes).
-
Clone the repository:
git clone https://github.com/rodanmaharjan/IOC-Splitter.git cd IOC-Splitter
-
Prepare your
input.txt
:
Add the IOCs to theinput.txt
file, with each IOC on a new line. -
Run the script:
python3 ioc_splitter.py
-
Check the output:
The script will create the following output files:ip.txt
: Extracted IP addresses.domain.txt
: Extracted domains.url.txt
: Extracted URLs.hash.txt
: Extracted hash values.final.txt
: A consolidated file containing all the IOCs in order.
Input (input.txt
):
8.8.8.8
example.com
https://malicious-url.com
deadbeefdeadbeefdeadbeefdeadbeef
1.1.1.1
anotherexample.org
http://phishing-site.com
cafebabe0000dead0000cafebabe0000
Output:
-
ip.txt
:8.8.8.8 1.1.1.1
-
domain.txt
:example.com anotherexample.org
-
url.txt
:https://malicious-url.com http://phishing-site.com
-
hash.txt
:deadbeefdeadbeefdeadbeefdeadbeef cafebabe0000dead0000cafebabe0000
-
final.txt
(combined file):8.8.8.8 1.1.1.1 example.com anotherexample.org https://malicious-url.com http://phishing-site.com deadbeefdeadbeefdeadbeefdeadbeef cafebabe0000dead0000cafebabe0000
- Python 3.x: Install from python.org.
- No external libraries needed — uses built-in Python functions for regular expressions and file handling.
Contributions are welcome! Feel free to fork this project, open issues, or submit pull requests to enhance IOC-Splitter.
[Rodan Maharjan]
Check out more projects on GitHub.
Ready to organize and manage your IOCs? Clone the repo and automate your IOC extraction process now!