From ec8bb8689ab60425e60f97f8cf288b5d13606369 Mon Sep 17 00:00:00 2001 From: danielsagi Date: Fri, 17 Aug 2018 19:21:08 +0300 Subject: [PATCH] Added explanation about plugins Added explanation in readme about the smart usage of adding arguments in a plugins, rather from changing the main file. --- plugins/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/README.md b/plugins/README.md index bca83d8..4f645fa 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -1,3 +1,14 @@ # Plugins -This folder contains modules that will load before any parsing of arguments by kubehunter's main module \ No newline at end of file +This folder contains modules that will load before any parsing of arguments by kubehunter's main module + +An example for using a plugin to add an argument: +```python +# example.py +from __main__ import parser + +parser.add_argument('--exampleflag', action="store_true", help="enables active hunting") +``` +What we did here was just add a file to the `plugins/` folder, import the parser, and adding an argument. + +All plugins in this folder gets imported right after the main arguments are added, and right before they are getting parsed, so you can add an argument that will later be used in your [hunting/discovery module](../src/README.md).