Ping Reply Tool

remybfg10k

Expert Member
Joined
May 24, 2007
Messages
3,798
Reaction score
0
Location
Centurion
Hi Network Admin type people

I'm looking for a tool that i can provide a list of hostnames/ip's that the tool will ping and then provide a report of replies

At the moment doing a ping that replies to a text file, all manual :(
 
nmap (you can set it to ping only)

However, Angry IP Scanner is exactly what you are looking for... Just google it
 
Neobyte,

Got the list thing working, although i have another requirement, i only have a list of hostnames that i need it to scan, cant seem to get that working though!

Would you have any idea or recommend a different app?
 
Last edited:
What kind of router do you have ?
You might be able to retrieve the arp cache from it ..
Also, what handles the DHCP - because that will also be smart enough
 
Last edited:
solarwinds network monitor. I love those smiley faces.
 
Here is something that I wrote (uber leet batch file writing skillz) and use a lot as a precursor to running other scripts.
Basically I export a list of all domain computers from Active Directory Users and Computers (ADUC) to a file called 'allcomps.txt' in the same folder as the batch file. Firstly it checks if the computer is responding to ping. If it's not, the name is put in 'dcoff.txt'. If it is, the DNS name is then compared to the netbios name returned from the machine's IP address. If it matches, the name is put into the file 'dcon.txt' (And this is the file that is used for further scripts). If the netbios name does not match the dns name (because our internal DNS was notoriously bad), then the name is put in to 'bad.txt' for me to look at later.

I'm pretty sure you can modify what I've done to suit your own purposes. It should be far better than doing it manually.

If you paste the code into notepad++ and set the type to batch, it will be all nicely colour coded. :p

Pinger.bat:
Code:
@ECHO OFF
SETLOCAL
Rem Configure the script as follows
SET INFILE=allcomps.txt
SET OFFLINEFILE=dcoff.txt
SET ONLINEFILE=dcon.txt
SET BADFILE=bad.txt
Rem Configuration ends here. Do not modify below.

ECHO This will check if the specified computers are online.
ECHO.
ECHO Configuration (Edit %0 to change):
ECHO Input File: %INFILE%
ECHO Offline File: %OFFLINEFILE%
ECHO Online File: %ONLINEFILE%
ECHO Bad File: %BADFILE%
ECHO.
SET /P ANS=Do you wish to continue? Y/N 
IF /I "%ANS%" NEQ "Y" GOTO:EOF
IF NOT EXIST %INFILE% ( 
  echo %INFILE% does not exist. Please export it as tab delimited from an ADUC query.
  GOTO:EOF
)
SORT %INFILE% /O %INFILE%s

FOR /F "skip=1 tokens=1 delims=, " %%A IN (%INFILE%s) DO CALL:CheckOnline %%A
DEL %INFILE%s
GOTO:EOF

:CheckOnline
title Checking %~1
PING %~1 -n 1 -w 1500 > NUL 2>&1
if "%ERRORLEVEL%" NEQ "0" (
    ECHO %~1 is offline.
    ECHO %~1>> %OFFLINEFILE%
) ELSE (
    ECHO %~1 is online, verifying...
    CALL:VerifyName %~1
)
GOTO:EOF

:VerifyName
title Verifying %~1
Rem The IP step is necessary. nbtstat returns bad info when used against the name.
FOR /F "tokens=3 delims=[] " %%A in ('PING -n 1 -w 1500 %~1 ^| FINDSTR -R "\[*\]"') do (SET VIP=%%A)
FOR /F "tokens=1" %%A in ('NBTSTAT -A %VIP% ^| FIND "UNIQUE" ^| FIND "<20>"') do (SET VNAME=%%A)
IF /I "%~1" EQU "%VNAME%" (
  ECHO %~1 confirmed!
  ECHO %~1>> %ONLINEFILE%
) ELSE (
  ECHO %~1 is bad.
  ECHO %~1>> %BADFILE%
)
GOTO:EOF
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X