Skip to content

Commit c26c91f

Browse files
author
exti0p
committed
Bump dependencies
1 parent 4796f19 commit c26c91f

3 files changed

Lines changed: 75 additions & 63 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.5] - 2022-09-29
9+
10+
### Fixed
11+
12+
- Bump dependencies
13+
814
## [0.3.4] - 2022-09-21
915

1016
### Fixed

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "git2mail"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
authors = ["exti0p"]
55
edition = "2021"
66
license = "LGPL-3.0-only"
@@ -13,14 +13,14 @@ categories = ["command-line-utilities"]
1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

1515
[dependencies]
16-
clap = "3.2.12"
17-
itertools = "0.10.3"
16+
clap = "4.0.4"
17+
itertools = "0.10.5"
1818
lazy_static = "1.4.0"
19-
openssl = { version = "0.10.41", features = ["vendored"] }
19+
openssl = { version = "0.10.42", features = ["vendored"] }
2020
regex = "1.6.0"
21-
reqwest = { version = "0.11.11", features = ["blocking", "json"] }
22-
serde = { version = "1.0.139", features = ["derive"] }
23-
serde_json = "1.0.82"
21+
reqwest = { version = "0.11.12", features = ["blocking", "json"] }
22+
serde = { version = "1.0.145", features = ["derive"] }
23+
serde_json = "1.0.85"
2424

2525
# logging
2626
log = "0.4.17"

src/main.rs

Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,69 +11,75 @@ use controller::{Search, SearchTrait};
1111
fn run() {
1212
log::info!("Starting git2mail!");
1313

14-
let argv: ArgMatches = Command::new("git2mail")
15-
.author("exti0p")
16-
.about("Pure Rust OSINT tool to find a GitHub user's email")
17-
.arg(
18-
Arg::new("url")
19-
.short('u')
20-
.long("url")
21-
.help("GitHub repository or profile URL you want to scan")
22-
.takes_value(true),
23-
)
24-
.arg(
25-
Arg::new("query")
26-
.short('q')
27-
.long("query")
28-
.help("Query to find interesting GitHub repositories for you")
29-
.takes_value(true),
30-
)
31-
.arg(
32-
Arg::new("language")
33-
.short('l')
34-
.long("language")
35-
.help("Select a language to enhance your repository searches")
36-
.takes_value(true),
37-
)
38-
.arg(
39-
Arg::new("limit")
40-
.long("limit")
41-
.default_value("5")
42-
.help("Defines the limit of scanned repositories")
43-
.takes_value(true),
44-
)
45-
.arg(
46-
Arg::new("token")
47-
.short('t')
48-
.long("token")
49-
.help("Authenticate to the GitHub API with your GitHub token")
50-
.takes_value(true),
51-
)
52-
.arg(
53-
Arg::new("token-file")
54-
.long("token-file")
55-
.help(
56-
"JSON file that contains your GitHub tokens to authenticate to the GitHub API",
57-
)
58-
.takes_value(true),
59-
)
60-
.get_matches();
14+
let argv: ArgMatches =
15+
Command::new("git2mail")
16+
.author("exti0p")
17+
.about("Pure Rust OSINT tool to find a GitHub user's email")
18+
.arg(
19+
Arg::new("url")
20+
.short('u')
21+
.long("url")
22+
.help("GitHub repository or profile URL you want to scan"),
23+
)
24+
.arg(
25+
Arg::new("query")
26+
.short('q')
27+
.long("query")
28+
.help("Query to find interesting GitHub repositories for you"),
29+
)
30+
.arg(
31+
Arg::new("language")
32+
.short('l')
33+
.long("language")
34+
.help("Select a language to enhance your repository searches"),
35+
)
36+
.arg(
37+
Arg::new("limit")
38+
.long("limit")
39+
.default_value("5")
40+
.help("Defines the limit of scanned repositories"),
41+
)
42+
.arg(
43+
Arg::new("token")
44+
.short('t')
45+
.long("token")
46+
.help("Authenticate to the GitHub API with your GitHub token"),
47+
)
48+
.arg(Arg::new("token-file").long("token-file").help(
49+
"JSON file that contains your GitHub tokens to authenticate to the GitHub API",
50+
))
51+
.get_matches();
52+
53+
let url: String = argv
54+
.get_one::<String>("url")
55+
.unwrap_or(&"".to_string())
56+
.to_string();
57+
let query: String = argv
58+
.get_one::<String>("query")
59+
.unwrap_or(&"".to_string())
60+
.to_string();
6161

6262
let mut search = <Search as SearchTrait>::new(
63-
argv.value_of("url").unwrap_or_default().to_string(),
64-
argv.value_of("query").unwrap_or_default().to_string(),
65-
argv.value_of("language").unwrap_or_default().to_string(),
66-
argv.value_of("token").unwrap_or_default().to_string(),
67-
argv.value_of("token-file").unwrap_or_default().to_string(),
68-
argv.value_of("limit")
69-
.unwrap_or_default()
63+
url.clone(),
64+
query.clone(),
65+
argv.get_one::<String>("language")
66+
.unwrap_or(&"".to_string())
67+
.to_string(),
68+
argv.get_one::<String>("token")
69+
.unwrap_or(&"".to_string())
70+
.to_string(),
71+
argv.get_one::<String>("token-file")
72+
.unwrap_or(&"".to_string())
73+
.to_string(),
74+
argv.get_one::<String>("limit")
75+
.unwrap_or(&"".to_string())
7076
.parse::<u8>()
7177
.unwrap_or_default(),
7278
);
7379

74-
if argv.is_present("url") {
80+
if !url.is_empty() {
7581
search.scan_target();
76-
} else if argv.is_present("query") {
82+
} else if !query.is_empty() {
7783
search.aggregate_search();
7884
}
7985
}

0 commit comments

Comments
 (0)