atlas0fd00m / rfcat

RfCat - swiss-army knife of ISM band radio
Other
554 stars 116 forks source link

Pyhon 3 bytes vs str bug in bits.py #115

Closed theepicsnail closed 2 years ago

theepicsnail commented 3 years ago

https://github.com/atlas0fd00m/rfcat/blob/e0583f879236282b6b1f508a597b1dc20c6194c0/rflib/bits.py#L164 and https://github.com/atlas0fd00m/rfcat/blob/e0583f879236282b6b1f508a597b1dc20c6194c0/rflib/bits.py#L166

/usr/local/lib/python3.8/dist-packages/rfcat-1.9.5-py3.8.egg/rflib/bits.py in findSyncWord(byts, sensitivity, minpreamble)
    162         while True:         # keep searching through string until we don't find any more preamble bits to pick on
    163             sbyts = byts
--> 164             pidx = byts.find("\xaa"*minpreamble)
    165             if pidx == -1:
    166                 pidx = byts.find("\x55"*minpreamble)

TypeError: argument should be integer or bytes-like object, not 'str'
atlas0fd00m commented 2 years ago

wow, rfbits has really suffered bitrot with py3 transition. thanks for bringing this up. i'm afraid i'm a bit behind on looking at issues, and this has been going on for a long time.

atlas0fd00m commented 2 years ago

PR's are always welcome :)

atlas0fd00m commented 2 years ago

check out the latest in master.