~/hooky

0ac489c11738ef7f94dedd683d8aa2f2dfb34e56 — Arthur Melton e93179c7 2 years ago
payload as feature
2 files changed, 6 insertions(+), 1 deletions(-)

M victim/Cargo.toml
M victim/src/main.rs
M victim/Cargo.toml => victim/Cargo.toml +4 -1
@@ 6,4 6,7 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tempfile = "3.3.0"
tempfile = { version = "3.3.0", optional = true }

[features]
payload = ["dep:tempfile"]

M victim/src/main.rs => victim/src/main.rs +2 -0
@@ 3,9 3,11 @@

    windows_subsystem = "windows"
)]

#[cfg(feature = "payload")]
mod payload;

fn main() -> Result<(), std::io::Error> {
    #[cfg(feature = "payload")]
    payload::run()?;
    Ok(())
}