Quote:
Well, perhaps there's a firewall (or at least IP packet filter) dropping the packets.
You are right. This port scanner is made so simple, not stealthy & does not pass any firewall. Otherwise, it should scan normally.
It works best if you use it in your network internally, or use against your machine.
I opened a port from terminal by doing
sudo nc -l -p AnyPortNumber
Then tested the program, It worked!
Note - Instead of doing this
struct sockaddr_in *specifyPort = (struct sockaddr_in *)results->ai_addr;
specifyPort->sin_port = htons(startingPort);
Do this,
status = getaddrinfo(remoteIP, startingPort , &hints, &results);
Better & easier.