CPN commit
This commit is contained in:
54
files/network-ping-tool.bat
Normal file
54
files/network-ping-tool.bat
Normal file
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
REM === Interactive Ping Tool ===
|
||||
echo ========================================
|
||||
echo Network Ping Tool
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Prompt for target (website or server IP)
|
||||
set /p TARGET="Enter website or server IP to ping: "
|
||||
|
||||
REM Validate input
|
||||
if "%TARGET%"=="" (
|
||||
echo.
|
||||
echo ERROR: No target specified!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Prompt for ping mode
|
||||
echo.
|
||||
echo Ping Mode:
|
||||
echo [1] Single ping test (4 packets)
|
||||
echo [2] Continuous ping (until stopped with Ctrl+C)
|
||||
echo.
|
||||
set /p MODE="Select mode (1 or 2): "
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Starting ping to: %TARGET%
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Execute ping based on selected mode
|
||||
if "%MODE%"=="1" (
|
||||
echo Mode: Single test - sending 4 packets...
|
||||
echo.
|
||||
ping -n 4 %TARGET%
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Ping test completed!
|
||||
echo ========================================
|
||||
) else if "%MODE%"=="2" (
|
||||
echo Mode: Continuous ping - Press Ctrl+C to stop
|
||||
echo.
|
||||
ping -t %TARGET%
|
||||
) else (
|
||||
echo.
|
||||
echo ERROR: Invalid selection! Please choose 1 or 2.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user