add bulk wallet and paper wallet generator scripts

This commit is contained in:
U-CATHOLICCHARITI\salfter
2013-07-12 11:01:09 -07:00
parent 06c095e064
commit 1f3c3fa70f
2 changed files with 43 additions and 0 deletions

12
bulkwallet.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# a simple bulk-wallet generator
#
# 3 arguments needed: address version, pattern, count
#
# some address versions:
# 0 Bitcoin
# 23 Primecoin
# 48 Litecoin
./vanitygen -kF compressed -X $1 $2 2>/dev/null | egrep "Address|Privkey" | awk '{printf("%s ", $2); getline; printf("%s\n",$2)}' | head -n $3

31
paperwallet.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# paper wallet generator
#
# takes a list of addresses and privkeys (as produced by bulkwallet.sh) on
# stdin, produces HTML output with QR codes
#
# depends on base64 and qrencode
cat <<EOF
<html>
<body>
<h1>Paper Wallet for
EOF
whoami
cat <<EOF
</h1><h2>Generated
EOF
date
cat <<EOF
</h2>
<table style="table-layout: fixed; word-wrap: break-word; width: 800px;">
EOF
sed "s/\(.*\) \(.*\)/echo -en \"<tr><td style=\\\\\"text-align: center; width: 150px;\\\\\"><img src=\\\\\"data:image\/png;base64,\"; qrencode -l L -o - \1 | base64 -w 0; echo \"\\\\\" \\\\><\/td><td style=\\\\\"width: 500px; font-family: monospace;\\\\\"><p style=\\\\\"text-align: left;\\\\\">\1<\/p><p style=\\\\\"text-align: right;\\\\\">\2<\/p><\/td><td style=\\\\\"text-align: center; width: 150px;\\\\\"><img src=\\\\\"data:image\/png;base64,\"; qrencode -l L -o - \2 | base64 -w 0; echo \"\\\\\" \\\\><\/td><\/tr>\"/" | bash
cat <<EOF
</table>
</body>
</html>
EOF