def main():
    counter = 0
    try:
        if args.n:
            fp = open("ga1", "a+")
            for i in xrange(args.n):
                print counter
                private_key = "".join(["%x" % randrange(16) for x in range(0, 64)])
                wif = utils.base58CheckEncode(0x80, private_key.decode("hex"))
                address = utils.pubKeyToAddr(utils.privateKeyToPublicKey(utils.wifToPrivateKey(wif)))
                fp.write("PK: " + private_key + "\n" + "WIF: " + wif + "\n" + "ADDR: " + address + "\n")
                counter = counter + 1
            fp.close()
            print "File successfully closed."
    except KeyboardInterrupt:
        print "[!] User Keyboard Interrupt"
        fp.close()
        print "File successfully closed."

    print "Exiting."
    exit()
Exemple #2
0
def main():
    counter = 0
    try:
        if args.n:
            fp = open("ga1", 'a+')
            for i in xrange(args.n):
                print counter
                private_key = ''.join(
                    ['%x' % randrange(16) for x in range(0, 64)])
                wif = utils.base58CheckEncode(0x80, private_key.decode('hex'))
                address = utils.pubKeyToAddr(
                    utils.privateKeyToPublicKey(utils.wifToPrivateKey(wif)))
                fp.write("PK: " + private_key + '\n' + "WIF: " + wif + '\n' +
                         "ADDR: " + address + '\n')
                counter = counter + 1
            fp.close()
            print "File successfully closed."
    except KeyboardInterrupt:
        print "[!] User Keyboard Interrupt"
        fp.close()
        print "File successfully closed."

    print "Exiting."
    exit()
Exemple #3
0
import utils

print

q = int(
    raw_input(
        "1:\tPrivate Key\n2:\tWallet Import Format Private Key\n3:\tPublic Key\n\n[ ] Enter selection: "
    ))

print

if q == 1:
    priv_key = raw_input("[ ] Enter Private Key: ")
    address = utils.pubKeyToAddr(utils.privateKeyToPublicKey(priv_key))
    print
    print "Address: " + address
    print "Private Key: " + priv_key
    print "Wallet Import Format Private Key: " + utils.privateKeyToWif(
        priv_key)
    print "Public Key: " + utils.privateKeyToPublicKey(priv_key)
    info = utils.getInfo(address)
    if info.balance() > 0:
        info.display()

elif q == 2:
    wif_priv_key = raw_input("[ ] Enter Wallet Import Format Private Key: ")
    address = utils.pubKeyToAddr(
        utils.privateKeyToPublicKey(utils.wifToPrivateKey(wif_priv_key)))
    print
    print "Address: " + address
    print "Private key: " + utils.wifToPrivateKey(wif_priv_key)
Exemple #4
0
import utils

print

q = int(raw_input("1:\tPrivate Key\n2:\tWallet Import Format Private Key\n3:\tPublic Key\n\n[ ] Enter selection: "))

print 

if q == 1:
    priv_key = raw_input("[ ] Enter Private Key: ")
    address = utils.pubKeyToAddr(utils.privateKeyToPublicKey(priv_key))
    print
    print "Address: " + address
    print "Private Key: " + priv_key
    print "Wallet Import Format Private Key: " + utils.privateKeyToWif(priv_key)
    print "Public Key: " + utils.privateKeyToPublicKey(priv_key)
    info = utils.getInfo(address)
    if info.balance() > 0:
        info.display()

elif q == 2:
    wif_priv_key = raw_input("[ ] Enter Wallet Import Format Private Key: ")
    address = utils.pubKeyToAddr(utils.privateKeyToPublicKey(utils.wifToPrivateKey(wif_priv_key)))
    print
    print "Address: " + address
    print "Private key: " + utils.wifToPrivateKey(wif_priv_key)
    print "Wallet Import Format Private Key: " + wif_priv_key
    print "Public Key: " + utils.privateKeyToPublicKey(utils.wifToPrivateKey(wif_priv_key))
    info = utils.getInfo(address)
    if info.balance() > 0:
        info.display()