Scan for computers from IP Range

5

1

I'm looking for a way to scan all the computers on our network and bring back there computer name and allocated IP.

For example:

scanrange -s 10.222.0.0 -e 10.222.255.255

The result I'm looking for are like so

10.222.4.2 - \\EDC-SR-USR-004456
10.222.4.3 - \\EDC-SR-USR-004466
10.222.4.4 - \\EDC-SR-USR-004826
...

Are there any examples of how this can be accomplished via command prompt?

RobertPitt

Posted 2010-07-08T08:40:12.660

Reputation: 574

Answers

4

Angry IP scanner has command-line support, however it can not display results in the prompt. It can however write to a file that you later can display in your command prompt.

For example:

C:\Users\<NAME>\Downloads>ipscan-3.0-beta4.exe -f:range 10.0.0.10 10.0.0.20 -s -q

Initiates a scan that scans the range 192.168.1.10 - 192.168.1.20

C:\Users\<NAME>\Downloads>ipscan-3.0-beta4.exe -f:range 10.0.0.10 10.0.0.20 -s -q -o log.txt

Initiates a scan that scans the range 192.168.1.10 - 192.168.1.20 and writes the results to log.txt

type log.txt

Would then print the log file to the command prompt like so:

Generated by Angry IP Scanner 3.0-beta4
http://www.azib.net/ipscan/

Scanned 10.0.0.130 - 10.0.0.140
8-jul-2010 10:53:38

IP              Ping            Hostname                Ports
10.0.0.130      [n/a]           [n/s]                   [n/s]
10.0.0.131      [n/a]           [n/s]                   [n/s]
10.0.0.132      [n/a]           [n/s]                   [n/s]
10.0.0.133      [n/a]           [n/s]                   [n/s]
10.0.0.134      [n/a]           [n/s]                   [n/s]
10.0.0.135      [n/a]           [n/s]                   [n/s]
10.0.0.136      [n/a]           [n/s]                   [n/s]
10.0.0.137      [n/a]           [n/s]                   [n/s]
10.0.0.138      1 ms            HOSTNAM                 [n/s]
10.0.0.139      [n/a]           [n/s]                   [n/s]
10.0.0.140      [n/a]           [n/s]                   [n/s]

These are the commands for Angry IP scanner:

Pass the following arguments:
[options] <feeder> <exporter>

Where <feeder> is one of:
-f:range <Start IP> <End IP>
-f:random <Base IP> <IP Mask> <Count>
-f:file <File>

<exporter> is one of:
-o filename.txt     Text file (txt)
-o filename.csv     Comma-separated file (csv)
-o filename.xml     XML file (xml)
-o filename.lst     IP:Port list (lst)

And possible [options] are (grouping allowed):
-s  start scanning automatically
-q  quit after exporting the results
-a  append to the file, do not overwrite

BloodPhilia

Posted 2010-07-08T08:40:12.660

Reputation: 27 374

4

nmap - http://nmap.org/ - is an excellent portscanner which will do name lookup.

If you are simply looking to get a list of machine names from Windows (I'm guessing, given you refer to the "Command Prompt") you could simply usenet view

James

Posted 2010-07-08T08:40:12.660

Reputation: 393

net view does not force the discovery of computers and henceforth does not show all computer necessarily. – BloodPhilia – 2010-07-08T08:48:50.773

thanks for the net view information but i cant find any switches to show the computer information aswell like my example: IP - NAME - DESCRIPTION :/ but net view for me is a good start. – RobertPitt – 2010-07-08T08:52:53.057