In locul tau as instala si nmap, dar uite un script care le foloseste pe amandoua si utilizeaza comenzi de Windows shell din secolul asta, rezultatele sunt salvate in fisiere TXT.
###############
@echo off
setlocal enabledelayedexpansion
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| find "IPv4 Address"') do (
set "ip=%%a"
)
for /f "tokens=2 delims=:" %%b in ('ipconfig ^| find "Subinet Mask"') do (
set "subinet=%%b"
)
set "network=! ip:~1,-1!"
set "network=! network:~0,-2!"
echo Scanning Network:! network! with Subinet Mask:! subinet!
:: Perform Ping Scan
for /L %%i in (1, 1,254) do (
ping -n 1! network!%%i | find "Reply" >> ping_results.txt
)
:: Perform Nmap Scan
nmap -sn! network!/24 > nmap_results.txt
endlocal
Lavinia_Cristina_ întreabă: