nmap / nmap/nmap

Idea: support multiple input files with -iL

Open
#2,385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, Nmap only supports reading target specs from one file OR from the command-line. We should be able to support multiple files AND command-line specs at the same time. Some potential implementation ideas:

  • -iL option processing changes to not open the file immediately, but to put it into a list or vector of filenames, potentially after a stat() check for readability.
  • grab_next_host_spec changes to iterate over both the list of command-line expressions as well as the list of filenames from the -iL options, opening each in turn and yielding expressions from those with the existing read_host_from_file function.

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

Start by tracing -iL option processing and grab_next_host_spec, then inspect how read_host_from_file currently supplies target expressions. Verify how multiple -iL filenames and command-line specifications should be interleaved or exhausted. Done means Nmap accepts multiple input files together with command-line targets and preserves existing file-reading behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.