From fa9babda398d1249c764823fe60832558eb3fc76 Mon Sep 17 00:00:00 2001 From: Jerome Leonard Date: Wed, 3 May 2017 15:27:32 +0200 Subject: [PATCH] #21 return only expansion modules --- contrib/misp-modules-loader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/misp-modules-loader.py b/contrib/misp-modules-loader.py index 8ffb19397..fb0ed9e83 100644 --- a/contrib/misp-modules-loader.py +++ b/contrib/misp-modules-loader.py @@ -39,8 +39,9 @@ def run(argv): sys.exit() elif opt in ('-l', '--list'): - print(json.dumps(modules)) - sys.exit(0) + modules = [m for m in modules if mhandlers['type:' + m ] == "expansion"] + print(json.dumps(modules)) + sys.exit(0) elif opt in ('-r', '--run'): module = arg