X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/c3631ff82e2c1f44a1706e5b9cfb483d1bdb7238..b13fa4448f517b46e917c5145050f434d6df24d5:/tools/findbits.py diff --git a/tools/findbits.py b/tools/findbits.py index 4e2f18dc..1860964b 100755 --- a/tools/findbits.py +++ b/tools/findbits.py @@ -22,7 +22,6 @@ import sys import os -import string # invert binary string def invert(data): @@ -30,7 +29,7 @@ def invert(data): # do the actual search def search(target,data): - location= string.find(data,target) + location = data.find(target) if location >= 0: print '*** Match at bit %d:' % location, print '%s<%s>%s' % (data[:location],target,data[location+len(target):]) @@ -46,7 +45,7 @@ def stringreverse(data): return data[::-1] # match forward, backward and inverted -def domatch(number,binary): +def domatch(binary,number): reversed= stringreverse(number) inverted= invert(binary)