Commit 3cb6c144 by fwkz

Refactoring _show_all()

parent 517d24c6
...@@ -393,13 +393,12 @@ class RoutersploitInterpreter(BaseInterpreter): ...@@ -393,13 +393,12 @@ class RoutersploitInterpreter(BaseInterpreter):
except KeyError: except KeyError:
print("\nTarget devices are not defined") print("\nTarget devices are not defined")
def __show_modules(self, root): # TODO: cover with tests def __show_modules(self, root=''): # TODO: cover with tests
for module in [module for module in self.modules if module.startswith(root)]: for module in [module for module in self.modules if module.startswith(root)]:
print(module.replace('.', os.sep)) print(module.replace('.', os.sep))
def _show_all(self, *args, **kwargs): # TODO: cover with tests def _show_all(self, *args, **kwargs): # TODO: cover with tests
for module in self.modules: self.__show_modules()
print(module.replace('.', '/'))
def _show_scanners(self, *args, **kwargs): # TODO: cover with tests def _show_scanners(self, *args, **kwargs): # TODO: cover with tests
self.__show_modules('scanners') self.__show_modules('scanners')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment