mirror of
https://github.com/nelsbrock/fingerprunk.git
synced 2026-08-15 00:16:47 +02:00
Compare commits
4
Commits
241fecd8a7
..
0.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
890d8fa0be
|
||
|
|
112a6b087b
|
||
|
|
fe984f2e43
|
||
|
|
b1450070d1
|
Generated
+471
-399
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "fingerprunk"
|
name = "fingerprunk"
|
||||||
version = "0.2.0"
|
version = "0.2.2"
|
||||||
authors = ["Niklas Elsbrock <mail@nelsbrock.de>"]
|
authors = ["Niklas Elsbrock <mail@nelsbrock.de>"]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "CLI tool for brute-forcing OpenPGP keys with cool fingerprints"
|
description = "CLI tool for brute-forcing OpenPGP keys with cool fingerprints"
|
||||||
@@ -10,11 +10,11 @@ keywords = ["fingerprint", "openpgp", "bruteforce"]
|
|||||||
categories = ["command-line-utilities"]
|
categories = ["command-line-utilities"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.100"
|
anyhow = "1.0.102"
|
||||||
clap = { version = "4.5.50", features = ["derive"] }
|
clap = { version = "4.6.0", features = ["derive"] }
|
||||||
ctrlc = "3.5.0"
|
ctrlc = "3.5.2"
|
||||||
fancy-regex = "0.16.2"
|
fancy-regex = "0.17.0"
|
||||||
num-integer = "0.1.46"
|
num-integer = "0.1.46"
|
||||||
num_cpus = "1.17.0"
|
num_cpus = "1.17.0"
|
||||||
rpassword = "7.4.0"
|
rpassword = "7.4.0"
|
||||||
sequoia-openpgp = "2.0.0"
|
sequoia-openpgp = "2.2.0"
|
||||||
|
|||||||
+5
-5
@@ -72,7 +72,7 @@ impl Fingerprunk {
|
|||||||
pub fn run(mut self) -> anyhow::Result<()> {
|
pub fn run(mut self) -> anyhow::Result<()> {
|
||||||
self.started_instant = Instant::now();
|
self.started_instant = Instant::now();
|
||||||
|
|
||||||
let (sender, receiver) = mpsc::channel();
|
let (sender, receiver) = mpsc::sync_channel(16);
|
||||||
|
|
||||||
{
|
{
|
||||||
let sender = sender.clone();
|
let sender = sender.clone();
|
||||||
@@ -133,7 +133,7 @@ impl Fingerprunk {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn worker_thread(&self, sender: mpsc::Sender<Message>) {
|
fn worker_thread(&self, sender: mpsc::SyncSender<Message>) {
|
||||||
let mut fingerprint_hex = String::with_capacity(20 * 2);
|
let mut fingerprint_hex = String::with_capacity(20 * 2);
|
||||||
|
|
||||||
while !self.stop.load(Ordering::Relaxed) {
|
while !self.stop.load(Ordering::Relaxed) {
|
||||||
@@ -143,9 +143,9 @@ impl Fingerprunk {
|
|||||||
write!(fingerprint_hex, "{:X}", key.fingerprint())
|
write!(fingerprint_hex, "{:X}", key.fingerprint())
|
||||||
.expect("should write into string without error");
|
.expect("should write into string without error");
|
||||||
if self.check_fingerprint(&fingerprint_hex) {
|
if self.check_fingerprint(&fingerprint_hex) {
|
||||||
sender
|
// The channel might already be closed here if we're stopping.
|
||||||
.send(Message::Key(Key::V4(key)))
|
// That is fine, so we just ignore the error.
|
||||||
.expect("should be able to send key");
|
let _ = sender.send(Message::Key(Key::V4(key)));
|
||||||
}
|
}
|
||||||
self.counter_tried.fetch_add(1, Ordering::Relaxed);
|
self.counter_tried.fetch_add(1, Ordering::Relaxed);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user