Jump to content

netstat -an |find /i "listening"


Recommended Posts

Hallo members,

How to covert this: netstat -an |find /i "listening"

to AutoIt

I tried :

Run(@ComSpec & " /K " & 'netstat ' & ' -an |find /i' & '"listening"', "", @SW_SHOW)

this

Run(@ComSpec & " /K " & 'netstat' & '  -an |find /i "listening"' , "", @SW_SHOW)

this

Run(@ComSpec & " /K " & 'netstat ' & ' -an |find /i "listening"' , "", @SW_SHOW)

thanks in advance

Link to comment
Share on other sites

Run('Cmd /K '  & 'netstat ' & '-an | find /i ' & '"listening"', "", @SW_SHOW)

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

@DCCD:

netstat will run on XP but not with the extra command: | find /i ' & '"listening

Win XP

Run('Cmd /K ' & 'netstat ' & '-an ', "", @SW_SHOW)

Vista / win 7

Run('Cmd /K ' & 'netstat ' & '-an | find /i ' & '"listening"', "", @SW_SHOW)

Edit:

netstat command is language dependent

Edited by Mecano
Link to comment
Share on other sites

Mecano,

After extensive testing between OS's -- guess what? It still works.

I don't have an answer for you, unless it's one of these ....

1) Somebody hacked an internal command function in Windows. (Find is an internal command)

2) There is nothing "listening" on your network. (try changing "listening" to "established")

3) A gremlin has your system under it's control and won't let you see what is listening.

Well okay - lets try this or go back to this - does it work?

Run(@Comspec & ' /k netstat -an | find /i "listening"', '', @SW_SHOW)

Also, open a command window and paste this in manually:

netstat -an | find /i "listening"

does it work?

After all this - good luck to you.

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

ripdad,

Thanks for your answer guess what I just discovered the output of the netstat command is language dependent

your suggestion #2 worked

netstat -an | find /i "established"

changed

netstat -an |find /i "listening"
in to
netstat -an | find /i "luisteren"
Win XP Dutch why "established" is working I don't know (it's not Dutch) ;)

All members thank you :)

Link to comment
Share on other sites

I knew there was something I was overlooking.

Of course, I think Everyone speaks english ... even computers.

*walks off mumbling*

Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...