Skip to content

Instantly share code, notes, and snippets.

@ronfe
Created October 8, 2018 03:45
Show Gist options
  • Save ronfe/073b9a29dbd6e25f54c493614cd21c55 to your computer and use it in GitHub Desktop.
Save ronfe/073b9a29dbd6e25f54c493614cd21c55 to your computer and use it in GitHub Desktop.
import pexpect
import datetime
child = pexpect.spawn('proxmark3 /dev/cu.usbmodem1411')
child.expect('proxmark3> ')
child.sendline('hf mf rdbl 5 a 000000555555')
child.expect('proxmark3> ')
x = str(child.before)
x = ''.join(x.strip().split()[-17:-1])
if x[:4] == 'data':
x = x[5:]
t = datetime.datetime.now()
s = t.strftime('%M%H%d%m%y')
y = x[:15] + s + x[25:]
child.sendline('hf mf wrbl 5 a 000000555555 {}'.format(y))
child.expect('proxmark3> ')
child.sendline('hf mf rdbl 5 a 000000555555')
child.expect('proxmark3> ')
nx = str(child.before)
nx = ''.join(nx.strip().split()[-17:-1])
nx = nx[6:]
print(nx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment