Skip to content

Commit

Permalink
Fix clippy warnings for deucalion client
Browse files Browse the repository at this point in the history
  • Loading branch information
ff14wed committed Jul 6, 2024
1 parent 9b92330 commit e100a4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deucalion-client/src/bin/deucalion_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn main() -> Result<()> {

if args.eject {
info!("Ejecting Deucalion from {pid}");
process::eject_dll(pid, &payload_path)?;
process::eject_dll(pid, payload_path)?;
return Ok(());
}

Expand All @@ -75,7 +75,7 @@ fn main() -> Result<()> {
}

process::copy_current_process_dacl_to_target(pid)?;
process::inject_dll(pid, &payload_path, args.force)?;
process::inject_dll(pid, payload_path, args.force)?;

let subscriber = Subscriber::new();

Expand Down
4 changes: 2 additions & 2 deletions deucalion-client/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ pub fn inject_dll<P: AsRef<Path>>(target_pid: usize, payload_path: P, force: boo
let target_process = OwnedProcess::from_pid(target_pid as u32)?;
let syringe = Syringe::for_process(target_process);
let _injected_payload = if force {
syringe.inject(payload_path)?;
syringe.inject(payload_path)?
} else {
syringe.find_or_inject(payload_path)?;
syringe.find_or_inject(payload_path)?
};
Ok(())
}
Expand Down
6 changes: 6 additions & 0 deletions deucalion-client/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ pub struct Subscriber {
shutdown_tx: Arc<OnceCell<mpsc::Sender<()>>>,
}

impl Default for Subscriber {
fn default() -> Self {
Self::new()
}
}

impl Subscriber {
pub fn new() -> Self {
Self {
Expand Down

0 comments on commit e100a4c

Please sign in to comment.