def erase_bots(): global BOT_COUNT global botNet botNet = {} BOT_COUNT = 0 center_frame.main_tx_box_print("[+] Zero Bots on the Army")
def show_shells(): bots = get_bots() if len(bots) == 0: add_bot() bot = botNet['0'] if bot != None: shells = bot.msfconsole.get_sessions() txt = '' count = 0 table = [] for i in shells.keys(): shell = shells[i] table.append([str(i), shell["username"], str(shell["session_port"]),shell["session_host"],shell["via_exploit"] ]) count += 1 headers = tabulate(table, headers=["SHELL","USER", "PORT", "SESSIONS", "EXPLOIT"], tablefmt="fancy_grid", stralign="center", numalign="center") center_frame.main_tx_box_print(headers) SHELLS = count if len(shells.keys()) == 0: center_frame.main_tx_box_print("[-] No sessions opened yet.")
def show_bot(id): bot = get_bot(id) if bot != None: txt = "[+] Bot:" + bot.id + "\n" txt +=" [*]Status: " + bot.status + "\n" txt += " [+] Host assigned: " if bot.targetHost != {}: txt += bot.targetHost['ip'] + "\n" txt += " [+] Ports: " + str(bot.targetHost['ports']) txt += "\n [+] Records\n" if len(bot.record) > 0: for record in bot.record: txt += " [*]"+ record + "\n" # headers = tabulate(table, # headers=["BOT UNIT","ID","STATUS", "HOST ASSIGNED"], # tablefmt="fancy_grid", # stralign="center", # numalign="center") center_frame.main_tx_box_print(txt) else: txt = "[!]No Bot with ID: " + id center_frame.main_tx_box_print(txt)
def show_bots(): bots = get_bots() table = [] for key in bots.keys(): bot = bots[key] row = [str(bot.id), bot.status] if 'ip' in bot.targetHost: line = "("+str(bot.targetHost['id'])+") "+bot.targetHost['ip'] row.append(line) else: row.append("") row.append(SCANNED[bot.busy]) if bot.ssh == None: row.append("NO") else: row.append("YES") table.append(row) headers = tabulate(table, headers=["BOT UNIT ID","STATUS", "TARGET HOST", "BUSY", "SSH"], tablefmt="fancy_grid", stralign="center", numalign="center") center_frame.main_tx_box_print(headers) if len(bots.keys()) == 0: center_frame.main_tx_box_print("[-] No bots in the arsenal yet.")
def show_bot(id): bot = get_bot(id) if bot != None: txt = "[+] Bot:" + bot.id + "\n" txt += " [*]Status: " + bot.status + "\n" txt += " [+] Host assigned: " if bot.targetHost != {}: txt += bot.targetHost['ip'] + "\n" txt += " [+] Ports: " + str(bot.targetHost['ports']) txt += "\n [+] Records\n" if len(bot.record) > 0: for record in bot.record: txt += " [*]" + record + "\n" # headers = tabulate(table, # headers=["BOT UNIT","ID","STATUS", "HOST ASSIGNED"], # tablefmt="fancy_grid", # stralign="center", # numalign="center") center_frame.main_tx_box_print(txt) else: txt = "[!]No Bot with ID: " + id center_frame.main_tx_box_print(txt)
def show_shells(): bots = get_bots() if len(bots) == 0: add_bot() bot = botNet['0'] if bot != None: shells = bot.msfconsole.get_sessions() txt = '' count = 0 table = [] for i in shells.keys(): shell = shells[i] table.append([ str(i), shell["username"], str(shell["session_port"]), shell["session_host"], shell["via_exploit"] ]) count += 1 headers = tabulate( table, headers=["SHELL", "USER", "PORT", "SESSIONS", "EXPLOIT"], tablefmt="fancy_grid", stralign="center", numalign="center") center_frame.main_tx_box_print(headers) SHELLS = count if len(shells.keys()) == 0: center_frame.main_tx_box_print("[-] No sessions opened yet.")
def show_bots(): bots = get_bots() table = [] for key in bots.keys(): bot = bots[key] row = [str(bot.id), bot.status] if 'ip' in bot.targetHost: line = "(" + str( bot.targetHost['id']) + ") " + bot.targetHost['ip'] row.append(line) else: row.append("") row.append(SCANNED[bot.busy]) if bot.ssh == None: row.append("NO") else: row.append("YES") table.append(row) headers = tabulate( table, headers=["BOT UNIT ID", "STATUS", "TARGET HOST", "BUSY", "SSH"], tablefmt="fancy_grid", stralign="center", numalign="center") center_frame.main_tx_box_print(headers) if len(bots.keys()) == 0: center_frame.main_tx_box_print("[-] No bots in the arsenal yet.")
def show_full_mode_bot_record(bot_id): bot = get_bot(bot_id) txt = "[+] Bot "+str(bot_id)+ " Records:\n" for line in bot.full_mode_record: txt += line + "\n" center_frame.main_tx_box_print(txt)
def show_full_mode_bot_record(bot_id): bot = get_bot(bot_id) txt = "[+] Bot " + str(bot_id) + " Records:\n" for line in bot.full_mode_record: txt += line + "\n" center_frame.main_tx_box_print(txt)