Sign in to follow this  
Followers 0
Mecano

netstat -an |find /i "listening"

11 posts in this topic

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

Share this post


Link to post
Share on other sites



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


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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@boththose:

Thanks for the answer :)

@DCCD+:

Nothing

men I feel stupid ;)

I was testing on Win XP the command, doest exist on XP

Quickly Find Local Open Ports

Edited by Mecano

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

@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

Share this post


Link to post
Share on other sites

Works on WinXP SP2 and SP3 for me.

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

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

Share this post


Link to post
Share on other sites

Strange, here on Win XP SP3 nothing happens ?

Share this post


Link to post
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

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0