Ubuntu: opening ports for connection (port scanner)

Reply

Join Date: Mar 2008
Posts: 42
Reputation: marcosjp is an unknown quantity at this point 
Solved Threads: 0
marcosjp marcosjp is offline Offline
Light Poster

Ubuntu: opening ports for connection (port scanner)

 
0
  #1
May 21st, 2009
Hi there!

As a College assignment I must write a network scanner that will create a report containing all open ports and some network statistics etc.
The code is almost done.. however, as I need to test it to see if its ok, I ve been scanning my own machine to check and etc... most of the times I run the scanner all ports are closed. Sometimes there are some ports open, sometimes other different ports are - I dont understand why and how it happens.

I am using connect(sockTarget,(struct sockaddr *)&target, sizeof(target)) to test each port, where target is defined by target.sin_port = htons(port_number);

Also, running sudo iptables -L I get:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Please help! :o)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the *nix Software Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC