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
2
votes
2 answers

Trying to scan a range of IP's with NMAP in python3

Have a bit of a noob question with NMAP, I've been trying to debug for hours to no avail. Trying to scan a range of IP's with Nmap, yet every time I run the scan command with a range I get this error: File "", line 1, in File…
Ethan Marcus
  • 1,266
  • 2
  • 9
  • 12
2
votes
1 answer

Permission denied when trying to run NMAP process on Android using Java code of Android app

i'm trying to create an app android to run nmap commands from terminal and shows the result in the app I am trying to run this line of code: try { Process p = Runtime.getRuntime().exec("nmap "); BufferedReader inputStream =…
Rachid
  • 39
  • 3
2
votes
1 answer

Python script to retrieve remote OS information without using nmap

I am trying to write a python script that can retrieve remote OS information (username, OS name, version, etc), like Nmap. Is it possible to do so without using Nmap ?
2
votes
2 answers

try to save nmap result to txt file

I try to save results from nmap scan to a txt file. I use this command nmap -n -Pn -p T:3389 -T5 -sS -iR 0 | grep "scan" | awk '{ print $5 }' > test.txt cat test.txt the output looks like this…
jnass
  • 31
  • 1
  • 5
2
votes
3 answers

Formatting nmap output

I have an nmap output looking like this Nmap scan report for 10.90.108.82 Host is up (0.16s latency). PORT STATE SERVICE 80/tcp open http |_http-title: Did not follow redirect to https://10.90.108.82/view/login.html I would like the output to…
eric
  • 21
  • 1
2
votes
1 answer

Why does my .scan function from the Python-NMAP module show 'str' Attribute Error?

I installed first the nmap module in PyCharm but received as many others the error for my nmap.PortScanner function. Therefore, I uninstalled nmap and installed python-nmap. Now, I have however the problem with executing the command: import…
Alex_P
  • 2,580
  • 3
  • 22
  • 37
2
votes
1 answer

Compile Nmap as static binary

I am trying to install Nmap as a static binary. I have tried several configure/make stanzas. The error changes but the problem is the nsock dependency included in the Nmap source code. I have a static binary for openssl and static lib for…
m00n
  • 21
  • 1
  • 3
2
votes
2 answers

nmap to scan MAC address for remote machine by non-ROOT user

Env- Centos 7 , nmap 6.40 Currently I'm trying to fetch MAC/HW addresses for few list of IP's via nmap command utility and with root user its working perfectly. As root user nmap -sP -PE -iL Starting Nmap 6.40 ( http://nmap.org )…
user183980
  • 274
  • 3
  • 12
2
votes
4 answers

Get live hosts MAC in local network

Hi I'm working on a small bash script that will scan lan every 5 minutes and get live host and then get theirs MAC addresses. So far I have this: nmap -sP -n -oG - 10.0.0.1-20 | grep "Up" | awk '{print $2}' Which gives me ip addresses. Now I have…
ajitam
  • 371
  • 3
  • 16
2
votes
1 answer

Parsing Nmap to display each service followed by each ip using bash

I need to be able to display what ips have each service port open, with each service listed alphabetically, formatted as so: ftp ============ 192.168.33.226 192.168.33.129 192.168.33.220 http-alt ============ 192.168.33.243 192.168.33.252 I have a…
user9263720
2
votes
3 answers

how to check if some port is open or not in hosting server

I am integrating a payment gateway in the website which is being hosted in a server by a company. This process needs the 2 port to open, I have tested this with one server where I asked them to open the port and they did and my code run fine. But…
Sushan Shrestha
  • 21
  • 1
  • 1
  • 8
2
votes
2 answers

Extracting from a file and pasting details to another file

The problem is regarding extracting the details of the Oracle Virtual box(2nd paragraph) from the "nmap non-gui version". I understand the usage of "grep" and "loops" and have already tried everything but what if there are other systems connected on…
ASK Arjun
  • 111
  • 1
  • 18
2
votes
3 answers

Which layer in the OSI model does a network scan work on?

When doing a network scan using for example NMAP with its "-A" option, what layer of the OSI model does it work on? For reference, this is the description of the "-A" option: -A : "Enable OS detection, version detection, script scanning, and…
user6921088
2
votes
1 answer

Using mock in testing of django application to override a function

I have view function that uses nmap to scan the devices in the network. views.py import nmap def home(request): y=nmap.PortScanner() data = y.scan(hosts="192.168.1.*", arguments="-sP") context[status]=data['status']['addresses']['ipv4'] …
vishnu m c
  • 841
  • 1
  • 7
  • 21
2
votes
2 answers

nmap and print(nm.csv()) help needed to print out to csv.file

I need you help with nmap script and printing the output to csv file. When I run the script and finish it with print(nm.csv()) I got the following results displayed which is what I want first…
Ivan Madolev
  • 119
  • 1
  • 12