Closed pwndad closed 3 weeks ago
@pwndad it doesn't "work" because:
@@notes_opts = Rex::Parser::Arguments.new(
[ '-a', '--add' ] => [ false, 'Add a note to the list of addresses, instead of listing.' ],
[ '-d', '--delete' ] => [ false, 'Delete the notes instead of searching.' ],
[ '-n', '--note' ] => [ true, 'Set the data for a new note (only with -a).', '<note>' ],
[ '-t', '--type' ] => [ true, 'Search for a list of types, or set single type for add.', '<type1,type2>' ],
[ '-h', '--help' ] => [ false, 'Show this help information.' ],
[ '-R', '--rhosts' ] => [ false, 'Set RHOSTS from the results of the search.' ],
[ '-o', '--output' ] => [ true, 'Save the notes to a csv file.', '<filename>' ],
[ '-O', '--order' ] => [ true, 'Order rows by specified column number.', '<column id>' ],
[ '-u', '--update' ] => [ false, 'Update a note. Not officially supported.' ]
)
Doesn't list '-S' as an option
If you add (at line 1240):
[ '-S', '--search' ] => [ true, 'Search string to filter by.', '<filter>' ],
The code will get triggered - and the notes (appears) to be filtered - I am saying appears as I don't have nmap results that match your data
Fixed in #19129 which will be included in the next regularly scheduled release, 6.4.6 which should be posted tomorrow.
Summary
notes -h
states that we can use this example commandnotes -S 'nmap.nse.(http|rtsp)'
Example documentationBut this flag is neither documented here missing documentation for search parameter nor is it working correctly when used like this.
Acutally there seems to be code handling the
-S
parameter: existing code for handling undocumented parameterMotivation
To be consistent between parameter documentation, examples and code behind.
Steps to resolve this issue
EITHER
search_term
OR-S
parameter additionally to the example and test it accordingly e.g.Draft the doc
-S, --search <filter> Search string to filter by
Open a pull request
Sorry for not proposing a PR but I could not figure out why the undocumented parameter is not working as expected.