Created
July 11, 2022 07:39
-
-
Save soffchen/64ac9ce1d2c0942156c5c5a6d97dcdde to your computer and use it in GitHub Desktop.
Write each block from eml file for Proxmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 新卡的默认密码,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