/ nmap Public
Increase buffer for nmap arguments when "--resume" a scan #1659
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
I have a complicated nmap scan with a long list of ports (used both for "-PS", SYN ping, and "-p", SYN port scan).
Here is what happens when I try to resume this scan (using the .nmap or .gnmap files):
I found that the issue is that the arguments string length is higher than 1024 which is currently not supported:
Line 2339 in 23ee017
Lines 2392 to 2393 in 23ee017
I chose arbitrarily the new value of "1024*128" but it seems large enough while being a reasonable size (131ko). Also based on this, but it is not a definite answer:
With the patch I can confirm that my scan can properly resume.
As a side note, I think that the displayed error message has no relation with the issue here.