mirror of
https://github.com/Cronocide/wifipumpkin3.git
synced 2025-01-23 03:39:18 +00:00
added pumpkinproxy plugins visualization
This commit is contained in:
parent
4841ea94e9
commit
894d3852ad
@ -235,7 +235,7 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
|
||||
print('\n')
|
||||
|
||||
def do_set(self, args):
|
||||
''' set variable the '''
|
||||
''' set variable proxy,plugin and access point '''
|
||||
try:
|
||||
command,value = args.split()[0],args.split()[1]
|
||||
for func in self.parser_list_func:
|
||||
@ -257,8 +257,18 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
|
||||
def do_proxys(self, args):
|
||||
''' show all proxys available for attack '''
|
||||
headers_table, output_table = ["Proxy", "Active", 'Port', 'Description'], []
|
||||
plugin_info_activated = None
|
||||
config_instance = None
|
||||
headers_plugins, output_plugins = ["Name", "Active"], []
|
||||
|
||||
for plugin_name, plugin_info in self.proxy.getInfo().items():
|
||||
status_plugin = self.conf.get('proxy_plugins',plugin_name, format=bool)
|
||||
|
||||
if (plugin_info['Config'] != None) and (plugin_info['Config'].
|
||||
get_name_activated_plugin('plugins') != None):
|
||||
plugin_info_activated = plugin_info
|
||||
config_instance = plugin_info_activated['Config']
|
||||
|
||||
output_table.append(
|
||||
[
|
||||
plugin_name,setcolor('True',color='green') if
|
||||
@ -271,6 +281,23 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
|
||||
print(display_messages('Available Proxys:',info=True,sublime=True))
|
||||
print(tabulate(output_table, headers_table,tablefmt="simple"))
|
||||
print('\n')
|
||||
# check plugin none
|
||||
if not plugin_info_activated: return
|
||||
# check if plugin selected is iquals the plugin config
|
||||
if (plugin_info_activated['ID'] != self.conf.get_name_activated_plugin('proxy_plugins')):
|
||||
return
|
||||
all_plugins = plugin_info_activated['Config'].get_all_childname('plugins')
|
||||
for plugin_name in all_plugins:
|
||||
status_plugin = config_instance.get('plugins', plugin_name,format=bool )
|
||||
output_plugins.append(
|
||||
[
|
||||
plugin_name,
|
||||
setcolor('True',color='green') if status_plugin
|
||||
else setcolor('False',color='red')
|
||||
])
|
||||
print(display_messages('{} plugins:'.format(plugin_info_activated['Name']),info=True,sublime=True))
|
||||
print(tabulate(output_plugins, headers_plugins,tablefmt="simple"))
|
||||
print('\n')
|
||||
|
||||
|
||||
def do_plugins(self, args=str):
|
||||
|
@ -55,6 +55,14 @@ class SettingsINI(object):
|
||||
def get_all_childname(self,key):
|
||||
""" get list all childskeys on file config.ini """
|
||||
return [x.split('/')[1] for x in self.get_all_keys() if x.split('/')[0] == key]
|
||||
|
||||
def get_name_activated_plugin(self, key):
|
||||
""" get status by plugin name """
|
||||
plugins = self.get_all_childname(key)
|
||||
for plugin in plugins:
|
||||
if self.get(key, plugin, format=bool):
|
||||
return plugin
|
||||
return None
|
||||
|
||||
def get_all_keys(self):
|
||||
""" get all keys on settings"""
|
||||
|
Loading…
Reference in New Issue
Block a user