mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-28 19:31:19 +08:00
simplified findbits.binstring()
This commit is contained in:
parent
9f975d42e8
commit
df1e29bb40
1 changed files with 1 additions and 5 deletions
|
@ -39,11 +39,7 @@ def search(target,data):
|
|||
|
||||
# convert integer to binary string
|
||||
def binstring(number):
|
||||
out= ''
|
||||
while number > 0:
|
||||
out += chr(0x30 + (number & 0x01))
|
||||
number= number >> 1
|
||||
return stringreverse(out)
|
||||
return bin(number)[2:] if number > 0 else ''
|
||||
|
||||
# reverse string order
|
||||
def stringreverse(data):
|
||||
|
|
Loading…
Reference in a new issue