Crates.io | cef2hashmap |
lib.rs | cef2hashmap |
version | 0.1.4 |
source | src |
created_at | 2022-02-20 17:04:50.35105 |
updated_at | 2022-06-17 05:18:02.622399 |
description | A Simple CEF Parser to a HashMap |
homepage | https://github.com/marirs/cef2hashmap-rs |
repository | https://github.com/marirs/cef2hashmap-rs |
max_upload_size | |
id | 535837 |
size | 24,125 |
Convert a syslog CEF string or a regular CEF string to a HashMap object.
[dependencies]
cef2hashmap = "0.1.3"
and then
use cef2hashmap::CefToHashMap;
fn main() {
let example = "<134>2022-02-14T03:17:30-08:00 TEST CEF:0|Vendor|Product|20.0.560|600|User Signed In|3|src=127.0.0.1 suser=Admin target=Admin msg=User signed in from 127.0.0.1 Tenant=Primary TenantId=0 act= cs1Label=Testing Label 1 Key cs1=Testing Label 1 String Value";
println!("{:#?}", example.to_hashmap(true));
}
false
to .to_hashmap(false)
if you don't want to preserve the original eventLicense: MIT