Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new interactive keyboard command (o) to show open ports during a scan #1390

Closed
wants to merge 1 commit into from

Conversation

matrix
Copy link

@matrix matrix commented Nov 14, 2018

Hi,
I added a new feature to show open ports during a scan, in some situations it can be useful (ex. screen session, large scan, etc ...), in others not :)

# ./nmap -A scanme.nmap.org
Starting Nmap 7.70SVN ( https://nmap.org ) at 2018-11-14 20:46 CET
Interactive keyboard commands:
?               Display this information
o               Show open ports
v/V             Increase/decrease verbosity
d/D             Increase/decrease debugging
p/P             Enable/disable packet tracing
anything else   Print status
More help: https://nmap.org/book/man-runtime-interaction.html
Scanning 1 host(s)
Target 45.33.32.156
Found open port(s): 22/tcp 80/tcp 9929/tcp

Scanning 1 host(s)
Target 45.33.32.156
Found open port(s): 22/tcp 80/tcp 9929/tcp 31337/tcp

@dmiller-nmap
Copy link

Thanks for this contribution. Unfortunately, this is not a feature we are interested in adding and maintaining at this time. When using the -v option, Nmap prints a line for each open port discovered, which is usually sufficient. If you are looking for ways to recover scan data before a target times out or the scan finishes, we have specific issues for tracking those: #64 for instance.

The reason your build is failing is that you did not #include <vector> where necessary. It's included in some other header file in NSE, which is why it works for you, but the non-NSE build doesn't include it.

@matrix
Copy link
Author

matrix commented Dec 16, 2018

Hi @dmiller-nmap , thanks for the review. Unfortunately the "verbose" option of nmap is not useful when you scan a lot of targets for days and you have no way to verify what is done after the terminal screen has been filled with other messages (like the "packet dropping" warning and more), that's why I wrote these "two lines" of code :)

Have a nice day,
matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants