I had start recently to study winsck VB programming and it came to me about doing a simple port scanner. I´ve tried to do a simple class D scanner but I just can´t figure why it doens´t find any open port! Every port he finds its closed! I´ve tried with a port scanner I have and it finds an open port but when I try with this the port is closed!!
I just can´t figure out why this doesn´t work!
...Another thing... How can I stop the scanner?
Here's the code:
For forth = classD1.Text To classD2.Text
tcpsock.Protocol = sckTCPProtocol
tcpsock.RemoteHost = classA1.Text & "." & classB1.Text & "." & classC1.Text & "." & forth
tcpsock.RemotePort = 21
If tcpsock.State <> sckConnected Then
log.Text = tcpsock.RemoteHost & " Closed !!"
log.Text = tcpsock.RemoteHost & " Open !!"
Call Pause(x) 'Pause for x seconds (The program is going to get the x from a text box)