mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-15 06:09:13 +08:00
style
This commit is contained in:
parent
855bccf5b9
commit
27fee07090
3 changed files with 9 additions and 3 deletions
|
@ -31,7 +31,7 @@ def invert(data):
|
|||
def search(target,data):
|
||||
location = data.find(target)
|
||||
if location >= 0:
|
||||
print('*** Match at bit {:d}: {}<{}>{}'.format(location, data[:location],target,data[location+len(target):]))
|
||||
print('*** Match at bit {:d}: {}<{}>{}'.format(location, data[:location], target,data[location + len(target):]))
|
||||
else:
|
||||
print('Not found')
|
||||
|
||||
|
|
|
@ -78,20 +78,27 @@ p = pm3.pm3()
|
|||
p.console("hw status")
|
||||
|
||||
rex = re.compile("...\\s([0-9a-fA-F]{2})\\s/\\s([0-9a-fA-F]{4})")
|
||||
|
||||
for line in p.grabbed_output.split('\n'):
|
||||
# [#] JEDEC Mfr ID / Dev ID... 85 / 6015
|
||||
if " JEDEC " not in line:
|
||||
continue
|
||||
|
||||
match = re.findall(rex, line)
|
||||
mid = int(match[0][0], 16)
|
||||
did = int(match[0][1], 16)
|
||||
did_h = did >> 8
|
||||
did_l = did & 0xff
|
||||
t = None
|
||||
|
||||
if mid in spi:
|
||||
|
||||
mfr = spi[mid]['manufacturer']
|
||||
|
||||
if did_h in spi[mid]:
|
||||
|
||||
if did_l in spi[mid][did_h]:
|
||||
|
||||
t = spi[mid][did_h][did_l]
|
||||
print("\n Manufacturer... " + color(f"{mfr}", fg="green") +
|
||||
"\n Device......... " + color(f"{t['part']}", fg="green") +
|
||||
|
|
|
@ -39,8 +39,7 @@ v = 0
|
|||
out_freq = min_freq
|
||||
|
||||
# Spawn the Proxmark3 client
|
||||
pm3_proc = Popen([pm3_client, pm3_reader_dev_file, "-c", pm3_tune_cmd],
|
||||
bufsize=0, env={}, stdin=DEVNULL, stdout=PIPE, stderr=DEVNULL)
|
||||
pm3_proc = Popen([pm3_client, pm3_reader_dev_file, "-c", pm3_tune_cmd], bufsize=0, env={}, stdin=DEVNULL, stdout=PIPE, stderr=DEVNULL)
|
||||
mv_recbuf = ""
|
||||
|
||||
# Read voltages from the Proxmark3, generate the sine wave, output to soundcard
|
||||
|
|
Loading…
Reference in a new issue