Sign in to follow this  
Followers 0
Gordoni

find , read text from

4 posts in this topic

#1 ·  Posted (edited)

Hello!

Looking for ideas with reading text from hidden console

( screen under )

I wanna find port 80 in connections with using netstat . And do read ip adress of port 80. example from screen ( 84.53.182.185 )

Gordoni

post-42364-1235950360_thumb.jpg

Edited by Gordoni

Share this post


Link to post
Share on other sites



you could output the results from netstat to a text file and parse that.

Share this post


Link to post
Share on other sites

... I wanna find port 80 in connections with using netstat . And do read ip adress of port 80.

#include <string.au3>

Local $PID = Run(@ComSpec & " /c netstat -n", @SystemDir, @SW_HIDE, 2)
Local $Out, $IParray

While 1
    $Out &= StdoutRead($PID)
    If @error Then ExitLoop
WEnd

$OutArray = StringSplit($Out, @CR)

For $i = 1 To $OutArray[0]
    If StringInStr($OutArray[$i], ":80 ") Then
        MsgBox(0, $i & " of " & $OutArray[0], $OutArray[$i], 1)
        $IParray = _StringBetween($OutArray[$i], ":", ":")
        MsgBox(0, $i & " of " & $OutArray[0], ">>>" & _
                StringTrimLeft($IParray[0], 9) & "<<<", 1)
    EndIf
Next

[size="1"][font="Arial"].[u].[/u][/font][/size]

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