mprota / proxmark3

Automatically exported from code.google.com/p/proxmark3
GNU General Public License v2.0
0 stars 0 forks source link

hf mf chk bugfix and enhancements #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The command
hf mf chk *1 ? t keys.dic
currently always returns an "File reading error" on the last line. This patch 
fixes this issue.

I also made the default keys of the chk function more generic, so you do not 
need to adjust loop counters. To test this enhancement add or remove Keys to 
the default key array and run
hf mf chk *1 ? t

Bugfix:

Output before patch with dictionary:

proxmark3> hf mf chk *1 ? t keys.dic
chk custom key[0] a0a1a2a3a4a5          
chk custom key[1] b0b1b2b3b4b5          
chk custom key[2] 2a6d9205e7ca          
chk custom key[3] b8a1f613cf3d          
chk custom key[4] bedb604cc9d1          
chk custom key[5] b4c132439eef          
File reading error.

Output after patch with dictionary:

proxmark3> hf mf chk *1 ? t keys.dic
chk custom key[0] a0a1a2a3a4a5          
chk custom key[1] b0b1b2b3b4b5          
chk custom key[2] 2a6d9205e7ca          
chk custom key[3] b8a1f613cf3d          
chk custom key[4] bedb604cc9d1          
chk custom key[5] b4c132439eef          
--SectorsCnt:0 block no:0x03 key type:A key count:6           
Found valid key:[a0a1a2a3a4a5]          
--SectorsCnt:1 block no:0x07 key type:A key count:6           
--SectorsCnt:2 block no:0x0b key type:A key count:6           
--SectorsCnt:3 block no:0x0f key type:A key count:6           
--SectorsCnt:4 block no:0x13 key type:A key count:6           
--SectorsCnt:5 block no:0x17 key type:A key count:6           
--SectorsCnt:6 block no:0x1b key type:A key count:6           
--SectorsCnt:7 block no:0x1f key type:A key count:6           
--SectorsCnt:8 block no:0x23 key type:A key count:6           
--SectorsCnt:9 block no:0x27 key type:A key count:6           
--SectorsCnt:10 block no:0x2b key type:A key count:6           
--SectorsCnt:11 block no:0x2f key type:A key count:6           
--SectorsCnt:12 block no:0x33 key type:A key count:6           
--SectorsCnt:13 block no:0x37 key type:A key count:6           
--SectorsCnt:14 block no:0x3b key type:A key count:6           
--SectorsCnt:15 block no:0x3f key type:A key count:6           
--SectorsCnt:0 block no:0x03 key type:B key count:6           
Found valid key:[b4c132439eef]          
--SectorsCnt:1 block no:0x07 key type:B key count:6           
--SectorsCnt:2 block no:0x0b key type:B key count:6           
--SectorsCnt:3 block no:0x0f key type:B key count:6           
--SectorsCnt:4 block no:0x13 key type:B key count:6           
--SectorsCnt:5 block no:0x17 key type:B key count:6           
--SectorsCnt:6 block no:0x1b key type:B key count:6           
--SectorsCnt:7 block no:0x1f key type:B key count:6           
--SectorsCnt:8 block no:0x23 key type:B key count:6           
--SectorsCnt:9 block no:0x27 key type:B key count:6           
--SectorsCnt:10 block no:0x2b key type:B key count:6           
--SectorsCnt:11 block no:0x2f key type:B key count:6           
--SectorsCnt:12 block no:0x33 key type:B key count:6           
--SectorsCnt:13 block no:0x37 key type:B key count:6           
--SectorsCnt:14 block no:0x3b key type:B key count:6           
--SectorsCnt:15 block no:0x3f key type:B key count:6        

Contents of keys.dic:

firefart@Laptop:~$ cat pm3/client/keys.dic 
a0a1a2a3a4a5
b0b1b2b3b4b5
2a6d9205e7ca
b8a1f613cf3d
bedb604cc9d1
b4c132439eef

Original issue reported on code.google.com by FireFart on 21 Feb 2014 at 9:22

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Patch committed in r848, 

Original comment by martin.holst on 27 Feb 2014 at 6:12