Complete --script-args based on --script, closes issue #1#3
Closed
rewanthtammana wants to merge 1 commit intobonsaiviking:masterfrom
Closed
Complete --script-args based on --script, closes issue #1#3rewanthtammana wants to merge 1 commit intobonsaiviking:masterfrom
rewanthtammana wants to merge 1 commit intobonsaiviking:masterfrom
Conversation
Open
Author
|
The script works fine when the db list is small. This script has to read the entire database file when user presses [TAB][TAB] and this process is slow because there are few intermediate stages in between like opening the file, setting the seek position, then scanning each and every line and trimming every line for the script name and finally comparing it with the users input. So, when the click tries to autocomplete the --script-args option on every double click of the user, all the above steps have to be processed before showing the output which is very cumbersome and it degrades the performance of Nmap. Another better method is used to complete this task and PR is made on #4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Suggestion cannot be applied right now. Please check back later.
To auto-complete the --script-args based on --script we have to store them initially in our db file.
Inorder for the script to work, create scripts/script-args.db file.
Syntax in the db file:
scriptname: arg1 arg2 arg3For example, the entries should be like
shodan-api: shodan-api.hostname shodan-api.port shodan-api.hostEverything else works same as before.