A Port Scanner in C
The following port scanner C code checks approximately 65535 ports in about 15 seconds on-network. #include <stdio.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <netdb.h> #include <sys/types.h> #include <sys/time.h> #include <sys/ioctl.h> #include <sys/wait.h> #define MAX_PORTS 65535 #define MAX_SOCKETS 1023 // gcc -o portscanner portscanner.c int…
Read More A Port Scanner in C