Check out this link on Github:
https://github.com/apogio/brain21
Just a heads up:
I want to make sure you see this first. Use this script just for fun. Honestly, the human brain is way less effective than even the dumbest computer when it comes to generating randomness.
So here's a bit of background:
Someone asked me to whip up a brain wallet generator in Bash. I took most of the code from BASH21 and tweaked it a bit to accept a phrase as a command line argument, which it then uses to create the wallet.
Requirements:
Now, onto the script:
How to use it:
Make a .sh script file anywhere you want on your computer:
Just copy and paste the code, then save it. The easiest way is to use nano:
Then, make it executable for the current user:
And run it:
When you execute it, you'll get:
1. A file named data.txt that contains sensitive info (like keys) for the wallet.
2. A file called legacy_address.png which shows a QR code for the wallet's legacy (P2PKH) address.
3. A file named segwit_address.png that has a QR code for the wallet's segwit (P2WPKH-P2SH) address.
About the data.txt file:
A few important notes:
1. I didn’t encrypt the sensitive info here like I did in BASH21. This is just another way to show you that this script is meant for fun and nothing serious.
2. Be sure to use single quotes around your phrase. If you don’t, Bash will see each word as a separate argument and you’ll get some crazy results.
3. Remember, in brain wallets, every single character counts. So 'I am the best' is not the same as 'i am the best', or even 'I am the best '.
BRAIN21 A simple Brain Wallet generator using BASH
14 replies 46 views
Why would anyone want to make a brain wallet in 2024?
I know that there is no practical use for this, but I'm not even sure whether there is any educational value in playing with brain wallets anymore. Unless you want to check how fast brainflayers can swipe any coins you insert in one made from a particular string of text. (No seriously, people are investing a lot of resources into that. Maybe they even have GPUs for that purpose.)
I have explained why I implemented it.
A user asked me to do it and it was very easy, so I just posted the solution.
As far as educational value is concerned, well, let's say I couldn't ignore the user who asked me to write the code for that.
Anyway... I couldn't have been more vocal about how nobody should add money to a brain wallet. I even added the warning at the top of the post.
HumbleBullFull Member
Posts: 54 · Reputation: 378
#4Aug 2, 2024, 06:45 PM
I was the user who requested this tool, i was curious about how the code would be for bash Linux, and i really love the result. As you already mentioned, there is a big risk on using this kind of tool to generate the wallet, even the fact that the command we use to generate the wallet stay on the command history is a vulnerability. But for teaching proposes is a great tool.
I remember in 2014 when bitcoin price was really low, in the casinos we used to have fun making giveaways with brainwallets, we used to post the phrase on the chat and the users had to get the private key from that passphrase, it used to be fun.
So, thanks again for this tool apogio
You are welcome! Enjoy! Using the tool is fun, indeed!
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#6Aug 3, 2024, 03:01 AM
can that script work in windows? it seems like everything is written for linux. not everybody is using linux. but alot of people use windows.
I don't consider this an argument to be honest.
Most people use a lot of things that they shouldn't.
If this was an argument, then people shouldn't use Bitcoin because most people use Visa and Mastercard.
I want to show a different path to the world and I believe we should all move to Linux!
I am paid by nobody, which means I develop tools that I like and if people want to use them, they can definitely follow the steps I provide.
1. Unix based operating systems are generally better hardened than Windows. Most linux distros support a lot of free open-source tools to help maintain privacy and security online.
2. Programming is a lot easier on Linux. I am not talking about Bash scripts only, but also about software written in C, C++, Python, Ruby, Java etc.
3. Linux kernel is much more robust than Windows'. It crashes significantly less than Windows.
4. Linux is open-source, which, I support by default!
5. Linux is free! Yeah, I know many people use Windows illegally, but don't forget that Windows is a paid Operating System.
6. Linux is much more lightweight! I think it requires half of the specs that Windows require.
But yeah!
It can run on Windows using WSL.
Imagine how much better Linux is, that Windows added a linux kernel (WSL) inside the OS.
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#8Aug 3, 2024, 12:11 PM
the problem is that windows is still the defacto standard in the real world and computer hardware is often only compatible with windows. even a programmer who prefers to program using a linux based system probably is required to test it on their windows computer
i can't use WSL since it requires windows 10 and i only have windows 7. plus, maybe i'm wrong, but if it's like a 500 MB install, that's like overkill just to be able to run a simple bash script don't you think?
I wouldn't use it when warpwallet exist, but overall it's neat tool and also convenient (since i happen to use Linux).
When someone ask this question, i'd quote this webpage.
Although i'd also point they better use https://github.com/keybase/warpwallet instead.
Yeah, it's definitely overkill for those who don't use Linux. Anyway, VirtualBox is good alternative if you don't mind spare few GB.
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#10Aug 3, 2024, 01:55 PM
I think I tested VirtualBox once and yes, it was cool but I don't like how it wants to take some of my system RAM. its a RAM hog. and I don't like it. we are talking about simple bash scripts and someone shouldn't have to use gigabytes of disk space and reserve RAM just to run a simple bash script. even if they are on windows.
What the guy said about why he wrote it for Linux makes sense. Linux is the defacto standard for programmers. Developers work in Linux unless they are specifically building a Windows product, which he is obviously not doing. And he isn't building a product to sell, he just built this because someone asked for it. So Linux was the obvious choice. If he was building this as a product to sell or as a product to try to get the world to use, obviously also building a Windows compatible version would make sense. But just doing this as a project for someone, it wouldn't really make any sense to choose Windows over Linux unless he happens to specifically be a Windows developer and so felt more comfortable building in Windows. Commercial desktop applications make sense to have a Windows build, but any programming project outside of that narrow scope is likely going to be done in Linux.
Basically, unless you are talking to someone who is specifically a Windows application developer or a Windows build is a requirement of the project, you can assume a programmer is going to build in Linux.
Don't waste your time as larry_vw_1955 likely doesn't want to move his ass from Windows and therefore plays the crybaby card. Yes, WSL is a thing, but it also eats some RAM, well, because it's a whole subsystem to run a Linux environment in parallel to Windows.
You can't get all the cherries on the cake for free...
If it's already too much to just boot a Live Linux on larry's computer (which would be a somewhat safe temporary environment for the Brain wallet generator script btw) then why waste your time any further, seriously!
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#13Aug 6, 2024, 04:59 AM
that would be the absolute last resort. reboot the entire computer just so i can run a single bash script. i'm sure you know of a way i could do it from within windows and NOT using wsl...
In fact, there is nothing wrong with developing in any environment.
Personally, apart from the coding tutorials, I also try to impart an alternative approach:
1. Linux instead of Windows.
2. Open source, instead of closed-source.
3. Verification instead of trust.
Obviously, I am also learning! The road is full of new adventures!
If I knew, I would tell you. I don't like keeping secrets. What I said is that I don't really want to spend time trying to find a solution to make it work on windows!
Github Link added at the top of the OP.
https://github.com/apogio/brain21
Related topics
- Simple Offline Wallet (key-pair) Setup on Linux Without GUI 0
- Using Electrum to Transfer from BRD Wallet with HPS Address 8
- Recovering a Bitcoin wallet and address 8
- Creating a list of non-zero wallets and their balances using Python 4
- CipherSeed: A Comprehensive Guide to Super-Secure Crypto Wallet Backups 5
- What derivation path does mm-gen wallet use? 3