(Kali & Ettercap) Plugin compilation error

137 views Asked by At

Okay I'm having a particular issue during compilation using the command gcc -shared -o attack_test.so -fPIC attack_test.c. Specifically, when I run the command, I get the error fatal error: ec.h: No such file or directory. Any idea how to fix this issue? Thanks.

EDIT: To give a little more issue background, I'm running this command from the desktop, where my C source code is located. Perhaps there's a specific place I need to put the source and run the command?

EDIT 2: So I was able to get past the above error by running the command sudo apt-get install libssl-dev, and then changing the line #include <ec.h> to #include <openssl/ec.h>, which seemed to negate the issue. Adding the <openssl/...> to the other includes did not work the same way. So now, instead of fatal error: ec.h: No such file or directory, it's fatal error: ec_plugins.h: No such file or directory. Any ideas for possible fixes? Thanks so much!

For reference, I'm building upon the the dos_attack.c source code from this link.

TO BE CLEAR: This is for a project and tested upon in a CLOSED ENVIRONMENT. This is COMPLETELY* for EDUCATIONAL use and for the study of Denial-of-Service and Man-In-the-Middle mitigation techniques.

1

There are 1 answers

4
AudioBubble On

<ec.h> is intended to refer to a file in the Ettercap include directory, not an OpenSSL header. The same goes for the other ec_*.h headers.

Adding -I/path/to/ettercap/include to your compiler flags should fix this.