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