From 862d44d29e3ba25a46ade13d1d65c5b4db497dca Mon Sep 17 00:00:00 2001 From: Claudio Salazar Date: Wed, 11 Oct 2017 17:03:27 -0300 Subject: [PATCH] Update add_new_plugin script with support for xpath --- scripts/add_new_plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/add_new_plugin.py b/scripts/add_new_plugin.py index 02da127..e2bbe9c 100644 --- a/scripts/add_new_plugin.py +++ b/scripts/add_new_plugin.py @@ -7,14 +7,15 @@ ) PLUGIN_DIRECTORY = os.path.join(ROOT_DIRECTORY, 'detectem/plugins') PLUGIN_DIRECTORIES = [ - d for d in os.listdir(PLUGIN_DIRECTORY) if not d.startswith('_') + d for d in os.listdir(PLUGIN_DIRECTORY) + if os.path.isdir(os.path.join(PLUGIN_DIRECTORY, d)) and d != '__pycache__' ] @click.command() @click.option( '--matcher', - type=click.Choice(['url', 'body', 'header']), + type=click.Choice(['url', 'body', 'header', 'xpath']), required=True, help='Set the matcher type.', )