def __init__(self, teamserver): self.teamserver = teamserver self.stagers = [] self.selected = None ipc_server.attach(events.GET_STAGERS, self.get_stagers) super().__init__(type="stager", paths=["core/teamserver/stagers/"])
def __init__(self, teamserver): self.teamserver = teamserver self.listeners = [] self.selected = None ipc_server.attach(events.GET_LISTENERS, self._get_listeners) super().__init__(type="listener", paths=["core/teamserver/listeners/"])
def __init__(self, teamserver): self.teamserver = teamserver self.selected = None self.sessions = set() ipc_server.attach(events.KEX, self.kex) ipc_server.attach(events.ENCRYPT_STAGE, self.gen_encrypted_stage) ipc_server.attach(events.SESSION_STAGED, self.notify_session_staged) ipc_server.attach(events.SESSION_CHECKIN, self.session_checked_in) ipc_server.attach(events.NEW_JOB, self.add_job) ipc_server.attach(events.JOB_RESULT, self.job_result)
def register_subscriptions(cls): for methodname in dir(cls): method = getattr(cls, methodname) if hasattr(method, '_event_subscription'): ipc_server.attach(method._event_subscription, method) return cls
def __init__(self, teamserver): self.teamserver = teamserver self.selected = None self.sessions = set() ipc_server.attach(events.KEX, self.kex) ipc_server.attach(events.ENCRYPT_STAGE, self.gen_encrypted_stage) ipc_server.attach(events.SESSION_STAGED, self.notify_session_staged) ipc_server.attach(events.SESSION_REGISTER, self._register) ipc_server.attach(events.SESSION_CHECKIN, self.session_checked_in) ipc_server.attach(events.NEW_JOB, self.add_job) ipc_server.attach(events.JOB_RESULT, self.job_result) with STDatabase() as db: for registered_session in db.get_sessions(): _, guid, psk = registered_session self._register(guid, psk)