Ejemplo n.º 1
0
    def process_message(self, msg):
        if msg.startswith('|request|'):
            msg = '|request|...'

        self.logfile.write(msg + '\n')
        print received(msg)

        if msg.startswith('|challstr|'):
            self.handle_challstr(msg.split('|')[1:])
Ejemplo n.º 2
0
    def received_message(self, msg_block):
        msg_block = str(msg_block)
        if '|inactive|' in msg_block:
            return
        msg_block = msg_block.splitlines()

        for msg in msg_block:
            self.process_message(msg)

        self.logfile.write('-' * 60 + '\n')
        print received('-' * 60)