Skip to content

Complete --script-args based on --script, closes issue #1#3

Closed
rewanthtammana wants to merge 1 commit intobonsaiviking:masterfrom
rewanthtammana:script-args
Closed

Complete --script-args based on --script, closes issue #1#3
rewanthtammana wants to merge 1 commit intobonsaiviking:masterfrom
rewanthtammana:script-args

Conversation

@rewanthtammana
Copy link

@rewanthtammana rewanthtammana commented May 24, 2017

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 arg3
For example, the entries should be like
shodan-api: shodan-api.hostname shodan-api.port shodan-api.host

Everything else works same as before.

@rewanthtammana rewanthtammana changed the title Complete --script-args based on --script Complete --script-args based on --script, closes issue #1 May 24, 2017
@rewanthtammana rewanthtammana mentioned this pull request May 24, 2017
@rewanthtammana
Copy link
Author

rewanthtammana commented May 24, 2017

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

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.

1 participant