Commit 6806509c by Joshua Abraham

Added search function, need to add tab-complete

parent 233ef4ce
......@@ -159,6 +159,7 @@ class RoutersploitInterpreter(BaseInterpreter):
help Print this help menu
use <module> Select a module for usage
exec <shell command> <args> Execute a command in a shell
search <search term> Search for appropriate module
exit Exit RouterSploit"""
module_help = """Module commands:
......@@ -456,5 +457,11 @@ class RoutersploitInterpreter(BaseInterpreter):
def command_exec(self, *args, **kwargs):
os.system(args[0])
def command_search(self, *args, **kwargs):
for arg in args:
matches = [s for s in self.modules if arg in str(s)]
for match in matches:
print(match.replace('.', '/'))
def command_exit(self, *args, **kwargs):
raise EOFError
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