Skip to content

Commit

Permalink
Bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
exti0p committed Sep 29, 2022
1 parent 4796f19 commit c26c91f
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 63 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.5] - 2022-09-29

### Fixed

- Bump dependencies

## [0.3.4] - 2022-09-21

### Fixed
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git2mail"
version = "0.3.4"
version = "0.3.5"
authors = ["exti0p"]
edition = "2021"
license = "LGPL-3.0-only"
Expand All @@ -13,14 +13,14 @@ categories = ["command-line-utilities"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = "3.2.12"
itertools = "0.10.3"
clap = "4.0.4"
itertools = "0.10.5"
lazy_static = "1.4.0"
openssl = { version = "0.10.41", features = ["vendored"] }
openssl = { version = "0.10.42", features = ["vendored"] }
regex = "1.6.0"
reqwest = { version = "0.11.11", features = ["blocking", "json"] }
serde = { version = "1.0.139", features = ["derive"] }
serde_json = "1.0.82"
reqwest = { version = "0.11.12", features = ["blocking", "json"] }
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.85"

# logging
log = "0.4.17"
Expand Down
118 changes: 62 additions & 56 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,75 @@ use controller::{Search, SearchTrait};
fn run() {
log::info!("Starting git2mail!");

let argv: ArgMatches = Command::new("git2mail")
.author("exti0p")
.about("Pure Rust OSINT tool to find a GitHub user's email")
.arg(
Arg::new("url")
.short('u')
.long("url")
.help("GitHub repository or profile URL you want to scan")
.takes_value(true),
)
.arg(
Arg::new("query")
.short('q')
.long("query")
.help("Query to find interesting GitHub repositories for you")
.takes_value(true),
)
.arg(
Arg::new("language")
.short('l')
.long("language")
.help("Select a language to enhance your repository searches")
.takes_value(true),
)
.arg(
Arg::new("limit")
.long("limit")
.default_value("5")
.help("Defines the limit of scanned repositories")
.takes_value(true),
)
.arg(
Arg::new("token")
.short('t')
.long("token")
.help("Authenticate to the GitHub API with your GitHub token")
.takes_value(true),
)
.arg(
Arg::new("token-file")
.long("token-file")
.help(
"JSON file that contains your GitHub tokens to authenticate to the GitHub API",
)
.takes_value(true),
)
.get_matches();
let argv: ArgMatches =
Command::new("git2mail")
.author("exti0p")
.about("Pure Rust OSINT tool to find a GitHub user's email")
.arg(
Arg::new("url")
.short('u')
.long("url")
.help("GitHub repository or profile URL you want to scan"),
)
.arg(
Arg::new("query")
.short('q')
.long("query")
.help("Query to find interesting GitHub repositories for you"),
)
.arg(
Arg::new("language")
.short('l')
.long("language")
.help("Select a language to enhance your repository searches"),
)
.arg(
Arg::new("limit")
.long("limit")
.default_value("5")
.help("Defines the limit of scanned repositories"),
)
.arg(
Arg::new("token")
.short('t')
.long("token")
.help("Authenticate to the GitHub API with your GitHub token"),
)
.arg(Arg::new("token-file").long("token-file").help(
"JSON file that contains your GitHub tokens to authenticate to the GitHub API",
))
.get_matches();

let url: String = argv
.get_one::<String>("url")
.unwrap_or(&"".to_string())
.to_string();
let query: String = argv
.get_one::<String>("query")
.unwrap_or(&"".to_string())
.to_string();

let mut search = <Search as SearchTrait>::new(
argv.value_of("url").unwrap_or_default().to_string(),
argv.value_of("query").unwrap_or_default().to_string(),
argv.value_of("language").unwrap_or_default().to_string(),
argv.value_of("token").unwrap_or_default().to_string(),
argv.value_of("token-file").unwrap_or_default().to_string(),
argv.value_of("limit")
.unwrap_or_default()
url.clone(),
query.clone(),
argv.get_one::<String>("language")
.unwrap_or(&"".to_string())
.to_string(),
argv.get_one::<String>("token")
.unwrap_or(&"".to_string())
.to_string(),
argv.get_one::<String>("token-file")
.unwrap_or(&"".to_string())
.to_string(),
argv.get_one::<String>("limit")
.unwrap_or(&"".to_string())
.parse::<u8>()
.unwrap_or_default(),
);

if argv.is_present("url") {
if !url.is_empty() {
search.scan_target();
} else if argv.is_present("query") {
} else if !query.is_empty() {
search.aggregate_search();
}
}
Expand Down

0 comments on commit c26c91f

Please sign in to comment.