Crates.io | leef2hashmap |
lib.rs | leef2hashmap |
version | 0.1.4 |
source | src |
created_at | 2022-05-06 05:28:02.394553 |
updated_at | 2022-06-17 05:09:18.764534 |
description | A Simple LEEF Parser to a HashMap |
homepage | https://github.com/marirs/leef2hashmap-rs |
repository | https://github.com/marirs/leef2hashmap-rs |
max_upload_size | |
id | 581521 |
size | 26,476 |
Convert a syslog LEEF string or a regular LEEF string to a HashMap object.
[dependencies]
leef2hashmap = "0.1.3"
and then
use leef2hashmap::LeefToHashMap;
fn main() {
let example = "<134>2022-02-14T03:17:30-08:00 2001:db8:3333:4444:5555:6666:7777:8888 Jan 18 11:07:53 198.76.5.4 LEEF:1.0|VMware Carbon_Black|App Control|8.6.0.155|NEW_PORT_DISCOVERD|<tab>|src=172.5.6.67<tab>dst=172.50.123.1<tab>sev=5<tab>cat=anomaly<tab>msg=there are spaces in this message";
println!("{:#?}", example.to_hashmap(true));
}
false
to .to_hashmap(false)
if you don't want to preserve the original eventLicense: MIT