예제 #1
0
    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/"])
예제 #2
0
    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/"])
예제 #3
0
    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)
예제 #4
0
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
예제 #5
0
    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)