mirror of
https://github.com/Cronocide/wifipumpkin3.git
synced 2025-01-22 19:37:18 +00:00
change do_info command to tabulate style
This commit is contained in:
parent
444c3caaf9
commit
0c2a4699ef
@ -23,9 +23,10 @@ class ConsoleUI(Cmd):
|
||||
def set_prompt(self):
|
||||
self.prompt = '{} > '.format(setcolor('wp3',color='blue',underline=True))
|
||||
|
||||
def do_modules(self,args):
|
||||
""" show modules available"""
|
||||
pass
|
||||
# def do_modules(self,args):
|
||||
# """ show modules available"""
|
||||
# pass
|
||||
|
||||
def do_search(self,args):
|
||||
""" search modules by name"""
|
||||
pass
|
||||
@ -34,9 +35,9 @@ class ConsoleUI(Cmd):
|
||||
""" load module on session"""
|
||||
pass
|
||||
|
||||
def do_back(self,args):
|
||||
""" unload module on session"""
|
||||
pass
|
||||
# def do_back(self,args):
|
||||
# """ unload module on session"""
|
||||
# pass
|
||||
|
||||
## Override methods in Cmd object ##
|
||||
def preloop(self):
|
||||
|
12
core/main.py
12
core/main.py
@ -231,9 +231,15 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
|
||||
|
||||
def do_info(self, args):
|
||||
''' show all variable for settings AP'''
|
||||
print(display_messages('Settings Access Point:',info=True,sublime=True))
|
||||
for item in self.commands.keys():
|
||||
print('{} = {} '.format(item, self.conf.get('accesspoint',self.commands[item])))
|
||||
headers_table, output_table = ["BSSID", "SSID", "Channel", "Iface"], []
|
||||
print(display_messages('Settings AccessPoint:',info=True,sublime=True))
|
||||
output_table.append([
|
||||
self.conf.get('accesspoint',self.commands["bssid"]),
|
||||
self.conf.get('accesspoint',self.commands["ssid"]),
|
||||
self.conf.get('accesspoint',self.commands["channel"]),
|
||||
self.conf.get('accesspoint',self.commands["interface"]),
|
||||
])
|
||||
print(tabulate(output_table, headers_table,tablefmt="simple"))
|
||||
print('\n')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user