A TCP port scanner written in C.
It scans a target IP across a port range and reports which ports are open.
- Interactive input for target IP and port range
- Non-blocking connection checks with timeout
- Prints each open port as it is detected
- Shows total number of open ports
gcc main.c scanner.c network.c -o scanner./scannerEnter target IP: 127.0.0.1
Enter start port: 2995
Enter end port: 3005
Scanning 127.0.0.1 from port 2995 to 3005...
Port 3000 is OPEN
Total open ports: 1
Scan completed.
main.c- CLI input and scan startscanner.c- Port scanning loop and open-port reportingnetwork.c- Socket and target setup helpersscanner.h,network.h- Header files
