nmap , Nmap - in one command discover both UDP and TCP at the same time?

Nmap - in one command discover both UDP and TCP at the same time?


Tag: nmap

I need to discover the port 161 both UDP and TCP in big networks. And the results must have the output I chose below.

In order to discover TCP I use

nmap -T4 -sS -p T:161 -iL c:\input.txt -oN c:\output.txt --append-output –open

In order to discover UDP I use

nmap -T4 -sU -p 161 -iL c:\input.txt -oN c:\output.txt --append-output –open

I am looking for a command that will combine both of them. I need a list of both TCP and UPD results in one command, one result. Is it possible? How?


Nmap allows you to combine scan types into a single scan, as long as you don't choose scan types that target the same protocols (e.g. -sST, which would request a TCP SYN and TCP Connect scan, an illegal combination). So your combined scan would be:

nmap -T4 -sSU -p 161 -iL c:\input.txt -oN c:\output.txt --append-output -–open

Unrelated note: If you have the disk space, I would highly recommend switching the -oN option for -oA or just adding -oX to get XML output. Lots of security tools can process this structured output and produce meaningful results. Plus, you don't have to worry when Nmap's screen output changes (which it does fairly regularly) and breaks your parsing scripts, since the XML is a much more stable and naturally extensible format.


nmap: Which version did OS scan and MAC address start needing root permissions?

I would like to run the OS identification abilities of nmap and be able to get the MAC address of a device with out sudo privilege. In which versions did this change?

Service dies when Nmap is run

I am having a weird problem. I have a service running on port 8888 on one of my many servers in a cluster. When I run nmap on my gateway to get all the IPs inside my network, this service miraculously dies. Since nmap does a port scan too, It...

Scanning using nmap

folks.Is there away to use nmap to scan for open resolvers in ones network.I have this command from the nmap page but it seems itsnot working nmap -sU -p 53 --script=dns-recursion <target> ...

nmap shows random open ports on localhost for a fraction of a second

When I scan myself I will often see random open ports: nmap -sT -T normal -p 1-65535 localhost E.g. 43194/tcp open unknown 58167/tcp open unknown Sometimes nothing, sometimes a couple like that. I see however that this has been a false positive before, but it is now very old: http://seclists.org/incidents/2002/Dec/136...

Nmap and grepping of its results

folks.i would like to do reverse dns resolution using nmap where the output will be like below Ip address resolved name how do i go about it using grep, thanks ...

Error import nmap into python

I installed nmap module for python. While i was importing nmap,it received error. This error is attribute error. Command line: [email protected]:~/Desktop# python nmap.py Traceback (most recent call last): File "nmap.py", line 2, in <module> import nmap File "/root/Desktop/nmap.py", line 3, in <module> nm = nmap.PortScanner() AttributeError: 'module' object has no...

How do I run a simultaneous scan in nmap?

I am trying to run a simultaneous nmap scan to do the following http://i.stack.imgur.com/7skvt.png I have divided what I need to do into 2 parts nmap -sN -p 21-25,80,139,8080 nmap -T 5 -sU -p 53,11 thevictim.com/16 How do I run them as a simultaneous scan? Also, are my above commands...

Reading lines of a file into a subprocess in Python

So I'm trying to read a list of IP addresses from a .txt into a subprocess (Nmap) in Python. It's also worth asking if the problem could be the use of quotes or not. Here's the code: addressFile = raw_input("Input the name of the IP address list file. File must...

calling nmap from pythons subprocess module using check_output function is not working

I want to use a python script to use nmap. I realize there is a package for python-nmap. But I want to create a simple script that interprets the output of nmap command then does some more things depending on it's output. Attempting to use check_output("nmap") like this link does:...

Nmap shows that port 5222 is closed but pidgin which uses xmpp(5222) is running. How is this possible?

I am learning to use Nmap. I set up pidgin which uses port 5222(xmpp) for chatting. But when I scan my ports, port 5222 is shown as closed. But chat is working. How is this possible?

What is a 'disallowed entry' when nmap scans through the Robots.txt file?

I have been using nmap to scan an IP address, and one part of the output is: | http-robots.txt: 1 disallowed entry What does this mean? | http-robots.txt: 1 disallowed entry ...