def send_command_daemon(self): try: self.luciferManager.gui.statusFrame.status.set("Starting Command") self.get_shell() self.shell.shell_in = self.console_in.get() self.command_index = None self.command_history.append(self.shell.shell_in) self.luciferManager.gui.statusFrame.status.set( f"Running Command: {self.shell.shell_in}") print(self.shell.shell_in) self.console_in.set("") self.shell.parseShellIn() self.get_shell() print( f"{self.shell.program_name}|" + f"{self.shell.module if '.py' not in self.shell.module else self.shell.module.replace('.py', '')}" + f"|{self.shell.id}> ", end="") if self.luciferManager.log_file is not None: if self.luciferManager.log_amount == 1: self.luciferManager.log_command(self.shell.shell_in) except Exception as e: checkErrors(e) self.luciferManager.gui.statusFrame.status.set("Idle") self.luciferManager.gui.varView.display_vars() self.luciferManager.gui_thread_free = True
def open_main_shell(openid, self): self.luciferManager.gui.console.opened_order.append(openid) self.luciferManager.current_shell_id = openid try: self.luciferManager.main_shell.spawn() except Exception as e: checkErrors(e)
def open_alt_shell(index, openid, self): self.luciferManager.current_shell_id = openid self.luciferManager.gui.console.opened_order.append(openid) try: self.luciferManager.alternative_shells[index].spawn() except Exception as e: checkErrors(e)
def set_vars(self, *args, **kwargs): try: if self.module_obj is not None: self.vars.update(self.module_obj.set_vars()) return print("Please Select A Module First!") except Exception as e: checkErrors(e)
def describe_module(self, *args, **kwargs): try: if self.module_obj is not None: print(self.module_obj.get_description()) return print("Please Select A Module First!") except Exception as e: checkErrors(e)
def run_module(self, *args, **kwargs): try: if self.module_obj is not None: self.module_obj.run() else: print("Please Select A Module First!") except Exception as e: checkErrors(e, ModuleError=True)