def run(self): userDetails = get_users.Module(self.luciferManager).run() local, domain = userDetails[0], userDetails[1] local_users = [] domain_users = [] for x in local: for u in x: local_users.append(u) for x in domain: for u in x: domain_users.append(u) local_users = self.get_user_details(local_users) domain_users = self.get_user_details(domain_users) for local in local_users: local = dictionary_max_transformation(local, max_chars=30) print( generate_table(list(zip(local.keys(), local.values())), headings=["Key", "Value"], title=f"Local - {local['User name']}")) for domain in domain_users: domain = dictionary_max_transformation(domain, max_chars=30) print( generate_table(list(zip(domain.keys(), domain.values())), headings=["Key", "Value"], title="Domain"))
def listServers(self, *args, **kwargs): ids = [str(x) for x in self.luciferManager.servers.serverObjects.keys()] addresses = [str(x.socketObject.getsockname()) for x in self.luciferManager.servers.serverObjects.values()] array = [[_id, addr] for _id, addr in zip(ids, addresses)] print(generate_table(array, "Servers", headings=["ID", "Address"]))
def run(self): command = ["net", "user"] OS.check_os("windows") output_file, split_size, write_mode, args = self.get_vars() out = self.get_command_out(args, command) write_file_exists(output_file, out, write_mode) user_stripped_list = self.sort_to_lists(out, split_size) if self.isShellRun: print(generate_table(user_stripped_list[0], title="Local Users")) if user_stripped_list[1]: print(generate_table(user_stripped_list[1], title="Remote Users")) else: print(colored("No remote users", "red")) return user_stripped_list
def run(self): OS.check_os("windows") keys = self.getAllKeys() if self.isShellRun: print( generate_table([['XP', keys['XP']], ['IE', keys['IE']], ['WPA', keys['WPA']]], title="Product Keys", headings=['Type', 'Key'])) return keys return keys
def run(self): if self.isShellRun: OSInfo = OS.get_OS()[1] table_show = OSInfo.copy() print(table_show) del table_show["uname"] print(generate_table(list(zip(table_show.keys(), table_show.values())), title="OS Info", headings=["Key", "Value"])) print(f"Uname: {OSInfo.get('uname')}") else: return OS.get_OS()[1]
def run(self): if "nt" not in os.name.lower(): raise IncompatibleSystemError("Not Windows...") keys = self.getAllKeys() if self.isShellRun: print( generate_table([['XP', keys['XP']], ['IE', keys['IE']], ['WPA', keys['WPA']]], title="Product Keys", headings=['Type', 'Key'])) return return keys
def run(self): command = ["ipconfig"] OS.check_os("windows") output_file, write_mode, args = self.get_vars() out = self.get_command_out(args, command) write_file_exists(output_file, out, write_mode) interfaces = self.output_to_interfaces(out) interface_dictionaries = self.interfaces_to_dict(interfaces) if self.isShellRun: for interface in interface_dictionaries: name = interface["name"] del interface["name"] print(generate_table(list(zip(interface.keys(), interface.values())), title=name, headings=["Key", "Value"])) interface["name"] = name return interface_dictionaries