hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Full Version: Need Help :\
night^man
how i can build a .BAT file that checks pings ?
help plz
BlaStA
What do you mean by "checks pings"?

Read a text-file and ping every IP? Ping every IP in a given range?
night^man
QUOTE (BlaStA @ Dec 31 2003, 06:58 PM)
What do you mean by "checks pings"?

Read a text-file and ping every IP? Ping every IP in a given range?

yup biggrin.gif
jockel
here it is by text file ..

btw ... i'll go an smoke a spliff ... cya and happy nu year @ll !!!
randalizm
nice work, shame is doesnt work though! lol tongue.gif
i think i might fix if i can be bothered
but its almost dere!
BlaStA
It definitively does work. You have to enter the file with the Ips in it.

So here's my batch script to echo all Ips from xx.xx.0.1 to xx.xx.255.254 to a file:
CODE

@echo off
set /p subnet=Subnet (e.g. 192.168):
set /p file=Output file:
IF EXIST %file% DEL %file% /F /Q
FOR /F "delims=. tokens=1,2" %%i IN ("%subnet%") DO ( set primary=%%i&& set secondary=%%j)
FOR /L %%i IN (0,1,255) DO (
FOR /L %%j IN (1,1,254) DO (
echo %primary%.%secondary%.%%i.%%j>>%file%
)
)
echo Done. All IPs from %primary%.%secondary%.0.1 to %primary%.%secondary%.255.254 saved to %file%.
pause
ara2
ahh i like the token trick hehe
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.