nmap / nmap/nmap

nmap run slower in docker

Open
#2,548 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.6k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

Describe the current behavior
A clear and concise description of what the bug or current behavior is.

hello ,I use follow code to scan an ip

import nmap
nm = nmap.PortScanner(nmap_search_path=PortScan.nmap_search_path)
nm.scan(hosts=ip, arguments='-Pn -T 4 -sV --version-intensity=3 -p 1-65535')

when the code run outside docker,it takes a few minute(less than 5 minutes)
but when code run in docker,it takes more than 20 minutes

Expected behavior
Describe what you would like to happen instead.

how can I do to make nmap run in docker takes fewer minute

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the Python nmap.PortScanner scan with the supplied arguments inside and outside Docker, then compare the runtime and identify what Docker-specific condition accounts for the difference. Done means explaining the slowdown and verifying that the scan completes within the expected few-minute range in Docker.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, docker, python
Domain
networking, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.