Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marirs/ioc_extract-rs
Extract indicators like urls,domains,ip,emails,etc... from a given string
https://github.com/marirs/ioc_extract-rs
indicators information-extraction information-gathering information-security ioc rust rust-crate rust-lang rust-library
Last synced: 6 days ago
JSON representation
Extract indicators like urls,domains,ip,emails,etc... from a given string
- Host: GitHub
- URL: https://github.com/marirs/ioc_extract-rs
- Owner: marirs
- License: mit
- Created: 2022-01-23T05:22:03.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-31T16:11:01.000Z (14 days ago)
- Last Synced: 2024-10-31T16:23:22.853Z (14 days ago)
- Topics: indicators, information-extraction, information-gathering, information-security, ioc, rust, rust-crate, rust-lang, rust-library
- Language: Rust
- Homepage:
- Size: 92.8 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IOC Extract
[![Linux x86_64](https://github.com/marirs/ioc_extract-rs/actions/workflows/linux_x86_64.yml/badge.svg)](https://github.com/marirs/ioc_extract-rs/actions/workflows/linux_x86_64.yml)
[![Linux Arm7](https://github.com/marirs/ioc_extract-rs/actions/workflows/linux_arm.yml/badge.svg)](https://github.com/marirs/ioc_extract-rs/actions/workflows/linux_arm.yml)
[![macOS](https://github.com/marirs/ioc_extract-rs/actions/workflows/macos.yml/badge.svg)](https://github.com/marirs/ioc_extract-rs/actions/workflows/macos.yml)
[![Windows](https://github.com/marirs/ioc_extract-rs/actions/workflows/windows.yml/badge.svg)](https://github.com/marirs/ioc_extract-rs/actions/workflows/windows.yml)
[![GitHub license](https://img.shields.io/github/license/marirs/ioc_extract-rs)](https://github.com/marirs/ioc_extract-rs/blob/master/LICENSE)Extract indicators like urls,domains,ip,emails,etc... from a given string or a Text file.
### Requirements
- Rust 1.56+ (edition 2021)
### Example
```rust
use ioc_extract::Artifacts;fn main() {
let x = "there are ips in this test\nexample.ini\n192.168.21.21 and ::ffff:127.0.0.1\nthe cidrs are:\n2001:0DB8:1234::/48 and \n10.0.0.0/8\n\n";
let x = x.to_owned() + "check out https://www.google.com or www.google.com";
let ioc = Artifacts::from_str(&x);
println!("IOC's:\n{:#?}", ioc);
}
```### Running the Example
```bash
$ cargo r --example xtract
Running `target/debug/examples/xtract`
IOC's:
Some(
Indicators {
urls: Some(
[
"https://www.google.com",
],
),
domains: Some(
[
"www.google.com",
],
),
emails: None,
ip_address: Some(
[
"10.0.0.0/8",
"192.168.21.21",
"2001:0DB8:1234::/48",
"::ffff:127.0.0.1",
],
),
crypto: None,
registry: None,
},
)
```---
LICENSE: MIT