def parse_packets(self): print('parsing packets of %s' % self.name) self.__decrypt() packets, leftovers = parse_packets(self.data) self.data = leftovers print('leftovers:', leftovers) for packet in packets: self.handle_packets(packet[0],packet[1])
def parse_packets(self): print('parsing packets of %s' % self.name) self.__decrypt() packets, leftovers = parse_packets(self.data) self.data = leftovers libs.events.broadcast('logthis', 'leftovers: %s' % leftovers) for packet in packets: self.handle_packets(packet[0],packet[1])