cdes5804 / NetCut

A simple tool to cut people's network with ARP spoofing, written in pure C++
GNU General Public License v3.0
71 stars 13 forks source link

Fix: Added cstdint to arp.hpp #11

Closed sukalaper closed 1 year ago

sukalaper commented 1 year ago

Tested with Arch Linux which has the following make and gcc version.

When installing, make program shows this.

mkdir -p bin/models

g++ src/models/scanner.cpp -c -o bin/models/scanner.o -Wall -Wextra -O2 -std=c++17 -I src/

In file included from src/models/scanner.cpp:3:
src/models/arp.hpp:38:65: error: 'uint32_t' does not name a type
    38 | struct sockaddr_ll prepare_arp(unsigned char *buffer, const uint32_t &dst_ip, Operation op=Operation::REQUEST,
       | ^~~~~~~~
src/models/arp.hpp:1:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   +++ |+#include <cstdint>
     1 | #ifndef _ARP_HPP
src/models/arp.hpp:39:74: error: 'uint32_t' does not name a type
    39 | const std::string &dst_mac="", const uint32_t &src_ip=0, const std::string &src_mac="") const;
       | ^~~~~~~~
src/models/arp.hpp:39:74: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?

make: *** [Makefile:17: bin/models/scanner.o] Error 1

Then I fixed it by following the instructions given by the program output and it ran perfectly after.

cdes5804 commented 1 year ago

Thanks! In fact I was just working on refactoring the code and have also spotted the issue.

sukalaper commented 1 year ago

Thanks! In fact I was just working on refactoring the code and have also spotted the issue.

Wow, great to hear that. Btw this is a great project.