I try to find out of a list of similar addresses, if I can ping some of those. But after about 304 ping attemps/fails, the script just crashes.
@echo off
echo Start
set /A PORT=0
call:start
echo Finished
pause
:start
set /A PORT=%PORT%+1
set ADRESS=http://Adress.servehttp.com:%PORT%
ping /n 1 %ADRESS%
if %ERRORLEVEL% EQU 0 (echo %ADRESS% >> results.log)
if %PORT% LEQ 65535 (call:start) ELSE pause