Minor stuff

cli
E. Almqvist 2 years ago
parent 7a1ffdd700
commit ef563d0b1a
  1. 3
      Cargo.toml
  2. 4
      src/ipv4_gen.rs
  3. 9
      src/main.rs
  4. 35
      src/scanner.rs

@ -6,3 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# packet = "0.1.4"
anyhow = "1"
log = "0.4"

@ -0,0 +1,4 @@
pub fn generate_ips() -> Vec<Vec<u8>> {
}

@ -1,3 +1,12 @@
#![allow(
dead_code,
unused_variables,
//unused_imports, // TODO: rm
)]
mod scanner;
mod ipv4_gen;
fn main() {
println!("Hello, world!");
}

@ -0,0 +1,35 @@
use std::{net::{TcpStream, SocketAddr}, thread::JoinHandle};
use log::info;
use std::thread;
use crate::ipv4_gen;
async fn check_ack(dest: &SocketAddr) -> bool {
if let Ok(res) = TcpStream::connect(dest) {
info!("Got TCP ack from: {:?}", dest);
return true;
}
return false;
}
pub fn start_scan(depth: u32) {
let threads: Vec<JoinHandle<()>> = Vec::new();
for i in 0..depth {
let thread = thread::spawn(|| {
println!("hi");
});
}
}
/*
depth: u32
blacklist_ips: Vec
pre:
# generate IPs
ALL_IPS: Vec<Vecu8>> = ...
*/
Loading…
Cancel
Save