Skip to content

Yikizi/nmap-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nmap Wrapper

nmap demo

Usage

Releases

Grab a binary executable for your operating system from our releases page page.

Manual build

Clone this repository and run:

go run *.go

To build a binary run:

go build

Problem

Currently nmap is difficult to use. There are 115 different flags and those flags take also arguments.

Also there are over 3000 lines in the manpage, which makes it hard to navigate.

Idea

We plan to make a nmap CLI tool, that will solve these problems.

HOW???? - you may ask

By providing:

  • Interactive interface
  • Tab completion
  • Inline documentation
  • Smart suggestions
  • Command saving
  • History

Interactive Features

This tool enhances the Nmap experience with several interactive features.

Command Saving (set and list)

You can save frequently used Nmap command snippets or full commands using the set command. This allows you to assign a short name to a longer command or set of flags and arguments, making it easier to reuse complex configurations.

How to save a command:

Use the syntax set <name> <command>. For example, to save a common port scan:

set common_ports -p22,80,443,8080

Now you can use common_ports within your nmap commands.

How to use a saved command:

Simply include the saved name in your command line. The tool will automatically substitute the name with the saved command string before execution. For example, to run a scan using the saved common_ports setting on a target:

common_ports scanme.nmap.org

This will execute nmap -p22,80,443,8080 scanme.nmap.org.

You can even combine multiple saved commands or use them with regular Nmap flags:

set aggressive_scan -A
aggressive_scan common_ports 192.168.1.1

This would execute nmap -A -p22,80,443,8080 192.168.1.1.

How to list saved commands:

Type list and press Enter to display all your saved command sets.

list

Autocompletion and Smart Suggestions

The CLI tool provides intelligent autocompletion powered by go-prompt. Pressing the Tab key will show you available Nmap flags and their descriptions.

Features:

  • Intelligent Fuzzy Matching: You can type a part of the command OR the description - it will match!
  • Basic Tab Completion: Provides a list of standard Nmap flags and script categories when you press Tab.
  • Inline Documentation: Each suggestion includes a brief description to help you understand what the flag or option does.
  • Smart Suggestions (Last Used Values): The tool remembers the last value you used for certain flags (like -p, -iL, --script-args, etc.). When you type one of these flags again, the suggestion will automatically include the last used value, often highlighted with [last used: value]. This speeds up repeated scans with similar parameters.
  • Saved Command Suggestions: Your saved command names will also appear in the suggestions list, allowing you to quickly select them using Tab.

To use autocompletion, just start typing a flag or command name and press Tab. Navigate the suggestions using the arrow keys and press Enter to select one.

Used technologies

Contibutors

About

Interactive nmap wrapper written in Go

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages