Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Add subparsers to make modules parameterised #49

Closed
wants to merge 2 commits into from
Closed

Add subparsers to make modules parameterised #49

wants to merge 2 commits into from

Conversation

s4chin
Copy link
Contributor

@s4chin s4chin commented Mar 30, 2016

This approach is the second approach.
exitmap -h prints out the help for exitmap, and exitmap module -h prints the help for the modules.
So now exitmap works as exitmap module, for example if one wants to run dnspoison and checktest, one has to type two commands:

exitmap dnpoison
exitmap checktest

The con is that when a new module is added(as you recently did), the subparser code has to be modified so those modules can be used. But the code is a single line so I don't think it should be an issue.
Should I continue with this approach?

@NullHypothesis
Copy link
Owner

Thanks, that sounds promising! Is it also possible to add module-specific command line arguments to exitmap's configuration file? For example, .exitmaprc could have the following content:

[Defaults]
verbosity = info
build_delay = 0.3
analysis_dir = /tmp/exitmap_scans

@NullHypothesis
Copy link
Owner

Thanks for your work, Sachin! Is this ready for review now?

@s4chin
Copy link
Contributor Author

s4chin commented Apr 12, 2016

Okay, this is ready for review.
Changes:

  1. Adding sub-commands to modules is trivial now. The command line args are passed to the setup() function of the modules, so the setup() function can be modified to handle the sub-arguments.
  2. ./bin/exitmap -h prints out help about exitmap with also the available module names.
  3. ./bin/exitmap module -h prints out help about the specific module.
  4. Multiple modules cannot be called in a single command.

I haven't implemented any sub-commands yet, but they can be easily done once the sub-command lists for modules have been decided.

@s4chin s4chin closed this Dec 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants