Closed emmanuel211g closed 2 years ago
Sorry, I'm not familiar with python. You may want to ask on a python or bitcoin forum.
Why do you have a list of keys in a text file anyway?
from your program trying to find my key with missing characters
Do you have your address or public key for comparison or are you going to check each address in a block explorer?
i have the address and the key list from your program just converting list to addresses so i can search list to see if my address pops up.
plus i came with this i just.
import random
from bit import *
count=0
while True:
count+=1
c1 = ('K')
c2 = str (random.choice('xyzw'))
c3 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c4 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c5 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c6 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c7 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c8 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c9 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c10 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c11 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c12 = str (random.choice('123456789qwertyuiopasdfghjkzxcvbnmQWERTYUPASDFGHJKLZXCVBNM'))
c13 = ('1')
c14 = ('1')
c15 = ('1')
c16 = ('1')
c17 = ('1')
c18 = ('1')
c19 = ('1')
c20 = ('1')
c21 = ('1')
c22 = ('1')
c23 = ('1')
c24 = ('1')
c25 = ('1')
c26 = ('1')
c27 = ('1')
c28 = ('1')
c29 = ('1')
c30 = ('1')
c31 = ('1')
c32 = ('1')
c33 = ('1')
c34 = ('1')
c35 = ('1')
c36 = ('1')
c37 = ('1')
c38 = ('1')
c39 = ('1')
c40 = ('1')
c41 = ('1')
c42 = ('1')
c43 = ('1')
c44 = ('1')
c45 = ('1')
c46 = ('1')
c47 = ('1')
c48 = ('1')
c49 = ('1')
c50 = ('1')
c51 = ('1')
c52 = ('1')
private_key_WIF = (c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+c11+c12+c13+c14+c15+c16+c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+c32+c33+c34+c35+c36+c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+c48+c49+c50+c51+c52)
file = open('keys10g.txt', 'a')
file.write(private_key_WIF + '\n')
file.close()
print(private_key_WIF)
i have the address and the key list from your program just converting list to addresses so i can search list to see if my address pops up.
I'll add the option to check the keys against the provided address instead of ignoring it in next release, but for now if you can compile c# here is a simple console app using my own NuGet package. The speed shouldn't be a problem for a couple of hundred keys:
using Autarkysoft.Bitcoin.Cryptography.Asymmetric.KeyPairs;
using Autarkysoft.Bitcoin.Encoders;
using System;
using System.IO;
public static void Main(string[] args)
{
string expected = ""; // Enter address here
string[] allKeys = File.ReadAllLines(@"C:\KEYS.txt"); // Enter correct path here
foreach (string wif in allKeys)
{
try
{
using PrivateKey key = new(wif);
PublicKey pub = key.ToPublicKey();
string actual1 = Address.GetP2pkh(pub, true);
string actual2 = Address.GetP2pkh(pub, false);
if (expected == actual1 || expected == actual2)
{
Console.Write("Found the correct key: ");
Console.WriteLine(wif);
break;
}
}
catch
{
}
}
Console.ReadLine();
}
was the above code added to new release.
No, this code isn't but the option to check each key that the program recovers itself is.
I put some code together from other codes to convert the compress wif to address but its slow can you help. from bitcoin import *
f = open('boom.txt', 'r') privates = [] line = f.readline()
while line != "": line = line[0 :-1] privates.append (line) line = f.readline()
f.close()
for priv in privates: pub = privtopub(priv) addr = pubtoaddr(pub) wif = encode_privkey(priv, 'wif') file = open('boom_convert.txt', 'a') file.write(wif + '\n' + addr + '\n\n')
file.close() print (wif)