-
February 6th, 2004 11:16 PM
#11
I'd have to say that the easiest way is most likely nmap -sP.
If you are using the 192.168.0.0 Network with a 255.255.255.0 subnet mask then you'd just have to type in nmap -sP 192.168.0.0/24 (then to write to a file you simple need to append > file.name to the end)
Your other option would be (assuming this is linux) to create a lil script to do it
Code:
#!/bin/bash
i=0
rm -rf results.txt
while [ $i -le 255 ]; do
ping -b -c 1 192.168.0.$1
i=`expr $i + 1`
done
IT Blog: .:Computer Defense:.
PnCHd (Pronounced Pinched): Acronym - Point 'n Click Hacked. As in: "That website was pinched" or "The skiddie pinched my computer because I forgot to patch".
-
February 6th, 2004 11:19 PM
#12
if you want to use ping here ya go
pinger.bat
-----------------------
for /L %%X in (1,1,254) do ping -n 1 %1.%%X |find /I "reply" >>c:\reply.txt
for /F "tokens=3" %%Y in (c:\reply.txt) do fscan %%Y >c:\scanned.txt
notepad c:\scanned.txt
del reply.txt
-----------------------
you could use this on any class network by entering the first three octets without the third "."
pinger 192.168.1
pinger 10.0.0
pinger 67.88.22
but a scanner like superscan can ping them all and scan all the ports you want only on machines that return a response much faster than a bat can. you can then save the scan to a file by pushing a button
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
-
February 7th, 2004 12:10 AM
#13
Junior Member
Superscan
Yeah Superscan is really cool, But I'm trying to build the "Lazy Mans Pen/audit CD" for myself!!!
I think the answer would to do an nmap scan via a script, but I'm trying to get the logic down to determine how it can figure out what IP's are live.
Thinking something like
nmap -sP 192.168.0.0/24 > IP.txt
as HTRegz suggested, however that will only find me the live hosts within the 255.255.255.0 network. If there was some way to ping the subnet mask to determine if it had any live hosts, and if not skip it, that would be exactly what I'm looking for.
Something like: (sorry I don't know any programming)
Ping the subnet,
If no Live hosts next subnet
If live hosts are present nmap -sP IP ADDRESS > textfile.txt
Is something like that possible?
-
February 7th, 2004 02:30 AM
#14
Something like that would indeed be very possible, either through batch-file programming or through shell scripting.
Batch file creation: http://antionline.com/showthread.php?s=&threadid=252001
Shell programming: http://antionline.com/showthread.php?s=&threadid=252818 (Not as tutorialish, but it should still prove helpful.)
-
February 7th, 2004 04:24 AM
#15
change "fscan" to nmap w/ the args you want and call pinger.bat with start.bat:
start.bat
-----------------
for /L %%W in (0,1,255) do pinger 192.168.%%W
-----------------
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks