Skip to content

Commit

Permalink
fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
quicktus committed Sep 4, 2022
1 parent bef55ee commit 2b54ebd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ fn main() {
let mut files_found = 0;
let mut files_cracked = 0;

let mut log_file = File::create("steghunt_log").unwrap();
File::create("steghunt_log");
let mut log_file = fs::OpenOptions::new()
.write(true)
.append(true)
.open("steghunt_log")
.unwrap();

if args.mode != Mode::seed {
fs::create_dir_all(args.out_path.clone());
}
Expand Down Expand Up @@ -146,7 +152,7 @@ fn main() {
}
if !err_no_seed {
files_found += 1;
write!(log_file, "{}", str_path);
write!(log_file, "{}\n", str_path);
}

cmd.wait();
Expand Down Expand Up @@ -206,7 +212,7 @@ fn main() {
}
if !err_no_seed {
files_found += 1;
write!(log_file, "{}", str_path);
write!(log_file, "{}\n", str_path);

// crack
let mut cmd = Command::new("stegseek")
Expand Down

0 comments on commit 2b54ebd

Please sign in to comment.