Bitcoin Forum
June 08, 2024, 07:06:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need some help on a py-script <SOLVED>  (Read 667 times)
donGeilo (OP)
Full Member
***
Offline Offline

Activity: 169
Merit: 100



View Profile
August 01, 2016, 07:50:34 PM
Last edit: August 01, 2016, 09:59:03 PM by donGeilo
 #1

Does anyone know how this script has to look for compressed addresses?
Code:
# -*- coding: utf-8 -*-
#
#    coineva vanitygen.py
#    Copyright (C) 2016 February
#    1200 Web Development
#    http://1200wd.com/
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from bitcoin import *
import timeit
import random


def main():
    privkey = random.randrange(2**256)
    search_for = '12oo'
    address = ''
    count = 0
    start = timeit.default_timer()
    pubkey_point = ''

    print "Searching for %s" % search_for

    while not search_for in address:
        privkey += 1
        pubkey_point = fast_multiply(G, privkey)
        address = pubkey_to_address(pubkey_point)
        count += 1
        if not count % 1000:
            print "Searched %d in %d seconds" % (count, timeit.default_timer()-start)

    print "Found address %s" % address
    print "Private key HEX %s" % encode_privkey(privkey,'hex')


if __name__ == '__main__':
main()



EDIT: Will pay a small bounty, if somebody could help me!
achow101
Staff
Legendary
*
Offline Offline

Activity: 3416
Merit: 6678


Just writing some code


View Profile WWW
August 01, 2016, 08:13:33 PM
 #2

Does anyone know how this script has to look for compressed addresses?
Your question is not quite clear. What are you asking?

donGeilo (OP)
Full Member
***
Offline Offline

Activity: 169
Merit: 100



View Profile
August 01, 2016, 08:14:38 PM
 #3

This script generates uncompressed addresses, but i want i to create compressed addresses.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3416
Merit: 6678


Just writing some code


View Profile WWW
August 01, 2016, 08:39:49 PM
 #4

This script generates uncompressed addresses, but i want i to create compressed addresses.
Adding
Code:
pubkey_point = compress(pubkey_point)
The line before
Code:
address = pubkey_to_address(pubkey_point)

should work.

donGeilo (OP)
Full Member
***
Offline Offline

Activity: 169
Merit: 100



View Profile
August 01, 2016, 08:47:46 PM
Last edit: August 01, 2016, 09:00:44 PM by donGeilo
 #5

YES!

Send me PM for the bounty!!!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!