Skip to content

Commit 4362d7e

Browse files
committed
v2.4.6 new zip compression method 'Deflated'
1 parent 621e7a6 commit 4362d7e

File tree

5 files changed

+77
-7
lines changed

5 files changed

+77
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 2.4.6 - 2026-01-09
4+
5+
Update Zip Compression Method. Currently the zip is in stored format, opting to change to deflated to save disk space.
6+
Special thanks to [Spyr0](https://github.com/spyr0-sec) for pull request [#28](https://github.com/g0h4n/RustHound-CE/commit/0b33a16eb77044c8f68b6643c542c70b1e455afc).
7+
38
## 2.4.5 - 2025-12-01
49

510
Testing the GitHub Workflow Action for Rust compilation. Special thanks to [@aancw](https://github.com/aancw) for providing the GitHub workflow action.

Cargo.lock

Lines changed: 63 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords = ["bloodhound", "pentest", "ldap", "tokio", "async"]
66
repository = "https://github.com/g0h4n/RustHound-CE"
77
homepage = "https://github.com/g0h4n/RustHound-CE"
88
documentation = "https://docs.rs/rusthound-ce/"
9-
version = "2.4.5"
9+
version = "2.4.6"
1010
edition = "2021"
1111
license = "MIT"
1212
readme = "README.md"

src/json/maker/common.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use log::{info, debug, trace};
77
use std::fs;
88
use std::fs::File;
99
use std::io::{Seek, Write};
10+
use std::error::Error;
11+
1012
use zip::result::ZipResult;
1113
use zip::write::{SimpleFileOptions, ZipWriter};
1214

@@ -76,12 +78,13 @@ pub fn add_file<T: LdapObject>(
7678
domain: &String,
7779
path: &String,
7880
json_result: &HashMap<String, String>
79-
){
81+
) -> Result<String, Box<dyn Error>> {
8082
let final_path = format!("{}/{}_{}_rusthound-ce.zip",path,datetime,domain);
8183
let mut file = File::create(&final_path).expect("Couldn't create file");
8284
create_zip_archive(&mut file, json_result).expect("Couldn't create archive");
8385

8486
info!("{} created!",&final_path.bold());
87+
Ok(final_path)
8588
}
8689

8790

src/json/maker/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::utils::date::return_current_fulldate;
88
pub mod common;
99

1010
/// This function will create json output and zip output
11-
pub fn make_result(common_args: &Options, ad_results: ADResults) -> Result<(), Box<dyn Error>> {
11+
pub fn make_result(common_args: &Options, ad_results: ADResults) -> Result<String, Box<dyn Error>> {
1212
// Format domain name
1313
let filename = common_args.domain.replace(".", "-").to_lowercase();
1414

@@ -126,11 +126,11 @@ pub fn make_result(common_args: &Options, ad_results: ADResults) -> Result<(), B
126126
)?;
127127
// All in zip file
128128
if common_args.zip {
129-
common::make_a_zip(
129+
return Ok(common::make_a_zip(
130130
&datetime,
131131
&filename,
132132
&common_args.path,
133-
&json_result);
133+
&json_result)?)
134134
}
135-
Ok(())
135+
Ok(String::from("No zip full path"))
136136
}

0 commit comments

Comments
 (0)