fix: fixing revshell example and its routes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::{collections::HashMap, io::prelude::*, net::Ipv4Addr};
|
||||
use std::{collections::HashMap, net::Ipv4Addr};
|
||||
|
||||
use anyhow::anyhow;
|
||||
use tokio::time::{interval, Duration};
|
||||
@@ -9,12 +9,7 @@ use pcap_sys::packets::*;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
print!("Please enter the target IP (found with `docker-compose exec examples_revshell_server ip a`, e.x. 172.19.0.2): ");
|
||||
std::io::stdout().flush()?;
|
||||
let stdin = std::io::stdin();
|
||||
let mut target = String::new();
|
||||
stdin.read_line(&mut target)?;
|
||||
let target = target.trim().parse::<Ipv4Addr>()?;
|
||||
let target = std::env::args().skip(1).next().ok_or(anyhow!("could not get target IP"))?.parse::<Ipv4Addr>()?;
|
||||
|
||||
let (ifname, src_mac, dst_mac, srcip) = {
|
||||
let socket = netlink::Socket::new()?;
|
||||
|
||||
Reference in New Issue
Block a user