示例#1
0
文件: packeting.py 项目: techhat/raet
 def unpackFlags(self, flags):
     '''
     Unpacks all the flag fields from a single two char hex string
     '''
     values = unpackByte(fmt='11111111', byte=int(flags, 16), boolean=True)
     for i, field in enumerate(raeting.PACKET_FLAG_FIELDS):
         if field in self.packet.data:
             self.packet.data[field] = values[i]
示例#2
0
 def unpackFlags(self, flags):
     '''
     Unpacks all the flag fields from a single two char hex string
     '''
     values = unpackByte(fmt='11111111', byte=int(flags, 16), boolean=True)
     for i, field in enumerate(raeting.PACKET_FLAG_FIELDS):
         if field in self.packet.data:
             self.packet.data[field] = values[i]