How to use the aioblescan.aioblescan.NBytes_List function in aioblescan

To help you get started, we’ve selected a few aioblescan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
myinfo = None

            if code.val == 0x01:
                #Flag
                myinfo=BitFieldByte("flags",0,["Undef","Undef","Simul LE - BR/EDR (Host)","Simul LE - BR/EDR (Control.)","BR/EDR Not Supported",
                                           "LE General Disc.","LE Limited Disc."])
            elif code.val == 0x02:
                myinfo=NBytes_List("Incomplete uuids",2)
            elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
            elif code.val == 0x1f:
                myinfo=NBytes_List("Service Solicitation uuid",4)
            elif code.val == 0x20:
                myinfo=Adv_Data("Advertised Data",4)
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
            elif code.val == 0x1f:
                myinfo=NBytes_List("Service Solicitation uuid",4)
            elif code.val == 0x20:
                myinfo=Adv_Data("Advertised Data",4)
            elif code.val == 0x21:
                myinfo=Adv_Data("Advertised Data",16)
            elif code.val == 0xff:
                myinfo=ManufacturerSpecificData()
            else:
                myinfo=Itself("Payload for %s"%code.strval)

            xx=myinfo.decode(data[:length.val-len(code)])
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
if code.val == 0x01:
                #Flag
                myinfo=BitFieldByte("flags",0,["Undef","Undef","Simul LE - BR/EDR (Host)","Simul LE - BR/EDR (Control.)","BR/EDR Not Supported",
                                           "LE General Disc.","LE Limited Disc."])
            elif code.val == 0x02:
                myinfo=NBytes_List("Incomplete uuids",2)
            elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
            elif code.val == 0x1f:
                myinfo=NBytes_List("Service Solicitation uuid",4)
            elif code.val == 0x20:
                myinfo=Adv_Data("Advertised Data",4)
            elif code.val == 0x21:
                myinfo=Adv_Data("Advertised Data",16)
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
while datalength > 0:
            length=UIntByte("sublen")
            data=length.decode(data)
            code=EIR_Hdr()
            data=code.decode(data)

            myinfo = None

            if code.val == 0x01:
                #Flag
                myinfo=BitFieldByte("flags",0,["Undef","Undef","Simul LE - BR/EDR (Host)","Simul LE - BR/EDR (Control.)","BR/EDR Not Supported",
                                           "LE General Disc.","LE Limited Disc."])
            elif code.val == 0x02:
                myinfo=NBytes_List("Incomplete uuids",2)
            elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
data=length.decode(data)
            code=EIR_Hdr()
            data=code.decode(data)

            myinfo = None

            if code.val == 0x01:
                #Flag
                myinfo=BitFieldByte("flags",0,["Undef","Undef","Simul LE - BR/EDR (Host)","Simul LE - BR/EDR (Control.)","BR/EDR Not Supported",
                                           "LE General Disc.","LE Limited Disc."])
            elif code.val == 0x02:
                myinfo=NBytes_List("Incomplete uuids",2)
            elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
data=code.decode(data)

            myinfo = None

            if code.val == 0x01:
                #Flag
                myinfo=BitFieldByte("flags",0,["Undef","Undef","Simul LE - BR/EDR (Host)","Simul LE - BR/EDR (Control.)","BR/EDR Not Supported",
                                           "LE General Disc.","LE Limited Disc."])
            elif code.val == 0x02:
                myinfo=NBytes_List("Incomplete uuids",2)
            elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
            elif code.val == 0x1f:
                myinfo=NBytes_List("Service Solicitation uuid",4)
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
datalength = self.payload[-1].val

        while datalength > 0:
            length=UIntByte("sublen")
            data=length.decode(data)
            code=EIR_Hdr()
            data=code.decode(data)

            myinfo = None

            if code.val == 0x01:
                #Flag
                myinfo=BitFieldByte("flags",0,["Undef","Undef","Simul LE - BR/EDR (Host)","Simul LE - BR/EDR (Control.)","BR/EDR Not Supported",
                                           "LE General Disc.","LE Limited Disc."])
            elif code.val == 0x02:
                myinfo=NBytes_List("Incomplete uuids",2)
            elif code.val == 0x03:
                myinfo=NBytes_List("Complete uuids",2)
            elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
            elif code.val == 0x1f:
                myinfo=NBytes_List("Service Solicitation uuid",4)
            elif code.val == 0x20:
                myinfo=Adv_Data("Advertised Data",4)
            elif code.val == 0x21:
                myinfo=Adv_Data("Advertised Data",16)
            elif code.val == 0xff:
                myinfo=ManufacturerSpecificData()
            else:
                myinfo=Itself("Payload for %s"%code.strval)

            xx=myinfo.decode(data[:length.val-len(code)])
            self.payload.append(myinfo)

            datalength -= length.val + len(code)
            data=data[length.val-len(code):]

        if data:
github frawau / aioblescan / aioblescan / aioblescan.py View on Github external
elif code.val == 0x04:
                myinfo=NBytes_List("Incomplete uuids",4)
            elif code.val == 0x05:
                myinfo=NBytes_List("Complete uuids",4)
            elif code.val == 0x06:
                myinfo=NBytes_List("Incomplete uuids",16)
            elif code.val == 0x07:
                myinfo=NBytes_List("Complete uuids",16)
            elif code.val == 0x08:
                myinfo=String("Short Name")
            elif code.val == 0x09:
                myinfo=String("Complete Name")
            elif code.val == 0x14:
                myinfo=NBytes_List("Service Solicitation uuid",2)
            elif code.val == 0x15:
                myinfo=NBytes_List("Service Solicitation uuid",16)
            elif code.val == 0x16:
                myinfo=Adv_Data("Advertised Data",2)
            elif code.val == 0x1f:
                myinfo=NBytes_List("Service Solicitation uuid",4)
            elif code.val == 0x20:
                myinfo=Adv_Data("Advertised Data",4)
            elif code.val == 0x21:
                myinfo=Adv_Data("Advertised Data",16)
            elif code.val == 0xff:
                myinfo=ManufacturerSpecificData()
            else:
                myinfo=Itself("Payload for %s"%code.strval)

            xx=myinfo.decode(data[:length.val-len(code)])
            self.payload.append(myinfo)