Code Monkey home page Code Monkey logo

Comments (8)

streamofstars avatar streamofstars commented on August 15, 2024 2

If you have access to a Windows 10 machine you may have more success using Windows Subsystem for Linux with Ubuntu instead of Cygwin. Within WSL you can compile and run the tool the same way as you would on normal Linux machine. Since @matja provided only instructions for Gentoo, which I believe is not a very popular distro nowadays, let me give you steps for Ubuntu:

sudo apt install git make gcc libssl-dev
git clone https://github.com/matja/bitcoin-tool
cd bitcoin-tool/
make
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-tool

I have just tested it on Ubuntu 20.04.1 LTS x86_64 minimal image on Google Cloud Virtual Machine. The last step (sudo install...) is not necessary but if you follow it then you will be able to call the tool binary from anywhere in your system by just typing bitcoin-tool <parameters> If you skip that step, you must run either from within the folder you have the binary in or by providing the full path and obviously prepending with dot and slash so e.g. ./bitcoin-tool <parameters>

Also, if you have a file with multiple WIF keys and want to get addresses, your command is wrong. Use the below:
bitcoin-tool --input-type private-key-wif --input-format base58check --input-file YOURFILE.bin --batch --output-type address --output-format base58check

from bitcoin-tool.

dextronomous avatar dextronomous commented on August 15, 2024 2

for that ascii13 error you need to save your txt file trough notepad+ as EOL conversion to unix LF,
after that that error won't be there anymore.

from bitcoin-tool.

streamofstars avatar streamofstars commented on August 15, 2024 1

Extension does not matter, in your example there is key.bin so I used the same one in mine, but it can be anything. The extension does not matter as long as the file is actually a text file and you provide the right name as argument.

from bitcoin-tool.

Mr-N00B avatar Mr-N00B commented on August 15, 2024

bitcoin-tool --input-type private-key-wif --input-format base58check --input-file YOURFILE.bin --batch --output-type address --output-format base58check

regarding the file extension .bin .. I have the WIF keys in text files with .txt extension .. can't I use these text files instead or it has to be converted to .bin?
P.S: My name is not a joke, I'm really noob regarding linux, C & bitcoin 🤣

from bitcoin-tool.

Mr-N00B avatar Mr-N00B commented on August 15, 2024

Extension does not matter, in your example there is key.bin so I used the same one in mine, but it can be anything. The extension does not matter as long as the file is actually a text file and you provide the right name as argument.

ok thank you for your reply .. I will install ubuntu and try out your solution and let you know the results ..

from bitcoin-tool.

Mr-N00B avatar Mr-N00B commented on August 15, 2024

bitcoin-tool --input-type private-key-wif --input-format base58check --input-file YOURFILE.bin --batch --output-type address --output-format base58check
It worked on Ubunto just fine no issues at all .. but I tried using this command and I edited the file name to PKs.txt "which is my text file with the WIF keys" .. it resulted:

Invalid character (ASCII 13)
Failed to decode Base58Check input (invalid format)

BUT not with all of them .. I think this may because the text file encoding itself because I created those files on Windows I'm not sure though .. it read one of the files and it gave the expected results .. now I have a question .. is it possible to make it create a text files and add the results to it? I mean .. I want it to read and convert from A and store them to B .. is it possible?

from bitcoin-tool.

streamofstars avatar streamofstars commented on August 15, 2024

I don't know how the tool behaves when reading files that have mixed line endings. Aside from that, check if all WIFs are OK, maybe some WIFs are incomplete (too short) or you have some extra empty lines in file.
When it comes to the tool output to a file, there is no a switch for that. But of course you can just redirect output to a file. In Linux somecommmand > outputfile.txt:
bitcoin-tool --input-type private-key-wif --input-format base58check --input-file INPUTFILE.TXT --batch --output-type address --output-format base58check > OUTPUTFILE.TXT

from bitcoin-tool.

Mr-N00B avatar Mr-N00B commented on August 15, 2024

The tool works fine on the OS you suggested and following your steps ..
Thank you for taking time to help me solve it ..
regarding this part:
bitcoin-tool --input-type private-key-wif --input-format base58check --input-file INPUTFILE.TXT --batch --output-type address --output-format base58check > OUTPUTFILE.TXT
I have tried this but it works only once then it won't work again if I changed the input and the output files ..
I tried > , >> both won't work more than once ..

from bitcoin-tool.

streamofstars avatar streamofstars commented on August 15, 2024

What do you mean by won't work more than once, do you get any error message?

from bitcoin-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.