66 puzzle exactly have 4x more difficulty then 64 puzzle.
Are you sure ?
Yes.
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
extern crate bitcoin;
extern crate rand;
extern crate reqwest;
extern crate secp256k1;
extern crate num_cpus;
extern crate thousands;
extern crate threadpool;
extern crate chrono;
use bitcoin::network::Network;
use bitcoin::address::Address;
use bitcoin::key::PrivateKey;
use rand::Rng;
use std::env;
use std::fs::File;
use std::io::Write;
use std::sync::{Arc, Mutex};
use threadpool::ThreadPool;
use chrono::Local;
const TARGET: &str = "1QCbW9HWnwQWiQqVo5exhAnmfqKRrCRsvW";
fn main() {
// Print the current time when the script starts
let current_time = Local::now();
println!("[+] Puzzle search\n[+] Script started at: {}", current_time);
let args: Vec= env::args().collect();
let num_threads = if args.len() < 2 {
num_cpus::get() as u32
} else {
args[1].parse().expect("Failed to parse number of threads")
};
let begin: u128 = 16383;
let end: u128 = 32767;
println!(
"[+] concurrency:{}\n[+] from:{} to:{}\n[+] target:{}",
num_threads,
begin,
end,
TARGET
);
let found_flag = Arc::new(Mutex::new(false));
let pool = ThreadPool::new(num_threads.try_into().unwrap());
for _ in 0..num_threads {
let pool = pool.clone();
let found_flag = found_flag.clone();
pool.execute(move || {
let mut rng = rand::thread_rng();
random_lookfor(rng.gen_range(begin..end), end, found_flag);
});
}
pool.join();
}
fn random_lookfor(begin: u128, end: u128, found_flag: Arc>) {
let secp = bitcoin::secp256k1::Secp256k1::new();
loop {
let value: u128 = rand::thread_rng().gen_range(begin..end);
let private_key_hex = format!("{:0>64x}", value);
let private_key_bytes = hex::decode(&private_key_hex).expect("Failed to decode private key hex");
let private_key: PrivateKey = PrivateKey {
compressed: true,
network: Network::Bitcoin,
inner: bitcoin::secp256k1::SecretKey::from_slice(&private_key_bytes).unwrap(),
};
let public_key = private_key.public_key(&secp);
let address = Address::p2pkh(&public_key, Network::Bitcoin).to_string();
print!(
"\r[+] WIF: {}",
private_key
);
// Check if a match has been found by another thread
let mut found_flag = found_flag.lock().unwrap();
if *found_flag {
break;
}
if address == TARGET {
let current_time = Local::now();
let line_of_dashes = "-".repeat(80);
println!(
"\n[+] {}\n[+] KEY FOUND! {}\n[+] decimal: {} \n[+] private key: {} \n[+] public key: {} \n[+] address: {}\n[+] {}",
line_of_dashes,
current_time,
value,
private_key,
public_key,
address,
line_of_dashes
);
// Set the flag to true to signal other threads to exit
*found_flag = true;
if let Ok(mut file) = File::create("KEYFOUNDKEYFOUND.txt") {
let line_of_dashes = "-".repeat(130);
writeln!(
&mut file,
"\n{}\nKEY FOUND! {}\ndecimal: {} \nprivate key: {} \npublic key: {} \naddress: {}\n{}",
line_of_dashes,
current_time,
value,
private_key,
public_key,
address,
line_of_dashes
)
.expect("Failed to write to file");
} else {
eprintln!("Error: Failed to create or write to KEYFOUNDKEYFOUND.txt");
}
break;
}
}
}
[package]
name = "puzzle"
version = "0.1.0"
edition = "2021"
[dependencies]
threadpool = "1.8.0"
bitcoin_hashes = "0.13.0"
bitcoin = "0.31.1"
hex = "0.4.3"
rand = "0.8.5"
reqwest = "0.11.23"
secp256k1 = "0.28.1"
num_cpus = "1.16.0"
thousands = "0.2.0"
chrono = "0.4"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
export PATH="$HOME/.cargo/bin:$PATH"
cargo new puzzle
cd puzzle
cargo build --release
cargo run
./target/release/puzzle
print!(
"\r[+] WIF: {}",
private_key
);