Comments (16)
I fixed it by renaming the function in a different way, by the way now if gives me this problem, even after having installed gmp through brew.
Any idea?
MacBook-Pro keyhunt % make
gcc -O3 -c bloom/bloom.c -o bloom.o -I./bloom/murmur2
gcc -O3 -c bloom/murmur2/MurmurHash2.c -o murmurhash2.o
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c keccak/keccak-tiny.c -o keccak.o -D"memset_b(W,WL,V,OL)=memset(W,V,OL)"
gcc -O3 -c tiny_sha3/sha3.c -o sha3.o
gcc -O3 -c keyhunt.c -o keyhunt.o -lm
clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
keyhunt.c:10:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
^~~~~~~
1 error generated.
make: *** [default] Error 1
from keyhunt.
Sorry to no anwser before, a was a little busy,
can you add the -lgmp at the en of this line?
gcc -O3 -c keyhunt.c -o keyhunt.o -lm -lgmp
I think that is some issue with configuration of you headers directory,
best regards!
from keyhunt.
Hi @albertobsd, Thank you for your reply,
Unfortunately didn't change, I read it on stackoverflow that had something to do with the headers and xcode,
I tried to add that flag but nothing..
MacBook-Pro keyhunt % make
gcc -O3 -c bloom/bloom.c -o bloom.o -I./bloom/murmur2
gcc -O3 -c bloom/murmur2/MurmurHash2.c -o murmurhash2.o
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c keccak/keccak-tiny.c -o keccak.o -D"memset_b(W,WL,V,OL)=memset(W,V,OL)"
gcc -O3 -c tiny_sha3/sha3.c -o sha3.o
gcc -O3 -c keyhunt.c -o keyhunt.o -lm -lgmp
clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lgmp: 'linker' input unused [-Wunused-command-line-argument]
keyhunt.c:10:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
^~~~~~~
1 error generated.
make: *** [default] Error 1
from keyhunt.
Did you install libgmp-dev ?
from keyhunt.
Yes, in mac the equivalent is: brew install gmp
from keyhunt.
OK, can you see if the file gmp.h exist in this folder?
/usr/local/include
In that case include the next line in the Makefile
-I/usr/local/include -L/usr/local/lib
gcc -O3 -c keyhunt.c -o keyhunt.o -lm -I/usr/local/include -L/usr/local/lib
from keyhunt.
It's inside opt
MacBook-Pro include % find /usr /opt -name "gmp.h"
find: /usr/sbin/authserver: Permission denied
/opt/homebrew/include/gmp.h
/opt/homebrew/Cellar/gmp/6.2.1/include/gmp.h
from keyhunt.
OK, then change the directory in the -I param and -L param
gcc -O3 -c keyhunt.c -o keyhunt.o -lm -I/opt/homebrew/Cellar/gmp/6.2.1/include/ -L/opt/homebrew/Cellar/gmp/6.2.1/lib/
from keyhunt.
We're doing progress but still nothing..
MacBook-Pro keyhunt % make
gcc -O3 -c bloom/bloom.c -o bloom.o -I./bloom/murmur2
gcc -O3 -c bloom/murmur2/MurmurHash2.c -o murmurhash2.o
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c keccak/keccak-tiny.c -o keccak.o -D"memset_b(W,WL,V,OL)=memset(W,V,OL)"
gcc -O3 -c tiny_sha3/sha3.c -o sha3.o
gcc -O3 -c keyhunt.c -o keyhunt.o -lm -I/opt/homebrew/Cellar/gmp/6.2.1/include/ -L/opt/homebrew/Cellar/gmp/6.2.1/lib/
clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/opt/homebrew/Cellar/gmp/6.2.1/lib/' [-Wunused-command-line-argument]
keyhunt.c:71:6: error: conflicting types for 'heapsort'
void heapsort(char *arr, int int64_t);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:309:6: note: previous declaration is here
int heapsort(void *__base, size_t __nel, size_t __width,
^
keyhunt.c:748:62: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
fprintf(stderr,"[E] error bloom_init for %u elements\n",bsgs_m);
~~ ^~~~~~
%llu
keyhunt.c:767:62: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("[+] Init bloom filter for %u elements : %.2f MB\n",bsgs_m,(float)((uint32_t)bloom_bPx.bytes/(uint32_t)1048576));
~~ ^~~~~~
%llu
keyhunt.c:811:49: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("[+] Precalculating %u aMP points\n",bsgs_m);
~~ ^~~~~~
%llu
keyhunt.c:825:48: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("[+] Precalculating %u aMP points\n",bsgs_m);
~~ ^~~~~~
%llu
keyhunt.c:865:48: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("[+] Precalculating %u bP points\n",bsgs_m);
~~ ^~~~~~
%llu
keyhunt.c:882:47: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("[+] precalculating %u bP points\n",bsgs_m);
~~ ^~~~~~
%llu
keyhunt.c:898:38: warning: format specifies type 'unsigned int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("[+] Sorting %u elements\n",bsgs_m);
~~ ^~~~~~
%llu
keyhunt.c:1174:12: warning: passing 'char *' to parameter of type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign
[-Wpointer-sign]
shake256(digest, 256,(const uint8_t* ) pkey, length);
^~~~~~
./keccak/keccak-tiny.h:14:1: note: passing argument to parameter here
decshake(256)
^
./keccak/keccak-tiny.h:8:27: note: expanded from macro 'decshake'
int shake##bits(uint8_t*, size_t, const uint8_t*, size_t);
^
keyhunt.c:1452:30: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("Testing Keys %lu\n",count);
~~~ ^~~~~
%llu
keyhunt.c:1663:30: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
printf("Testing Keys %lu\n",count);
~~~ ^~~~~
%llu
keyhunt.c:1689:23: error: too few arguments to function call, expected 4, have 2
heapsort(arr,n);
~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:309:1: note: 'heapsort' declared here
int heapsort(void *__base, size_t __nel, size_t __width,
^
keyhunt.c:1813:6: error: conflicting types for 'heapsort'
void heapsort(char *arr, int n) {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:309:6: note: previous declaration is here
int heapsort(void *__base, size_t __nel, size_t __width,
^
keyhunt.c:2270:55: warning: passing 'uint64_t *' (aka 'unsigned long long *') to parameter of type 'int64_t *' (aka 'long long *') converts between pointers to integer
types with different sign [-Wpointer-sign]
r = bsgs_searchbinary(bPtable,xpoint_raw,bsgs_m,&j);
^~
keyhunt.c:1932:81: note: passing argument to parameter 'r_value' here
int bsgs_searchbinary(struct bsgs_xvalue *buffer,char *data,int64_t _N,int64_t *r_value) {
^
11 warnings and 3 errors generated.
make: *** [default] Error 1
from keyhunt.
ok, this is conflic bewteen that heapsort and my custom heapsort, can you find and remplace all the coincidences of the "heapsort" to "heapsort_2" in the keyhunt.c file
Sorry i need to update all my code to solve this, if you can wait some day or two until i solve those things.
best regards!
from keyhunt.
It started but it pop out this error now:
MacBook-Pro keyhunt % ./keyhunt -m bsgs -f ../120.txt -r 800000000000000000000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -t 2
[+] Version 0.1.20210112 BSGS
[+] Setting mode BSGS
[+] Setting 2 threads
[+] Opening file ../120.txt
[+] Added 1 points from file
[+] Setting N up to 17592186044416.
[+] Init bloom filter for 4194304 elements : 7.00 MB
[+] Allocating 128.00 MB for aMP Points
[+] Precalculating 4194304 aMP points
[+] Allocating 160.00 MB for bP Points
[+] precalculating 4194304 bP points
[+] Sorting 4194304 elements
[+] Thread 1: 0000000000000000000000000000000000800000000000000000000000000000
zsh: segmentation fault ./keyhunt -m bsgs -f ../120.txt -r -t 2
I changed also the Makefile line btw to: gcc -o keyhunt keyhunt.o base58.o rmd160.o sha256.o bloom.o murmurhash2.o keccak.o -lgmp -lm -lpthread -I/opt/homebrew/Cellar/gmp/6.2.1/include/ -L/opt/homebrew/Cellar/gmp/6.2.1/lib/
otherwise will still prompt some other conflict errors..
Thank you so much anyway @albertobsd!
I'll wait futures updates from you, if you want to bring it also to mac users 👍
from keyhunt.
The -r option need a parameter of a range from:to example -r F0000000:FFFFFFFF
if you need a Random is with upper case R this is only -R
from keyhunt.
It's not that, something went wrong while doing make
...
a@a-MacBook-Pro keyhunt % ./keyhunt -m bsgs -f ../120.txt -R 800000000000000000000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[+] Version 0.1.20210112 BSGS
[+] Setting mode BSGS
[+] Setting random mode.
[+] Opening file ../120.txt
[+] Added 1 points from file
[+] Setting N up to 17592186044416.
[+] Init bloom filter for 4194304 elements : 7.00 MB
[+] Allocating 128.00 MB for aMP Points
[+] Precalculating 4194304 aMP points
[+] Allocating 160.00 MB for bP Points
[+] precalculating 4194304 bP points
[+] Sorting 4194304 elements
[+] Thread 0: af41b9d521f21b466da9d454ec6b486232f7b1f641a4c333a92d1fc3e34b19cc
keyhunt(2477,0x16dce3000) malloc: *** error for object 0x4b72c55a98a602ff: pointer being freed was not allocated
keyhunt(2477,0x16dce3000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort ./keyhunt -m bsgs -f ../120.txt -R
a@a-MacBook-Pro keyhunt % ./keyhunt -m bsgs -f ../120.txt
[+] Version 0.1.20210112 BSGS
[+] Setting mode BSGS
[+] Opening file ../120.txt
[+] Added 1 points from file
[+] Setting N up to 17592186044416.
[+] Init bloom filter for 4194304 elements : 7.00 MB
[+] Allocating 128.00 MB for aMP Points
[+] Precalculating 4194304 aMP points
[+] Allocating 160.00 MB for bP Points
[+] precalculating 4194304 bP points
[+] Sorting 4194304 elements
[+] Thread 0: 5590f388e5b3568581fa2c41ec2ca029a9863c48636887653680557c2dc95f77
zsh: segmentation fault ./keyhunt -m bsgs -f ../120.txt
a@a-MacBook-Pro keyhunt %
from keyhunt.
Interesting there is some error in some devices, idk why is this happening i need to debug in some of those devices.
I will notifiyou when I solve this error.
Best regards!
from keyhunt.
Can you check if the new version works in Mac?
from keyhunt.
This shoulbe solved now those errors were related to an keccak librery but is not loger use.
from keyhunt.
Related Issues (20)
- Still getting N =0 and 0key per 1000 sec HOT 1
- MiniKeys sequencial bruteforce hash an ERR HOT 1
- No valid data ETH BSGS HOT 1
- Bsgs doubt
- BSGS sequential save progress HOT 1
- Range End Not Working HOT 1
- I have a personalized private key but I can't use it because it starts differently. HOT 2
- Feature Request - Support for Distributed Memory Keystores with BloomFiltering HOT 1
- Error searching for keys in the right range. HOT 4
- Is this command optimal for searching 66.rmd in a 128 core, 256GB of Ram server? HOT 1
- Input range from a file HOT 1
- Add new feature
- How does the -R option work?
- Numa SNC4 mode for part of the smaller bloom filters
- Error random_bytes(), file gmp256k1/Random.cpp, line 35
- MacOS build errors HOT 1
- Search for matches in BSGS mode
- Missing files
- set cpu load HOT 1
- In which part of the code does the bsgs mode work? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keyhunt.