SHARE
TWEET

Untitled

a guest Aug 25th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn add_ip_hdr(protocols: &std::collections::HashMap<String,i32>, sid: i32, cid: i32, parsed: &json::JsonValue) {
  2.     //let stmt = pool
  3.     //.prepare(
  4.     //r"INSERT INTO into (sid, cid, signature, timestamp)
  5.     //VALUES
  6.     //(:sid, :cid, :signature, FROM_TIMESTAMP(:timestamp))",
  7.     //)
  8.     //.unwrap();
  9.     //stmt.execute(params! {
  10.     //"sid" => parsed["alert"]["signature_id"].into(),
  11.     //"signature" => parsed["alert"]["signature"].into()
  12.     //"timestamp" => parsed["timestamp"].into()
  13.     //})
  14.     //.unwrap();
  15.     let proto = protocols.get(parsed["proto"].as_str().map(|p| p.to_lowercase());
  16.     println!("add_ip_hdr: sid {:?}, cid {:?}, ip_src {:?}, ip_dst {:?}, ip_proto {:?}, found protocol is: {:?}", sid, cid, parsed["src_ip"], parsed["dest_ip"], parsed["proto"], proto);
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top