Now I am glad I did not find my script - this is much easier to use, and more elegant.
Thank you both for your help!
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
import sys, os
# Try to add the Armory libraries to the path for various platforms
if sys.platform == "win32":
progfiles_path = os.environ.get("ProgramFiles", r"C:\Program Files") # default is for XP
armory_path = progfiles_path + r"\Armory"
sys.path.extend((armory_path, armory_path + r"\library.zip"))
# 64-bit Armory might install into the 32-bit directory; if this is 64-bit Python look in both
import struct
if struct.calcsize('P') * 8 == 64: # calcsize('P') is a pointer's size in bytes
assert not progfiles_path.endswith("(x86)"), "ProgramFiles doesn't end with '(x86)' on x64 Python"
progfiles_path += " (x86)"
armory_path = progfiles_path + r"\Armory"
sys.path.extend((armory_path, armory_path + r"\library.zip"))
elif sys.platform.startswith("linux"):
sys.path.append("/usr/lib/armory")
elif sys.platform == "darwin": # untested
sys.path.append("/Applications/Armory.app/Contents/MacOS/py/usr/lib/armory")
from armoryengine import PyBtcWallet
from CppBlockUtils import SecureBinaryData
from hashlib import sha256
from getpass import getpass
# Hack to prevent Armory from overwriting an existing wallet file
def open_noclobber(name, mode='r'):
if 'w' in mode:
if os.path.exists(name):
raise IOError("won't overwrite existing file '{}'".format(name))
return open(name, mode)
PyBtcWallet.open = open_noclobber
password = getpass('Password>')
if not password:
sys.exit('A password is required')
if getpass('Verify password>') != password:
sys.exit("Passwords don't match")
cards = raw_input('Cards> ')
if len(cards.replace(' ', '')) < 50: # 2 letters per card
sys.exit('Requires a bare minimum of 25 cards')
entropy = sha256(cards).digest()
if raw_input('Also add additional OS-supplied entropy (Y/n)? ').lower().strip() == 'n':
wallet = PyBtcWallet.PyBtcWallet().createNewWallet(plainRootKey=entropy, securePassphrase=password, doRegisterWithBDM=False)
else:
wallet = PyBtcWallet.PyBtcWallet().createNewWallet(extraEntropy=SecureBinaryData(entropy), securePassphrase=password, doRegisterWithBDM=False)
print 'New wallet created with ID', wallet.uniqueIDB58