cbrutekrag icon indicating copy to clipboard operation
cbrutekrag copied to clipboard

Static Compile issue

Open Omnividente opened this issue 3 years ago • 3 comments

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

Omnividente avatar Dec 04 '22 10:12 Omnividente

Hi @Omnividente Thanks for taking time to report the issue This was fix via 5cd040e

matricali avatar Dec 04 '22 20:12 matricali

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

Omnividente avatar Dec 04 '22 20:12 Omnividente

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?

matricali avatar Dec 04 '22 22:12 matricali

@Omnividente any feedback?

matricali avatar Dec 10 '22 22:12 matricali