Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Find XP Computers on a network with Batch file

Posted on 2014-07-17
2
Medium Priority
?
878 Views
Last Modified: 2014-08-08
Hello experts,

I am trying to write a batch file and use nmap.exe to find XP machines on the network. The batch file executes:

(I downloaded zenmap)

C:\program files\nmap.exe -F -O 192.168.1.0/24 > XPList.txt

Sample export is:

Nmap scan report for xp1.lab.net (192.168.1.16)
Host is up (0.00076s latency).
All 100 scanned ports on xp.lab.net  (192.168.1.16) are filtered
Warning: OSScan results may be unreliable because we could not find at least 1 o
pen and 1 closed port
Device type: general purpose
Running: Microsoft Windows 2000
OS CPE: cpe:/o:microsoft:windows_2000::sp4
OS details: Microsoft Windows 2000 SP4

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .

How can I loop in all the text and echo out all the XP machines? (Windows 2000)

Is there a better way to do this?
0
Comment
Question by:zequestioner
2 Comments
 
LVL 1

Author Comment

by:zequestioner
ID: 40203094
http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/

Per the above website i can use this:

#17: How do I detect remote operating system?

You can identify a remote host apps and OS using the -O option:

 
nmap -O 192.168.1.1
nmap -O  --osscan-guess 192.168.1.1
nmap -v -O --osscan-guess 192.168.1.1


Is there a better way to do this and have the script output a nice list?
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 40204164
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question