Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaylor89 committed Aug 18, 2024
1 parent 55e50b9 commit e1272eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async fn main() -> Result<()> {
true => targets,
false => targets
.into_iter()
.filter(|(site, _)| cli.site_list.contains(&site))
.filter(|(site, _)| cli.site_list.contains(site))
.collect(),
};

Expand Down
4 changes: 2 additions & 2 deletions src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn save_results(

if let Some(output_folder) = output_folder {
// make sure the output folder exists
std::fs::create_dir_all(&output_folder)?;
std::fs::create_dir_all(output_folder)?;
}

let output_file = match (output_file, output_folder) {
Expand All @@ -60,7 +60,7 @@ pub fn save_results(
writeln!(file, "Total Websites Username Detected On: {}", total_hits)?;

if csv {
write_csv(&username, &results, output_folder, print_all, print_found)?;
write_csv(username, &results, output_folder, print_all, print_found)?;
}

if xlsx {
Expand Down
12 changes: 5 additions & 7 deletions src/sherlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct RequestResult {
}

pub async fn check_username(
username: &String,
username: &str,
site_data: HashMap<String, TargetInfo>,
timeout: u64,
proxy: Option<&String>,
Expand All @@ -52,11 +52,11 @@ pub async fn check_username(
// ping sites for username matches
for (site, info) in site_data.into_iter() {
add_result_to_channel(
username.clone(),
username.to_owned(),
site,
info,
timeout,
proxy.map(|s| s.clone()),
proxy.cloned(),
tx.clone(),
)?;
}
Expand Down Expand Up @@ -129,10 +129,8 @@ pub async fn check_username(
if error_codes.contains(&status_code) {
status = QueryStatus::Available;
}
} else {
if &status_code > &399 || &status_code < &200 {
status = QueryStatus::Available;
}
} else if !(200..=399).contains(&status_code) {
status = QueryStatus::Available;
}

status
Expand Down

0 comments on commit e1272eb

Please sign in to comment.