commit 6949e809eb6b7eba600dd8e2765179cda010f9ef Author: mehbark Date: Thu Nov 13 00:15:02 2025 -0500 initial dumb version diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..eac58d9 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,100 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "hex-literal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "social-hash-brute" +version = "0.1.0" +dependencies = [ + "hex-literal", + "sha2", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..8fa28c5 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "social-hash-brute" +version = "0.1.0" +edition = "2024" + +[dependencies] +hex-literal = "1.1.0" +sha2 = "0.10.9" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..494dfb7 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,44 @@ +use std::{process, thread}; + +use hex_literal::hex; +use sha2::{Digest, Sha256}; + +const TARGET: [u8; 32] = hex!("5acd39e18f0b85b469e593a710883890a044f4548a098ff5ef14c159d17bc40e"); + +fn main() { + let threads: Vec<_> = (b'a'..=b'z') + .map(|a| { + thread::spawn(move || { + eprintln!("i am {}, and i have started", char::from(a)); + for b in b'a'..=b'z' { + for c in b'a'..=b'z' { + for d in b'a'..=b'z' { + for e in b'a'..=b'z' { + for f in b'a'..=b'z' { + for g in b'a'..=b'z' { + let word = [a, b, c, d, e, f, g]; + let mut hasher = Sha256::new(); + hasher.update(b"social."); + hasher.update(word); + hasher.update(".space"); + + let digest = hasher.finalize(); + if digest[..] == TARGET { + println!("{}", String::from_utf8_lossy(&word)); + process::exit(0); + } + } + } + } + } + } + } + eprintln!("i am {}, and i have failed", char::from(a)); + }) + }) + .collect(); + for thread in threads { + thread.join().unwrap(); + } + process::exit(1); +}