I am scanning a network using nmap. I assume that this network has copy machines and printers with IP addresses. Is there a way I can differentiate the regular computers from the printers? nmap can detect the OS, but is it sufficient?

Thank you for any ideas.

link|improve this question
2  
You mean you don't know? You probably shouldn't be using nmap on someone else's network! – Joel Coehoorn Jun 8 '10 at 15:39
feedback

migrated from stackoverflow.com Jun 8 '10 at 14:23

This question came from our site for professional and enthusiast programmers.

3 Answers

Do a range scan and look for open port 515 and 9100. That will tell you which addresses belong to printers.

nmap -p 515,9100 192.168.1.1-200 -oG - | grep open

Then check for ports that are "Open". There is an --open directive, but it's not working for me, for whatever reason.

515 is also used by print servers, so if you have a domain controller (or whatever) acting as a print server, it'll show up here as well. That's where checking 9100 comes in.

Edit:

You can also just do nmap -O 192.168.1.1/24 -oG - | grep printer and trust that nmap will correctly identify the device.

link|improve this answer
1  
Add "631" to the interesting ports. IPP printers use 631. LPR/LPD printers use 515. HP JetDirect (or AppSocket) printers very often use 9100 (some also use 4010, 4020, 4030 and 5503). – pipitas Jul 5 '10 at 21:10
feedback

Why ports 515 and 9100? is there a reason for that?

link|improve this answer
515 is a standard port for print servers. 9100 is a standard port for HP printers' print servers. Generally if they're open, it's a printer. There are a few that don't use 9100, but not many. – Satanicpuppy Jun 8 '10 at 14:52
if you'll register your account on Stack Overflow (with the same OpenID you used when registering here) you'll regain ownership of this question. then you'll be able to post comments on any answers to this question, edit the question if needed, and accept an answer. – quack quixote Jun 8 '10 at 21:19
feedback

The nmap OS detection is enough to 'identify' the printers, as they are the most statical type of machines inside the network. As the answer from satanic puppy already clarified with port numbers, you could use Bonjour as well to sweep the network as many printers come with that enabled. A quick telnet to port 80, even hooks you up with the ugly HP webserver if its a laserprinter to show the type of laserprinter.

Unless you aren't looking for specifically printers, you could use UPnP to sweep, as network printers use that as well for serving drivers to network clients.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown