added command info modules/proxys

This commit is contained in:
mh4x0f 2020-03-29 00:33:17 -03:00
parent cdd2038cd8
commit 7ccab99da9
3 changed files with 39 additions and 3 deletions

View File

@ -114,6 +114,7 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
print("\n")
def do_mode(self, args):
""" all wireless mode available """
headers_table, output_table = ["ID","Activate","Description"], []
print(display_messages('Available Wireless Mode:',info=True,sublime=True))
for id_mode,info in self.wireless.getAllModeInfo.items():
@ -218,6 +219,27 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
def do_info(self, args):
""" get info from the module/plugin"""
try:
command = args.split()[0]
plugins = self.mitmhandler.getInfo().get(command)
proxys = self.proxy.getInfo().get(command)
if plugins or proxys:
print(display_messages('Information {}: '.format(command),info=True,sublime=True))
if plugins:
for name,info in plugins.items():
if (name != 'Config'):
print(' {} : {}'.format(setcolor(name,color='blue'),
setcolor(info,color='yellow')))
if proxys:
for name,info in proxys.items():
if (name != 'Config'):
print(' {} : {}'.format(setcolor(name,color='blue'),
setcolor(info,color='yellow')))
if plugins or proxys:
print('\n')
except IndexError:
pass
def do_info_ap(self, args):
@ -345,6 +367,13 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
return setcolor(status,color= 'red')
def complete_info(self, text, args, start_index, end_index):
if text:
return [command for command in list(self.commands.keys())
if command.startswith(text)]
else:
return list(self.commands.keys())
def complete_ignore(self, text, args, start_index, end_index):
if text:
return [command for command in self.logger_manager.all()

View File

@ -25,8 +25,11 @@ class MitmController(PluginsUI,ControllerBlueprint):
self.mitm_infor[k.ID] = {
'ID': k.ID,
'Name' : k.Name,
'Activate': k.isChecked(),
'Author' : k.Author,
'Logger' : k.LogFile,
'Description': k.Description,
'Config' : k.getConfig
'Config' : k.getConfig,
}
self.m_name = []

View File

@ -32,8 +32,12 @@ class ProxyModeController(PluginsUI, ControllerBlueprint):
'ID': k.ID,
'Name' : k.Name,
'Port' : k.getRunningPort(),
'Activate': k.isChecked(),
'Author' : k.Author,
'Logger' : k.LogFile,
'ConfigPath' : k.CONFIGINI_PATH,
'Description': k.Description,
'Config' : k.getConfig
'Config' : k.getConfig,
}