Skip to content

Commit

Permalink
Quick fix for Issue #49
Browse files Browse the repository at this point in the history
  • Loading branch information
albertobsd committed Apr 16, 2021
1 parent d1ca255 commit 1060958
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions keyhunt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1060958

Please sign in to comment.