PDA

Click to See Complete Forum and Search --> : port scanner/viewer/shutdown-er


Mista_Random
May 13th, 2007, 10:11 PM
i ma a little new to VB but i have some experience, anyway i am trying to make a program that will scan all programs using whatever ports they use and record them in a text file. That way i know what programs are using what ports. and not just ports on the local machine, that way i can possibly see if anyone is using a program to remotely view/control my desktop.

any and all help is appreciated.

Paul M
May 14th, 2007, 01:25 AM
Well this could possibly be used for inappropriate uses and actions taken against other remote computer. So i will not help until another administrator or moderator says something.

Mista_Random
May 14th, 2007, 06:44 PM
I see your point, but basicly all i am aiming for is a port scanner that will tell me what programs are using what ports

the182guy
May 16th, 2007, 09:41 AM
Loads at PSC.com.

I've done this before use Winsock to listen on each port (loop) if fails to listen, the current port is open, if success its closed.

Very simple program

DigiRev
May 17th, 2007, 04:56 PM
Loads at PSC.com.

I've done this before use Winsock to listen on each port (loop) if fails to listen, the current port is open, if success its closed.

Very simple program

Yea that's the best way to do it locally (and how I've done it in the past). To do it remotely you'd use the .Connect method and wait for either the Winsock_Connect() event (success/port open) or Winsock_Error() event (check err message for "connection forcefully rejected").

To find out what process/program is using that port would be difficult I'd imagine. I'm not sure how you'd do that.

When in doubt, try Google. ;)

the182guy
May 17th, 2007, 05:12 PM
Yea that's the best way to do it locally (and how I've done it in the past). To do it remotely you'd use the .Connect method and wait for either the Winsock_Connect() event (success/port open) or Winsock_Error() event (check err message for "connection forcefully rejected").

To find out what process/program is using that port would be difficult I'd imagine. I'm not sure how you'd do that.

When in doubt, try Google. ;)

Yup. I'm sure there is a netstat command to get the list of connections w/ app. So what you could do is shell cmd with netstat and the command so it saves to txt, read the txt and you can access the list from your app.

BTW if you're planning on trying to remotely scan someones computer without permission you'll probably get caught...

65,000 connection requests from one IP in a short space of time on consecutive ports, in the firewall log is not exactly inconspicuous is it.

DigiRev
May 17th, 2007, 06:26 PM
Yup. I'm sure there is a netstat command to get the list of connections w/ app. So what you could do is shell cmd with netstat and the command so it saves to txt, read the txt and you can access the list from your app.

That's true, never thought of trying netstat or other command line functions.

BTW if you're planning on trying to remotely scan someones computer without permission you'll probably get caught...

65,000 connection requests from one IP in a short space of time on consecutive ports, in the firewall log is not exactly inconspicuous is it.

Yup. And software firewalls will pick it up in a second.

superbovine
May 18th, 2007, 07:40 PM
netstat -a | find "LISTENING"

DigiRev
May 18th, 2007, 10:33 PM
netstat -a | find "LISTENING"

Doesn't show what process/application is using the port.

sevenhalo
May 18th, 2007, 10:39 PM
-b will

DigiRev
May 19th, 2007, 01:26 AM
-b will

Yup, it sure does. :)

the182guy
May 21st, 2007, 01:48 PM
-b will

Nice. this is very useful for detecting spyware or bad apps, cheers mate rep+

Mista_Random
Jun 14th, 2007, 01:23 AM
Sweet, thanks for the help. i am going to try this tomorrow. Just had to format and reinstall windows on my computer.

not a good days fishin

by the way, not going to use this on other computers, but my own to see if anyone is watching me, and if so i can shut off the port they are using to do so so they can't watch me any longer.