added cyan color print, new banner format and etc.

This commit is contained in:
mh4x0f 2020-02-16 10:50:26 -03:00
parent 7f7787aa9e
commit a900a8680e
6 changed files with 21 additions and 17 deletions

View File

@ -88,6 +88,7 @@ class ConsoleUI(Cmd):
def loadPulpFiles(self, file, data=None):
''' load and execute all commands in file pulp separate for \n '''
print('\n'+display_messages('mode: {}'.format(setcolor('script', 'ciano', True)),info=True))
if os.path.isfile(file):
with open(file, 'r') as f:
data = f.read()
@ -137,6 +138,7 @@ class ModuleUI(Cmd):
Cmd.__init__(self)
self.conf = SettingsINI(C.CONFIG_INI)
self.setOptions()
self.set_prompt_modules()
def setOptions(self):
if (self.parse_args.pulp):

View File

@ -249,7 +249,7 @@ class PumpkinShell(Qt.QObject, ConsoleUI):
command,value = args.split()[0],args.split()[1]
if (command in self.commands.keys()):
self.conf.set('accesspoint',self.commands[command],value)
print(display_messages('{} changed to => {}'.format(command, value),sucess=True))
print(display_messages('changed {} to => {}'.format(command, value),sucess=True))
else:
print(display_messages('unknown command: {} '.format(command),error=True))
except IndexError:

View File

@ -1,21 +1,24 @@
colors = {'BOLD': '\033[1m','BLUE': '\033[34m' ,
'GREEN': '\033[32m','YELLOW' :'\033[33m',
'RED': '\033[91m','ENDC' : '\033[0m','CIANO' :'\033[1m','ORAN' : '\033[91m',
'RED': '\033[91m','ENDC' : '\033[0m','CIANO' :'\033[1;36m','ORAN' : '\033[91m',
'GREY': '\033[37m','DARKGREY' : '\033[1;30m','UNDERLINE' : '\033[4m'}
def banner():
def banner(name=''):
print ('''
_ _ _ _ ___ _ ___ _ _
| | | |<_>| __><_> ___ | . \ _ _ ._ _ _ ___ | |__<_>._ _
| | | || || _> | ||___|| _/| | || ' ' || . \| / /| || ' |
|__/_/ |_||_| |_| |_| `___||_|_|_|| _/|_\_\|_||_|_|
|_| ''')
|_|
codename: {}'''.format(name))
def setcolor(text,color='',underline=False):
strcolored = {
'blue':'{}{}{}{}'.format(colors['BOLD'],colors['BLUE'],text,colors['ENDC']),
'red': '{}{}{}{}'.format(colors['BOLD'], colors['RED'], text, colors['ENDC']),
'ciano': '{}{}{}{}'.format(colors['BOLD'], colors['CIANO'], text, colors['ENDC']),
'green': '{}{}{}{}'.format(colors['BOLD'], colors['GREEN'], text, colors['ENDC']),
'yellow': '{}{}{}{}'.format(colors['BOLD'], colors['YELLOW'], text, colors['ENDC']),
'grey': '{}{}{}{}'.format(colors['BOLD'], colors['GREY'], text, colors['ENDC']),

View File

@ -1,6 +1,6 @@
from core.common.terminal import ModuleUI
from core.config.globalimport import *
from core.utility.printer import display_messages
from core.utility.printer import display_messages,setcolor
from random import randrange
import time,signal,sys
from multiprocessing import Process
@ -27,9 +27,7 @@ class ModPump(ModuleUI):
self.root = root
self.name_module = self.name
self.whitelist = ['00:00:00:00:00:00','ff:ff:ff:ff:ff:ff' ]
self.set_prompt_modules()
self.aps = {}
self.A = []
self.clients = {}
self.table_headers_wifi = ["CH", "SSID" ,"BSSID", "RSSI","Privacy", ]
self.table_headers_STA = ["BSSID", "STATION" ,"PWR","Frames", 'Probe']
@ -37,8 +35,9 @@ class ModPump(ModuleUI):
super(ModPump, self).__init__(parse_args=self.parse_args, root=self.root )
def do_run(self, args):
print(display_messages('setting interface: {} monitor momde'.format(self.options.get("interface")), info=True))
self.set_monitor_mode()
print(display_messages('setting interface: {} monitor momde'.format(
setcolor(self.options.get("interface"),color='green')), info=True))
self.set_monitor_mode('monitor')
print(display_messages('starting Channel Hopping ', info=True))
self.p = Process(target = self.channel_hopper, args=(self.options.get("interface"),))
self.p.daemon = True
@ -47,6 +46,7 @@ class ModPump(ModuleUI):
sniff(iface=self.options.get("interface"), prn=self.sniffAp,
timeout= None if int(self.options.get("timeout")) == 0 else int(self.options.get("timeout")))
self.p.terminate()
self.set_monitor_mode()
def channel_hopper(self, interface):
while True:
@ -186,10 +186,10 @@ class ModPump(ModuleUI):
self.showDataOutputScan()
def set_monitor_mode(self):
def set_monitor_mode(self, mode='manager'):
if not self.options.get("interface") in Linux.get_interfaces().get("all"):
print(display_messages("the interface not found!", error=True))
sys.exit(0)
sys.exit(1)
os.system("ifconfig {} down".format(self.options.get("interface")))
os.system("iwconfig {} mode monitor".format(self.options.get("interface")))
os.system("iwconfig {} mode {}".format(self.options.get("interface"), mode))
os.system("ifconfig {} up".format(self.options.get("interface")))

View File

@ -1,4 +1,5 @@
use modules.wifi.wifiscan
set interface wlxc83a35cef744
#set timeout 0 for scan loop infinite
set timeout 20
set timeout 0
run

View File

@ -14,7 +14,7 @@ import core.utility.constants as C
_author = ('{}'.format(setcolor('@mh4x0f',color='yellow')))
_version = setcolor('0.1',color='yellow')
__codename__ = setcolor('sab1no',color='red')
banner()
banner(__codename__)
if __name__ == '__main__':
app = QtCore.QCoreApplication(sys.argv)
@ -27,9 +27,7 @@ if __name__ == '__main__':
parser.add_argument('-p', '--pulp', dest='pulp',help='interactive sessions can be scripted with .pulp file',default='')
parser.add_argument('-x', '--xpulp', dest='xpulp',help='interactive sessions can be string with ";" as the separator',default='')
parser.add_argument('-v','--version', action='version', dest='version',version='%(prog)s v{}'.format(_version))
print('Author: {} P0cL4bs Team'.format(_author))
print('Version: {} dev'.format(_version))
print('Codename: {}'.format(__codename__))
print('Author: {} P0cL4bs Team | {} dev'.format(_author, _version))
prompt = PumpkinShell(parser.parse_args())
prompt.cmdloop('Starting prompt...')
sys.exit(app.exec_())