'seachmodule' with no term now lists all modules and descriptions

1.6
Harmj0y 2016-02-16 00:35:32 -05:00
parent 3cf322e76a
commit 4bab4f9484
2 changed files with 2 additions and 8 deletions

View File

@ -351,13 +351,7 @@ class MainMenu(cmd.Cmd):
def do_searchmodule(self, line):
"Search Empire module names/descriptions."
searchTerm = line.strip()
if searchTerm.strip() == "":
print helpers.color("[!] Please enter a search term.")
else:
self.modules.search_modules(searchTerm)
self.modules.search_modules(line.strip())
def do_creds(self, line):

View File

@ -95,7 +95,7 @@ class Modules:
print ""
for moduleName,module in self.modules.iteritems():
if searchTerm.lower() in moduleName.lower() or searchTerm.lower() in module.info['Description'].lower():
if searchTerm.lower() == '' or searchTerm.lower() in moduleName.lower() or searchTerm.lower() in module.info['Description'].lower():
messages.display_module_search(moduleName, module)
# for comment in module.info['Comments']: