02-29-04 08:34 PM
I'm actually going to use the Uwin ksh system to use a korn shell interface.
bash is too "unfamiliar". Anyway, here's what I came up with
#!/usr/bin/ksh
grep "^Remote" $1 | grep "local service is" | grep -v "ftp" |
/usr/bin/cut -c34-55 > temp1
/usr/bin/awk -F, '{ print $1 }' temp1 > temp2
/usr/bin/sort -u temp2 > temp3
for ip in `/usr/bin/cat temp3`
do
tracert $ip
done > $2
rm -f temp*
This program takes the "Firewall" tab of Norton Internet Security, which you
have saved toa text file as input $1 and processes it to
find all the unique IP addresses of suspicious activities and runs a trace
route on them. If anyone else wants to use it, feel free.
"Barry Margolin" <barmar@alum.mit.edu> wrote in message
news:barmar-FCDD1C.00584628022004@comcast.ash.giganews.com...
> In article <FDU%b.106273$IF6.3220710@ursa-nb00s0.nbnet.nb.ca>,
> "Joshua Sparks" <nacs@nb.sympatico.ca> wrote:
>
a
script
results.
that
option
awk
spit
>
> That command will run tracert one time with *all* the IP addresses as
> parameters, it won't run it multiple times. You need to write a loop,
> e.g.
>
> for ip in `sort -u $1`
> do
> tracert -j $ip
> done > $2
>
> --
> Barry Margolin, barmar@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
[ Post a follow-up to this message ]
|