Added Windows support for the bind shell

Brings in support from winpcap as npcap has a restrictive license
This commit is contained in:
Andrew Rioux
2024-01-24 19:12:45 -05:00
parent 862dc3e743
commit af5ceb66ab
10 changed files with 97 additions and 26 deletions

View File

@@ -11,13 +11,13 @@ pub const SPARSE_LINUX_SERVER_BINARY: &'static [u8] =
include_bytes!("../../../../target/debug/sparse-05-server");
#[cfg(not(debug_assertions))]
pub const SPARSE_LINUX_SERVER_BINARY: &'static [u8] =
include_bytes!("../../../../target/release/sparse-05-server");
include_bytes!(std::env!("SPARSE_LINUX_SERVER"));
#[cfg(debug_assertions)]
pub const SPARSE_WINDOWS_SERVER_BINARY: &'static [u8] =
include_bytes!("../../../../target/x86_64-pc-windows-gnu/debug/sparse-05-server.exe");
#[cfg(not(debug_assertions))]
pub const SPARSE_WINDOWS_SERVER_BINARY: &'static [u8] =
include_bytes!("../../../../target/x86_64-pc-windows-gnu/release/sparse-05-server.exe");
include_bytes!(std::env!("SPARSE_WINDOWS_SERVER"));
pub async fn generate(mut name: PathBuf, port: u16, target: TargetOs) -> anyhow::Result<()> {
let mut csprng = rand::thread_rng();