[Dshield] nslookup on win2k and scripting
RoyR at justicetrax.com
Thu Oct 2 18:11:32 GMT 2003
FOR /L /F %%1 IN (filename) DO ping -a -n 2 %%1 >c:\output.text
Something like that. Look up the for command, you will need to change
the delimiter from the default (comma I believe) to the whitespace or
take your text file and do a find&replace of whitepace to the default
delimeter for the "FOR" command.
The output won't be pretty. I have one similar that pings an internal
band of IP's and checks to see if they are resolving.
FOR /L %%1 IN (1,1,99) DO ping -a -n 2 192.168.0.%%1 as an example.
I'm sure the 'nix guys can come up with a prettier solution, but you
didn't ask for pretty! ;-)
From: list-bounces at dshield.org [mailto:list-bounces at dshield.org] On
Behalf Of Gearry Judkins
Sent: Thursday, October 02, 2003 10:21 AM
To: General DShield Discussion List
Subject: [Dshield] nslookup on win2k and scripting
I am looking for a way, on win2k, to take a file with space seperated IP
addresses, resolve all of them, and output the domain name and IP
addresses to a file. I have cygwin available if it would be easier to
do it there. I had a suggestion to script hosts under linux but I can
not see that hosts is available under cygwin. This is a temporary
solution until I get my day to day operations moved over to my linux
box, but I am willing to put some work into doing this under windows or
cygwin just for the benefit of learning. Pointers to docs or HOWTOs for
the relevent tools are appreciated.
list mailing list
list at dshield.org
To change your subscription options (or unsubscribe), see:
More information about the list