R
rbt
Output from 'netstat -b' on a win2003 server will show what binary is
responsible for the connection. For example, it may list something like
this along with other connection specific data:
[lsass.exe]
[System]
[firefox.exe]
[iexplorer.exe]
How might I process the output so that anything within brackets is
recorded to a log file of my own making? I know how to parse and record
things to a file, I don't know how to look make '[' and ']' appear as
special characters so that I can record what's between them.
Basically, I want a script that will read output and stop each time it
encounters a '[' and record until it gets to ']' where upon it would
stop recording and then proceed on repeating the above operation as it
goes thru the remaining data.
Thanks,
rbt
responsible for the connection. For example, it may list something like
this along with other connection specific data:
[lsass.exe]
[System]
[firefox.exe]
[iexplorer.exe]
How might I process the output so that anything within brackets is
recorded to a log file of my own making? I know how to parse and record
things to a file, I don't know how to look make '[' and ']' appear as
special characters so that I can record what's between them.
Basically, I want a script that will read output and stop each time it
encounters a '[' and record until it gets to ']' where upon it would
stop recording and then proceed on repeating the above operation as it
goes thru the remaining data.
Thanks,
rbt