fix: fixed PE infection
This commit is contained in:
@@ -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()?)
|
||||
|
||||
Reference in New Issue
Block a user