From: dn337t@gmail.com Date: Wed, 20 Jun 2012 20:31:49 +0000 (+0000) Subject: simplified findbits.binstring() X-Git-Tag: v1.0.0~196 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/df1e29bb402ca6dfa8810c8a8cd1b90cac60ce36?ds=sidebyside simplified findbits.binstring() --- diff --git a/tools/findbits.py b/tools/findbits.py index 6562f776..442d2810 100755 --- a/tools/findbits.py +++ b/tools/findbits.py @@ -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):