cbrutekrag
cbrutekrag copied to clipboard
Static Compile issue
Ubuntu 22.0, CentOS 8 similar error
~/cbrutekrag
rm -f obj/cbrutekrag.o obj/log.o obj/str.o obj/iprange.o obj/progressbar.o obj/bruteforce_ssh.o obj/detection.o obj/target.o obj/credentials.o
mkdir -p obj
Compiled src/cbrutekrag.c successfully!
Compiled src/log.c successfully!
Compiled src/str.c successfully!
Compiled src/iprange.c successfully!
Compiled src/progressbar.c successfully!
Compiled src/bruteforce_ssh.c successfully!
Compiled src/detection.c successfully!
Compiled src/target.c successfully!
Compiled src/credentials.c successfully!
/usr/bin/ld: obj/log.o:/root/cbrutekrag/src/log.c:30: multiple definition of `g_verbose'; obj/cbrutekrag.o:/root/cbrutekrag/src/cbrutekrag.c:46: first defined here
/usr/bin/ld: obj/detection.o: in function `detection_detect_ssh':
/root/cbrutekrag/src/detection.c:156: undefined reference to `FdSet'
collect2: error: ld returned 1 exit status
make: *** [Makefile.static:31: cbrutekrag] Error 1
Hi @Omnividente Thanks for taking time to report the issue This was fix via 5cd040e
Now this error:
Compiled src/credentials.c successfully!
Compiled src/macrowrapper.c successfully!
/usr/bin/ld: obj/log.o:/root/cbrutekrag/src/log.c:30: multiple definition of `g_verbose'; obj/cbrutekrag.o:/root/cbrutekrag/src/cbrutekrag.c:46: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile.static:32: cbrutekrag] Error 1
I changed int g_verbose; to extern int g_verbose; in the src\log.c file and the compilation went without errors
bd3d969 Fixes multiple definitions of g_verbose
3bebf46 Makes the static build works fine
I've tested against Ubuntu 20 and Ubuntu 22
@Omnividente Can you try again please?
@Omnividente any feedback?