From 10609584377e29836ea686692c745fa43cdff2ca Mon Sep 17 00:00:00 2001 From: AlbertoBSD Date: Fri, 16 Apr 2021 04:42:56 +0200 Subject: [PATCH] Quick fix for Issue #49 https://github.com/albertobsd/keyhunt/issues/49 --- keyhunt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/keyhunt.c b/keyhunt.c index 7b3a481..63ec870 100644 --- a/keyhunt.c +++ b/keyhunt.c @@ -1839,18 +1839,16 @@ void *thread_process(void *vargp) { if(r) { found++; hextemp = key_mpz.GetBase16(); - pts[j] = secp->ComputePublicKey(&key_mpz); - public_key_compressed = secp->GetPublicKeyHex(true,pts[j]); - public_key_compressed_hex = tohex(public_key_compressed,33); + R = secp->ComputePublicKey(&key_mpz); + public_key_compressed = secp->GetPublicKeyHex(true,R); + printf("\nHIT!! PrivKey: %s\npubkey: %s\n",hextemp,public_key_compressed); pthread_mutex_lock(&write_keys); keys = fopen("KEYFOUNDKEYFOUND.txt","a+"); if(keys != NULL) { - fprintf(keys,"PrivKey: %s\npubkey: %s\n",hextemp,public_key_compressed_hex); + fprintf(keys,"PrivKey: %s\npubkey: %s\n",hextemp,public_key_compressed); fclose(keys); } - printf("\nHIT!! PrivKey: %s\npubkey: %s\n",hextemp,public_key_compressed_hex); pthread_mutex_unlock(&write_keys); - free(public_key_compressed_hex); free(public_key_compressed); free(hextemp); }