Skip to content

Instantly share code, notes, and snippets.

@soffchen
Created July 11, 2022 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soffchen/64ac9ce1d2c0942156c5c5a6d97dcdde to your computer and use it in GitHub Desktop.
Save soffchen/64ac9ce1d2c0942156c5c5a6d97dcdde to your computer and use it in GitHub Desktop.
Write each block from eml file for Proxmark
# 新卡的默认密码,6字节十六进制表示
DEFAULT_PASSWORD = "FFFFFFFFFFFF"
# hf-mf-00000000-dump.eml是卡内容的16进制ASCII表示,其中00000000用卡号替换
with open('hf-mf-4C00E3AB-dump.eml', 'r') as f:
card_content = f.read()
card_arr = card_content.split()
# 设置UID卡的卡号
print(f"hf mf csetblk --blk 0 -d {card_arr[0]}")
print()
# 对于每一个数据块,生成相应的写入指令
for i in range(16):
pass_blk = DEFAULT_PASSWORD
for j in range(4):
cur_blk = i * 4 + j
print(f"hf mf wrbl --blk {cur_blk} -d {card_arr[cur_blk]} -k {pass_blk}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment