Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @goto :batch
- =========================================================================================
- if there are any updates made to this App newest
- version can be found at http://batch.nhserver.ml
- by ImDeepWithWindows from http://HackForums.net
- =========================================================================================
- :batch
- @echo off
- setlocal EnableDelayedExpansion
- :rescan
- cls
- title [%~n0] - scanning ...
- color 0e
- for /f "tokens=2 skip=4" %%A in ('mode con: /status') do set "WindowColumns=%%A" & goto :GotColumnCount
- :GotColumnCount
- set "LineAcrossScreen=echo."
- for /L %%A in (1,1,%WindowColumns%) do set "LineAcrossScreen=!LineAcrossScreen!_"
- for /f "tokens=2 delims=:" %%A in ('netsh int ipv4 show address ^| find /I "Default Gateway"') do set "Dgateway=%%A" & set "Dgateway=!Dgateway: =!"
- for /f "tokens=5 skip=5" %%A in ('netsh int ipv4 show ipaddress') do set "ThisComputersIP=%%A" & goto :GotIP
- :GotIP
- echo.
- echo.getting the IP-Addresses of all other computers on this network including hidden computers ...
- echo.
- %LineAcrossScreen%
- echo.
- for /f "tokens=1,2,3,4 delims=." %%A in ('echo %Dgateway%') do set "IPrange=%%A.%%B.%%C." & set /a "StartAt=%%D+1"
- set /a "CompCount=0+0"
- for /l %%A in (%StartAt%,1,255) do (
- if NOT "!IPrange!%%A"=="%ThisComputersIP%" (
- for /f "tokens=8 skip=2" %%B in ('tracert -d -h 1 -w 1000 !IPrange!%%A') do (
- if NOT "%%B"=="%Dgateway%" ( echo.New computer found [ !IPrange!%%A ] & set /a "CompCount+=1" )
- )
- )
- )
- color 0b
- title [%~n0] - done scanning
- %LineAcrossScreen%
- echo.
- echo.--
- echo.total number of other computers on this network: !CompCount!
- echo.--
- echo.
- echo.
- echo.tap ^<space^> to re-scan
- pause >nul
- goto :rescan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement