Show Posts
|
Pages: « 1 2 [3]
|
can you correct this code: from coinkit.keypair import BitcoinKeypair
with open("prvkey.txt","r") as f: in_prvkey = f.readlines() in_prvkey = [x.strip() for x in in_prvkey] f.close() #print in_prvkey
outfile = open("prvkey2add.txt","w") for x in in_prvkey: k = BitcoinKeypair(x) print k outfile.write(k.address(x)+"\n") outfile.close() the output file part (kindly also adding some library that up to date and support all prvtkys format ) - read private keys from a file - output public address
|
|
|
Assuming that private key is valid, that means the library doesn't support WIF (with compressed key) format. You might want to convert it to WIF (uncompressed key) or use another library such as https://github.com/ofek/bit. Besides, library mentioned by @seoincorporation is outdates (last commit in 2014) yes my key valid and tested: 5JFJnRWLYgPV8vrhzmox8rHru42ACUnM8Y44eG7QtFqPUCyHdRP this key not (5JFJnRWLYgPV8vrhzmox8rHru42ACUnM8Y44eG7QtFqPUCyHdRP) i need to work offline this wint help https://github.com/ofek/bit. could you please take a look and fix this from coinkit.keypair import BitcoinKeypair
with open("prvkey.txt","r") as f: in_prvkey = f.readlines() in_prvkey = [x.strip() for x in in_prvkey] f.close() #print in_prvkey
outfile = open("prvkey2add.txt","w") for x in in_prvkey: k = BitcoinKeypair(x) print k outfile.write(k.address(x)+"\n") outfile.close() -read private keys [and support all keys format] from a file -give output public addresses all line by line [only addresses]
|
|
|
make sure your indentations are correct... Tab =/= space
As for writing to a file... file= open("outputfile.txt","a+") file.write("key %s\r\n" % firstline) file.close()
I'll be heading home for the day, if you have more questions... Don't hesitate to ask them, i'll be answering them tomorrow (or somebody else will probably help you out in my absence)
it print correct result but in outputfile.txt file always containing the last line in file1 have a good day now i am using this batch for temporally solution @echo off comprs.py >> 3.txt exit
|
|
|
i tried to add a line to redirecting print output to a 3.txt i need the proper line print(firstline) , file=open("3.txt", "a")) errors >>IndentationError: unexpected indent >>SyntaxError: invalid syntax
|
|
|
in python, that's relatively easy... I wrote this code from memory (and copy/pasted 2 lines from the source i mentioned below), it should work, but typos might happen firstfile= [line.rstrip('\n') for line in open("textfile_containing_first_list.txt")] secondfile= [line.rstrip('\n') for line in open("textfile_containing_second_list.txt")] for firstline in firstfile: if firstline in secondfile: print(firstline)
part of the source : https://qiita.com/visualskyrim/items/1922429a07ca5f974467 (i was to lazy to write a loop over a filehandle from memory) 5 STARS thank you so much
|
|
|
i found the python script i used in the past for the same propose, it's called coinkit: from coinkit.keypair import BitcoinKeypair k = BitcoinKeypair('5Jx4txgXUCe1kP8mBLEZrLSsZm9WRin8xijWvVW8RACzHn2ZzBH') d = k.address() print (d) For more information look at: https://github.com/mflaxman/coinkit i made few changes to read filess contain prvtkey and give pubadd as output can you please take a look and fix it from coinkit.keypair import BitcoinKeypair
with open("prvkey.txt","r") as f: in_prvkey = f.readlines() in_prvkey = [x.strip() for x in in_prvkey] f.close() #print in_prvkey
outfile = open("prvkey2add.txt","w") for x in in_prvkey: k = BitcoinKeypair(x) print k outfile.write(k.address(x)+"\n") outfile.close()
|
|
|
why do you have so many keys to check anyways?
many satoshi's bitcoin are missing out there for someone to take them i want to take my chances of getting one of this lost wallets Ridiculous. Why the hell did you even mention that "100k to 500k" range? this number help me to estimate the time needed to treat for big files all i do after is *10 or *100 500k few sec...etc
|
|
|
why do you have so many keys to check anyways?
many satoshi's bitcoin are missing out there for someone to take them i want to take my chances of getting one of this lost wallets
|
|
|
compare every lines in file1 with lines in file2 string comparative not only first number do this file1 1FFYY4EGHTVBWHEQbPcceME9YA6BWnEJxK 1GYeVf48v55hWHwynqgpXSnP84A96K9JxJ 1Ji25E8DaLpsgekWhkQk4UG5L6pz468EKy 1K5MT7BbKvCj4YeALeoEQr5sK2bH2uZdWi 1KRQjx2T31HC5boSoj9h3eMxHPkTFVtcJX file2 1C1wxy5pcFj9KBFDFFnVyUYr7puT8abHaW 1K5MT7BbKvCj4YeALeoEQr5sK2bH2uZdWi 1Ly8X7xSoJdM6nfZSi1HDQuBjMjiuiev1r 12ux1FpMq5iJ14wycDV2DpBcqxHTTGPSjC 16jw8vgKjA8DThTwpBb3pfk6tGbMHWnz6x output 1K5MT7BbKvCj4YeALeoEQr5sK2bH2uZdWi
|
|
|
I reply again because i found the python script i used in the past for the same propose, it's called coinkit: from coinkit.keypair import BitcoinKeypair k = BitcoinKeypair('5Jx4txgXUCe1kP8mBLEZrLSsZm9WRin8xijWvVW8RACzHn2ZzBH') d = k.address() print (d) For more information look at: https://github.com/mflaxman/coinkit thank you for the 4 linescode but it not working for all keys from coinkit.keypair import BitcoinKeypair k = BitcoinKeypair('5JFJnRWLYgPV8vrhzmox8rHru42ACUnM8Y44eG7QtFqPUCyHdRP') d = k.address() print (d)
>getaddress.py 1crof2axcuUxNc6aBkNM9aoawoJxpf8vg
from coinkit.keypair import BitcoinKeypair k = BitcoinKeypair('L3inaKfhAkUWJfDP3y7Cu26iAe7BsKPHu71NeZCXZzgVgdXMxrAR') d = k.address() print (d)
>getaddress.py File "getaddress.py", line 1
>getaddress.py ^ SyntaxError: invalid syntax
|
|
|
i am looking for some codes that only use a specific characters not all base58 ?
No, unfortunately this is not possible. The only way to go is like this: private key -> public key -> address. It is not possible because you are not generating public addresses , but privatekeys. You are thinking that you need a public address of just a few characters, but that's not what you need. You need the private keys of that address. Understand the difference?is it possible to get p2pkh bitcoin addresses throw a passphrase or seed?
|
|
|
Also, finding such an address will take longer than you think.
you can't your chance few trillions of trillions lighting years
|
|
|
not bruteforce generating and comparing totally offline no public database needed there's no other way to do that, and you can do it offline finding/generating specific public address can only be done by randomly generating private key and checking the corresponding public address i am looking for some codes that only use a specific characters not all base58 ?
by adding the -r regex (regular expression) option to the vanitygen you can set it to find addresses contain only those 22 alphabets I'm not sure this right but for example, regex ^1crof[0-9].*$ it will find addresses that start with 1crof and followed only by numbers this is what i was looking for
|
|
|
You are looking for a vanity generator. You want more 1crof addresses, right? Those programs work like this. You specify that you want 1crof in your address. So this program will bruteforce thousands of privatekeys and see if any of them matches 1cfofs in their public addresses. It is a long a slow process. The longest is the phrase you want, the longest will be your waiting time until the program finds the privatekey for that address. There is this guide dome by 1miau https://bitcointalk.org/index.php?topic=5096373.0vanity almost old like bitcoin 1crof2axcuUxNc6aBkNM9aoawoJxpf8vg 5JFJnRWLYgPV8vrhzmox8rHru42ACUnM8Y44eG7QtFqPUCyHdRP not bruteforce generating and comparing totally offline no public database needed i am looking for some codes that only use a specific characters not all base58 ?
|
|
|
The problem about this is that you need two steps, the first one (and the easy one) is to get the address from the private key, for that you can use a tool like this: https://github.com/blockstack/pybitcoinAnd the second step is the complex one... Verify the address balance, for this, you can use an API from some block explorer to verify if the address has balance, or another way is to do it directly with bitcoin core. But i think the best way to do it and to save time is to import all those private keys to bitcoin core, that way you will not waste time calling the API to verify if they have balance or not. thank you for replying i used electrum to extract public address but crashing can i find this? SOMECODES.py file_contain_private_keys.txt output>> file_contain_public_keys.txt
|
|
|
for example
i have this address:
1crof2axcuUxNc6aBkNM9aoawoJxpf8vg
containing charterers : 1crof2axuUN6BkM9wJp8vg [22 charterers ]
is it possible to generate some addresses somehow using only this [22 charterers ]
base22
|
|
|
do something like - read public address from a file - check for balance and tx - print output
with more option: - get the public key from the private key and test it with blockchain api - check for balance and tx - print output
|
|
|
hello,
can anyone help or direct me where i can find it
it will better if the script test files with 100k to 500k bitcoin privates keys
|
|
|
|