|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
RE: [Dshield] nslookup on win2k and scripting |  |
- To: "General DShield Discussion List" <[EMAIL PROTECTED]>
- Subject: RE: [Dshield] nslookup on win2k and scripting
- From: "Richard Roy" <[EMAIL PROTECTED]>
- Date: Thu, 2 Oct 2003 11:11:32 -0700
- Old-x-envelope-to: [EMAIL PROTECTED]
- Reply-to: General DShield Discussion List <[EMAIL PROTECTED]>
- Sender: [EMAIL PROTECTED]
- Thread-index: AcOJDJEoJD4gljPGTnuqhLLdeNbvdQAA5PRw
- Thread-topic: [Dshield] nslookup on win2k and scripting
 |
| |
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! ;-)
HTH
Rich
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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.
Gearry
_______________________________________________
list mailing list
[EMAIL PROTECTED]
To change your subscription options (or unsubscribe), see:
http://www.dshield.org/mailman/listinfo/list
_______________________________________________
list mailing list
[EMAIL PROTECTED]
To change your subscription options (or unsubscribe), see: http://www.dshield.org/mailman/listinfo/list
 |
| |