Skip to content

Instantly share code, notes, and snippets.

@Clijsters
Created December 21, 2014 18:27
Show Gist options
  • Save Clijsters/9edbb6a95751fa4ca1fa to your computer and use it in GitHub Desktop.
Save Clijsters/9edbb6a95751fa4ca1fa to your computer and use it in GitHub Desktop.
pings a range of adresses
@echo off
:Dieses Script pingt alle Hosts in einem IP-Bereich an und listet antwortende Hosts auf.
if exist ips.txt del ips.txt > nul
echo Bitte geben Sie den ersten Teil der IP ein (z.B. 192.168.0):
set /p ip=
for /L %%N IN (1, 1, 254) DO (
echo %ip%.%%N wird nun angepingt
ping %ip%.%%N -n 1 -w 1 | find "TTL" && echo %ip%.%%N >> ips.txt
)
cls
type ips.txt
echo.
echo Beliebige Taste zum Beenden
pause >nul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment