Пример #1
0
 def __init__(self, config):
     self.cmds = dict()
     self.cmds["exit"] = self.exit_cli
     self.cmds["list"] = self.list_clients
     self.cmds["interact"] = self.interact
     self.cmds["show"] = self.view_event
     self.cmds["help"] = self.show_help
     self.cmds["kill"] = self.kill_shell
     self.cmds["purge"] = self.flushdb
     self.cmds["os"] = self.os_shell
     self.shell_cmds = dict()
     self.shell_cmds["help"] = self.show_help_shell
     self.shell_cmds["fetch"] = self.fetch
     self.shell_cmds["read"] = self.read_file
     self.shell_cmds["upload"] = self.upload_file
     self.shell_cmds["delay"] = self.update_delay
     self.shell_cmds["exec"] = self.exec_code
     self.shell_cmds["ps"] = self.ps
     self.shell_cmds["inject"] = self.inject
     self.shell_cmds["alias"] = self.set_alias
     self.shell_cmds["background"] = None
     self.shell_cmds["keylogger"] = self.keylogger
     self.shell_cmds["exit"] = None
     self.config = config
     self.db = self.config.get("redis")
     self._prompt = "Main"
     self.guid = ""
     self.alias = Alias()
     self.completer = Completer(self.cmds)
     readline.parse_and_bind("tab:complete")
     readline.set_completer(self.completer.complete)
     start_cmd_sync(config)
Пример #2
0
 def __init__(self, config):
     self.cmds = {}
     self.cmds['exit'] = self.exit_cli
     self.cmds['list'] = self.list_clients
     self.cmds['interact'] = self.interact
     self.cmds['show'] = self.view_event
     self.cmds['help'] = self.show_help
     self.cmds['kill'] = self.kill_shell
     self.cmds['purge'] = self.flushdb
     self.cmds['os'] = self.os_shell
     self.shell_cmds = {}
     self.shell_cmds['help'] = self.show_help_shell
     self.shell_cmds['fetch'] = self.fetch
     self.shell_cmds['read'] = self.read_file
     self.shell_cmds['upload'] = self.upload_file
     self.shell_cmds['delay'] = self.update_delay
     self.shell_cmds['exec'] = self.exec_code
     self.shell_cmds['ps'] = self.ps
     self.shell_cmds['inject'] = self.inject
     self.shell_cmds['alias'] = self.set_alias
     self.shell_cmds['background'] = None
     self.shell_cmds['keylogger'] = self.keylogger
     self.shell_cmds['exit'] = None
     self.config = config
     self.db = self.config.get('redis')
     self._prompt = 'Main'
     self.guid = ''
     self.alias = Alias()
     self.completer = Completer(self.cmds)
     readline.parse_and_bind('tab:complete')
     readline.set_completer(self.completer.complete)
     start_cmd_sync(config)
Пример #3
0
    def __init__(self, config):
        self.cmds = dict()
        self.cmds["exit"] = self.exit_cli
        self.cmds["list"] = self.list_clients
        self.cmds["interact"] = self.interact
        self.cmds["show"] = self.view_event
        self.cmds["help"] = self.show_help
        self.cmds["kill"] = self.kill_shell
        self.cmds["purge"] = self.flushdb
        self.cmds["os"] = self.os_shell
        self.config = config
        self.db = self.config.get("redis")
        self._prompt = "Main"
        self.guid = ""
        self.alias = Alias()
        self.shell = Shell(self.db, True)
        self.completer = Completer(self.cmds)

        readline.parse_and_bind("tab:complete")
        readline.set_completer(self.completer.complete)
        start_cmd_sync(config)