Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Jul 9, 2024
1 parent b88443b commit cb87771
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ fn format() {
template.info.metadata = BTreeMap::from_iter([
(
"verified".to_string(),
engine::serde_format::Value::Bool(vendor.as_str() != "00_unverified"),
engine::serde_format::Value::Bool(vendor.as_str() != "00_unknown"),
),
(
"vendor".to_string(),
Expand All @@ -326,8 +326,8 @@ fn format() {
}
}

fn to_json() {
let current_fingerprint_dir = env::current_dir().unwrap().join("web-fingerprint");
fn convert_json(dir: &str, filename: &str) {
let current_fingerprint_dir = env::current_dir().unwrap().join(dir);
let yaml_paths = find_yaml_file(&current_fingerprint_dir, true);
let mut templates = Vec::new();
for yaml_path in yaml_paths {
Expand All @@ -347,15 +347,16 @@ fn to_json() {
.create(true)
.append(false)
.truncate(true)
.open("web_fingerprint_v4.json")
.open(filename)
.unwrap();
serde_json::to_writer(f, &templates).unwrap();
}

fn main() {
let config = HelperConfig::default();
if config.convert {
to_json();
convert_json("web-fingerprint", "web_fingerprint_v4.json");
convert_json("service-fingerprint", "service_fingerprint_v4.json");
}
if config.sync {
sync_nuclei();
Expand Down

0 comments on commit cb87771

Please sign in to comment.