Skip to content

Commit

Permalink
fixing corner case, maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
theflakes committed Dec 21, 2022
1 parent 8a600eb commit 1bedd15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/data_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ Linux Forensic Harvester
This tool comes with no warranty or support.
If anyone chooses to use it, you accept all responsibility and liability.
This tool must be run as root.
Usage:
lin_fh [--ip <ip> --port <port>]
lin_fh [--ip <ip> --port <port>] [--limit]
lin_fh --limit
lin_fh --help
lin_fh --version
Options:
-h, --help Show this screen
-v, --version Show version
-i, --ip <ip> IP address to send output to [default: NONE]
-p, --port <port> Destination port to send output to [default: 80]
-l, --limit Limit CPU use
Expand All @@ -47,6 +47,7 @@ struct Args {
flag_limit: bool
}


lazy_static! {
static ref ARGS: Args = Docopt::new(USAGE)
.and_then(|d| d.deserialize())
Expand Down
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,9 @@ fn find_suid_sgid(already_seen: &mut Vec<String>) -> std::io::Result<()> {

fn is_root() {
if !Uid::effective().is_root() {
println!("[WARNING] - Not running as root, cannot collect all telemetry.");
}
println!("{}", USAGE);
std::process::exit(1);
}
}

// let's start this thing
Expand Down

0 comments on commit 1bedd15

Please sign in to comment.