Questions tagged [nmap]

Questions relating to Nmap, a free and open-source utility for network exploration or security auditing.

Nmap is a free and open-source port scanner, operating system fingerprinter, and service fingerprinter, fully extensible via the Lua-based Nmap Scripting Engine (NSE).

Here are some resources for answering Nmap questions:

719 questions
352
votes
3 answers

How to get a list of all valid IP addresses in a local network?

Is there a way to get a list of all valid IP addresses in a local network? I mean all IP addresses that each user is using in the network.
M.J.Ahmadi
  • 3,931
  • 4
  • 17
  • 24
167
votes
4 answers

Why have i++; i--; right after each other?

I was looking at the source code for nmap that was released in 1997 and I noticed this section of code that looks a little odd to me: int i=0, j=0,start,end; char *expr = strdup(origexpr); ports = safe_malloc(65536 * sizeof(short)); i++; …
DDiamond
  • 1,628
  • 2
  • 7
  • 17
44
votes
11 answers

is it possible to get the MAC address for machine using nmap

I have a list of remote machines in a text files. Can I know their MAC addresses using nmap ?
Jury A
  • 19,192
  • 24
  • 69
  • 93
26
votes
2 answers

How to retrieve both TCP and UDP ports with Nmap?

I need to retrieve both TCP and UDP ports in the same scan with Nmap in the fastest way possible. I'll try to explain it better. If I use the most common command: nmap 192.168.1.1 It retrieves ONLY TCP ports and it is really fast. If I use the…
raz3r
  • 3,071
  • 8
  • 44
  • 66
25
votes
2 answers

nmap warning: giving up on port because retransmission cap hit (2)

I am trying to scan a large set of domain names using nmap. I used the following command: Nmap -PN -p443 -sS -T5 -oX out.xml -iL in.csv I get the following warning: Warning: xx.xx.xx.xx giving up on port because retransmission cap hit (2). Why…
Wiliam A
  • 457
  • 3
  • 7
  • 10
21
votes
2 answers

How to determine which IPs in a given range have port 80 using nmap?

I'm new to bash scripting and I'm trying to get this working: Scanning an IP range for finding devices with the port 80 open... I think it has to look like this: #!/bin/bash echo ----------------------------------- for ip in 192.168.0.{1,.255};…
bananah
  • 211
  • 1
  • 2
  • 3
17
votes
1 answer

Nmap::Parser, Segmentation fault on large files

I would like to use Nmap::Parser to convert the XML output of an nmap scan into a CSV file and I am already having problems at the very beginning. Parsing small TCP/UDP scans work fine, but when I try to convert a larger file (e.g., 20 MB) ,…
rhe24
  • 171
  • 2
15
votes
3 answers

How do I detect iPhone on network?

I am trying to detect if my iPhone is in the same network as my Raspberry Pi. I would like to execute a script when I am at home and my iPhone's presence is registered in my LAN. It seems that when the phone is in standby not even the iphone-sync…
PiEnthusiast
  • 314
  • 1
  • 4
  • 19
13
votes
1 answer

nmap could not locate nse_main.lua

When I try to use the following nmap -p 443 -Pn --script=ssl-cert ip_address I get the following error: Starting Nmap 7.70 ( https://nmap.org ) at 2019-06-04 15:20 UTC NSE: failed to initialize the script engine: could not locate nse_main.lua stack…
health-dev
  • 133
  • 1
  • 7
11
votes
6 answers

After installing NMAP: dnet: Failed to open device eth0?

Error after starting command > nmap dnet: Failed to open device eth0 after installing NMAP. QUITTING!
Davor
  • 676
  • 1
  • 11
  • 15
11
votes
3 answers

nmap says port is closed while nestat says it's listening

This is Ubuntu 12.04 env. I have a TCP service running on port 8020 on the box: My question is: Why port 8020 is not discovered in nmap as an open port while nestat says it's listening? if i run netstat -tuplen Active Internet connections (only…
Shengjie
  • 12,336
  • 29
  • 98
  • 139
8
votes
4 answers

NMAP running on Zenmap 7.93 NSOCK ERROR ssl_init_helper OpenSSL legacy provider failed to load

I installed the latest version of Zenmap 7.93 that calls Nmap on Windows 11. I also installed the latest version of OpenSSL 1.1.1.q. However, when I launch Zenmap and conducted an Intense Scan: nmap -T4 -A -v 192.168.1.12 The following Message was…
Johnny
  • 819
  • 1
  • 10
  • 24
8
votes
2 answers

Parsing nmap output

A project to familiarize myself that I'm working on is to parse through an nmap result. (I know of the -oG option, but I'm working with grep, awk, for, and while loops here). Below is what I'm trying to parse through: Starting Nmap 7.60 (…
Nick
  • 93
  • 1
  • 5
7
votes
4 answers

Mobile Device identification using Nmap

I am attempting to identify a mobile device on a LAN using Nmap, more specifically an Android smartphone. Both my laptop and the target (android smartphone) are connected to the same access point. I can ping the device etc. When I run a standard…
greatodensraven
  • 281
  • 1
  • 7
  • 14
7
votes
1 answer

nmap skip port scan but execute --script?

I'm trying to use nmap with a script which works with a normal scan. But when executing nmap -sn --script=... it just finds the host (target) and stops. What would the command be to scan the target with the script but not do a port scan?
Anagio
  • 3,005
  • 9
  • 44
  • 81
1
2 3
47 48