From 11d033bbbfc67abe802cbeb1956a04ac49942e4a Mon Sep 17 00:00:00 2001 From: AlessandroZ Date: Tue, 27 Mar 2018 13:16:53 +0200 Subject: [PATCH] launch a specific submodule (deleted yesterday by error) Former-commit-id: b25c1752b85f170299e32c5930cf65d1a4b1c2dc [formerly 390482d22391f6dd077423d8b88a3acd63ac5b9b] Former-commit-id: 07175c12bb58b78155bd8fc99330f704dacfe77c --- Linux/laZagne.py | 18 ++++++++++++++++-- Mac/laZagne.py | 16 +++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Linux/laZagne.py b/Linux/laZagne.py index b7eae47c..3daac253 100755 --- a/Linux/laZagne.py +++ b/Linux/laZagne.py @@ -89,7 +89,22 @@ def manage_advanced_options(): constant.jitsi_masterpass = args['master_pwd'] def launch_module(module): - for i in module: + + modulesToLaunch = [] + try: + # Launch only a specific module + for i in args: + if args[i] and i in module: + modulesToLaunch.append(i) + except: + # If no args + pass + + # Launch all modules + if not modulesToLaunch: + modulesToLaunch = module + + for i in modulesToLaunch: try: constant.st.title_info(i.capitalize()) # Print title pwdFound = module[i].run(i.capitalize()) # Run the module @@ -105,7 +120,6 @@ def launch_module(module): # Run module def runModule(category_choosed, need_high_privileges=False, need_system_privileges=False, not_need_to_be_in_env=False, cannot_be_impersonate_using_tokens=False): - categories = [category_choosed] if category_choosed != 'all' else get_categories() for category in categories: for r in launch_module(modules[category]): diff --git a/Mac/laZagne.py b/Mac/laZagne.py index 179e9c6e..af617f47 100755 --- a/Mac/laZagne.py +++ b/Mac/laZagne.py @@ -106,7 +106,21 @@ def manage_advanced_options(): constant.dictionary_attack = args['attack'] def launch_module(module): - for i in module: + modulesToLaunch = [] + try: + # Launch only a specific module + for i in args: + if args[i] and i in module: + modulesToLaunch.append(i) + except: + # If no args + pass + + # Launch all modules + if not modulesToLaunch: + modulesToLaunch = module + + for i in modulesToLaunch: try: constant.st.title_info(i.capitalize()) # print title pwdFound = module[i].run(i.capitalize()) # run the module