#makegcc-Wall-lpcap-ohexinjecthexinject.c/tmp/ccYufKqX.o:Infunction`inject_raw':hexinject.c:(.text+0x28b4): undefined reference to `pcap_sendpacket'/tmp/ccYufKqX.o:Infunction`sniff_hexstr':hexinject.c:(.text+0x2a05): undefined reference to `pcap_next'/tmp/ccYufKqX.o:Infunction`sniff_raw':hexinject.c:(.text+0x2ace): undefined reference to `pcap_next'/tmp/ccYufKqX.o:Infunction`inject_hexstr_loop':hexinject.c:(.text+0x2df7): undefined reference to `pcap_geterr'/tmp/ccYufKqX.o:Infunction`inject_raw_loop':hexinject.c:(.text+0x2edd): undefined reference to `pcap_geterr'/tmp/ccYufKqX.o:Infunction`main':hexinject.c:(.text+0x3124): undefined reference to `pcap_findalldevs'hexinject.c:(.text+0x3202):undefinedreferenceto`pcap_lookupdev'hexinject.c:(.text+0x3266): undefined reference to `pcap_create'hexinject.c:(.text+0x32b7):undefinedreferenceto`pcap_set_snaplen'hexinject.c:(.text+0x32fc): undefined reference to `pcap_set_promisc'hexinject.c:(.text+0x333e):undefinedreferenceto`pcap_set_timeout'hexinject.c:(.text+0x3389): undefined reference to `pcap_can_set_rfmon'hexinject.c:(.text+0x33cd):undefinedreferenceto`pcap_set_rfmon'hexinject.c:(.text+0x3415): undefined reference to `pcap_activate'hexinject.c:(.text+0x342c):undefinedreferenceto`pcap_geterr'hexinject.c:(.text+0x346d): undefined reference to `pcap_open_offline'hexinject.c:(.text+0x34e2):undefinedreferenceto`pcap_compile'hexinject.c:(.text+0x34f5): undefined reference to `pcap_geterr'hexinject.c:(.text+0x3536):undefinedreferenceto`pcap_setfilter'hexinject.c:(.text+0x3549): undefined reference to `pcap_geterr'hexinject.c:(.text+0x3651):undefinedreferenceto`pcap_close'collect2: error: ld returned 1 exit statusMakefile:6: recipe for target 'all'failedmake:***[all]Error1
Ubuntu 18.04.1 LTS
libpcap-dev, tcl, gcc present
Any clue how to make it compile?
Thanks!
Last edit: JoFTA 2018-08-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is what happens when I run the makefile
I'm dumb
I am having a similar trouble:
Ubuntu 18.04.1 LTS
libpcap-dev, tcl, gcc present
Any clue how to make it compile?
Thanks!
Last edit: JoFTA 2018-08-16
SOLVED by moving the -lpcap param to the EOL, i.e.:
gcc -Wall -o hexinject hexinject.c -lpcap
gcc -Wall -o prettypacket prettypacket.c -lpcap
gcc -Wall -o hex2raw hex2raw.c -lpcap
Hope that helps others having the same problem.