Load all actions from the actions file
(self)
| 38 | self._actions_loaded = False |
| 39 | |
| 40 | def load_actions(self): |
| 41 | """Load all actions from the actions file""" |
| 42 | if self._actions_loaded: |
| 43 | return |
| 44 | |
| 45 | self.actions.clear() |
| 46 | self.standalone_actions.clear() |
| 47 | self.actions_dir = self.shared_data.actions_dir |
| 48 | with open(self.shared_data.actions_file, 'r') as file: |
| 49 | actions_config = json.load(file) |
| 50 | for action in actions_config: |
| 51 | module_name = action["b_module"] |
| 52 | if module_name == 'scanning': |
| 53 | self.load_scanner(module_name) |
| 54 | elif module_name == 'nmap_vuln_scanner': |
| 55 | self.load_nmap_vuln_scanner(module_name) |
| 56 | else: |
| 57 | self.load_action(module_name, action) |
| 58 | |
| 59 | self._actions_loaded = True |
| 60 | |
| 61 | def load_scanner(self, module_name): |
| 62 | """Load the network scanner""" |
no test coverage detected