gossan-intel 0.3.0

Global Passive and Active Intel pillar for Gossan — part of the security research ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[tokio::test]
async fn dummy() {
    let mut f = tempfile::NamedTempFile::new().unwrap();
    use std::io::Write;
    writeln!(f, "invalid json").unwrap();
    writeln!(f, "{{\"ip\": \"1.1.1.1\", \"port\": 80, \"protocol\": \"tcp\"}}").unwrap();
    f.flush().unwrap();
    
    let path = f.path();
    let file = std::fs::File::open(path).unwrap();
    let reader = std::io::BufReader::new(file);
    use std::io::BufRead;
    for line in reader.lines() {
        println!("Line: {:?}", line);
    }
}