Open milcaca opened 7 years ago
Hi Mica,
Which command did you used for socat? Try "socat -,escape=0x0f /dev/chameleon,rawer,crnl" .
Also, see issue #64
I don't know if you can read anything besides ultralight. Maybe you can get some data using the advance commands, but I did not tried (that hard) and never managed to obtain any data.
Hi @milcaca, the firmware does not yet support reading/dumping MF Classic cards, but it has all the functions you would need to build something that would dump a card (when the keys are given).
Did the hint from @Peterthegreat solve your other problem?
I managed to make it working, thank you for the help. I have another question. I uploaded the provided MF classic 4K dump and tried to read it with a reader and that was not possible. Error say connection ended. Any idea of the reason ?
Please provide the log from the emulator. (Using software/chamlog.py)
I'm trying to reupload the dump for verification but it always wails with this error
[upload] 3584 Bytes successfully read from ../Dumps/MFC4k_randomContent_fixedKeys.mfd
Traceback (most recent call last):
File "./chamtool.py", line 205, in <module> main()
File "./chamtool.py", line 186, in main result = cmdFuncs[cmd](chameleon, arg)
File "./chamtool.py", line 21, in cmdSetting result = chameleon.cmdSetting(arg)
File "/root/ChameleonMini/Software/Chameleon/Device.py", line 209, in cmdSetting return self.getSetCmd(self.COMMAND_SETTING, newSetting)
File "/root/ChameleonMini/Software/Chameleon/Device.py", line 165, in getSetCmd return self.writeCmd("{}{}{}".format(cmd, self.SET_CHAR, arg))
File "/root/ChameleonMini/Software/Chameleon/Device.py", line 126, in writeCmd status = self.serial.readline().decode('ascii').rstrip()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 2: ordinal not in range(128)
Ok I finally got the log (previous issue just stop at reboot ...) I get this :
15031 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15032 ms < +1 ms>:CODEC RX (2 bytes) [9320]
15032 ms < +0 ms>:CODEC TX (5 bytes) [7caa732287]
15034 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15034 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15058 ms < +24 ms>:CODEC RX (4 bytes) [500057cd]
15058 ms < +0 ms>:APP HALT (0 bytes) []
15061 ms < +3 ms>:CODEC RX (1 bytes) [52]
15061 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15062 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15062 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15068 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
15068 ms < +0 ms>:APP HALT (0 bytes) []
15071 ms < +3 ms>:CODEC RX (1 bytes) [52]
15071 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15072 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15072 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15077 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15077 ms < +0 ms>:APP HALT (0 bytes) []
15081 ms < +4 ms>:CODEC RX (1 bytes) [52]
15081 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15082 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15082 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15090 ms < +8 ms>:CODEC RX (4 bytes) [60017c6a]
15090 ms < +0 ms>:APP AUTH (2 bytes) [6001]
15091 ms < +1 ms>:CODEC TX (4 bytes) [a7294388]
15093 ms < +2 ms>:CODEC RX (8 bytes) [30cc7d895a5d3fc1]
15093 ms < +0 ms>:APP AUTHING (4 bytes) [43500ee2]
15093 ms < +0 ms>:APP AUTH FAILED (0 bytes) []
15098 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15101 ms < +3 ms>:CODEC RX (1 bytes) [52]
15101 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15103 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15103 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15108 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15108 ms < +0 ms>:APP HALT (0 bytes) []
15111 ms < +3 ms>:CODEC RX (1 bytes) [52]
15111 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15113 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15113 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15118 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15118 ms < +0 ms>:APP HALT (0 bytes) []
15121 ms < +3 ms>:CODEC RX (1 bytes) [52]
15121 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15123 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15123 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15128 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15128 ms < +0 ms>:APP HALT (0 bytes) []
15131 ms < +3 ms>:CODEC RX (1 bytes) [52]
15131 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15133 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15133 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15138 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15138 ms < +0 ms>:APP HALT (0 bytes) []
15141 ms < +3 ms>:CODEC RX (1 bytes) [52]
15141 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15143 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15143 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15148 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15148 ms < +0 ms>:APP HALT (0 bytes) []
15151 ms < +3 ms>:CODEC RX (1 bytes) [52]
15151 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15153 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15153 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15158 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15158 ms < +0 ms>:APP HALT (0 bytes) []
15161 ms < +3 ms>:CODEC RX (1 bytes) [52]
15161 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15163 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15163 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15168 ms < +5 ms>:CODEC RX (4 bytes) [60017c6a]
15168 ms < +0 ms>:APP AUTH (2 bytes) [6001]
15169 ms < +1 ms>:CODEC TX (4 bytes) [3a246a48]
15170 ms < +1 ms>:CODEC RX (8 bytes) [b68769b6b6fc3c58]
15171 ms < +1 ms>:APP AUTHING (4 bytes) [22f37741]
15171 ms < +0 ms>:APP AUTH FAILED (0 bytes) []
15176 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15179 ms < +3 ms>:CODEC RX (1 bytes) [52]
15179 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15181 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15181 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15186 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15186 ms < +0 ms>:APP HALT (0 bytes) []
15189 ms < +3 ms>:CODEC RX (1 bytes) [52]
15189 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15190 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15190 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15195 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15195 ms < +0 ms>:APP HALT (0 bytes) []
15199 ms < +4 ms>:CODEC RX (1 bytes) [52]
15199 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15200 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15200 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15205 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15205 ms < +0 ms>:APP HALT (0 bytes) []
15208 ms < +3 ms>:CODEC RX (1 bytes) [52]
15208 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15210 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15210 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15215 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
15215 ms < +0 ms>:APP HALT (0 bytes) []
15218 ms < +3 ms>:CODEC RX (1 bytes) [52]
15218 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15220 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15220 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15226 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
15226 ms < +0 ms>:APP HALT (0 bytes) []
15229 ms < +3 ms>:CODEC RX (1 bytes) [52]
15229 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15230 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15230 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15236 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
15236 ms < +0 ms>:APP HALT (0 bytes) []
15239 ms < +3 ms>:CODEC RX (1 bytes) [52]
15239 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15241 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15241 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15377 ms < +136 ms>:CODEC RX (4 bytes) [500057cd]
15377 ms < +0 ms>:APP HALT (0 bytes) []
15380 ms < +3 ms>:CODEC RX (1 bytes) [52]
15380 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15382 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15382 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15511 ms < +129 ms>:CODEC RX (4 bytes) [500057cd]
15511 ms < +0 ms>:APP HALT (0 bytes) []
15515 ms < +4 ms>:CODEC RX (1 bytes) [52]
15515 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15516 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15516 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15646 ms < +130 ms>:CODEC RX (4 bytes) [500057cd]
15646 ms < +0 ms>:APP HALT (0 bytes) []
15649 ms < +3 ms>:CODEC RX (1 bytes) [52]
15649 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15651 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15651 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15782 ms < +131 ms>:CODEC RX (4 bytes) [500057cd]
15782 ms < +0 ms>:APP HALT (0 bytes) []
15785 ms < +3 ms>:CODEC RX (1 bytes) [52]
15785 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15786 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15786 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
15917 ms < +131 ms>:CODEC RX (4 bytes) [500057cd]
15917 ms < +0 ms>:APP HALT (0 bytes) []
15920 ms < +3 ms>:CODEC RX (1 bytes) [52]
15920 ms < +0 ms>:CODEC TX (2 bytes) [4200]
15922 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
15922 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16051 ms < +129 ms>:CODEC RX (2 bytes) [5000]
16051 ms < +0 ms>:CODEC TX (1 bytes) [01]
16055 ms < +4 ms>:CODEC RX (1 bytes) [52]
16732 ms < +677 ms>:CODEC RX (1 bytes) [26]
16732 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16733 ms < +1 ms>:CODEC RX (2 bytes) [9320]
16733 ms < +0 ms>:CODEC TX (5 bytes) [7caa732287]
16734 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16734 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16755 ms < +21 ms>:CODEC RX (4 bytes) [500057cd]
16755 ms < +0 ms>:APP HALT (0 bytes) []
16758 ms < +3 ms>:CODEC RX (1 bytes) [52]
16758 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16760 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16760 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16765 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
16765 ms < +0 ms>:APP HALT (0 bytes) []
16769 ms < +4 ms>:CODEC RX (1 bytes) [52]
16769 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16770 ms < +1 ms>:CODEC RX (4 bytes) [93707c02]
16770 ms < +0 ms>:CODEC RX (4 bytes) [08997032]
16841 ms < +71 ms>:CODEC RX (1 bytes) [52]
16841 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16843 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16843 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16849 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
16849 ms < +0 ms>:APP HALT (0 bytes) []
16852 ms < +3 ms>:CODEC RX (1 bytes) [52]
16852 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16853 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16853 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16859 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
16859 ms < +0 ms>:APP HALT (0 bytes) []
16862 ms < +3 ms>:CODEC RX (1 bytes) [52]
16862 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16864 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16864 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16869 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
16869 ms < +0 ms>:APP HALT (0 bytes) []
16872 ms < +3 ms>:CODEC RX (1 bytes) [52]
16872 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16874 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16874 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16881 ms < +7 ms>:CODEC RX (4 bytes) [60017c6a]
16881 ms < +0 ms>:APP AUTH (2 bytes) [6001]
16882 ms < +1 ms>:CODEC TX (4 bytes) [01b7d52d]
16883 ms < +1 ms>:CODEC RX (8 bytes) [e28969ba7e0beb46]
16884 ms < +1 ms>:APP AUTHING (4 bytes) [286c2018]
16884 ms < +0 ms>:APP AUTH FAILED (0 bytes) []
16889 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
16892 ms < +3 ms>:CODEC RX (1 bytes) [52]
16892 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16893 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16893 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16899 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
16899 ms < +0 ms>:APP HALT (0 bytes) []
16902 ms < +3 ms>:CODEC RX (1 bytes) [52]
16902 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16903 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287440a]
16904 ms < +1 ms>:CODEC TX (3 bytes) [1837cd]
16909 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
16909 ms < +0 ms>:APP HALT (0 bytes) []
16912 ms < +3 ms>:CODEC RX (1 bytes) [52]
16912 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16914 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
16914 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
16919 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
16919 ms < +0 ms>:APP HALT (0 bytes) []
16922 ms < +3 ms>:CODEC RX (1 bytes) [52]
16922 ms < +0 ms>:CODEC TX (2 bytes) [4200]
16924 ms < +2 ms>:CODEC RX (9 bytes) [93706caa732287444a]
16930 ms < +6 ms>:CODEC RX (1 bytes) [52]
17607 ms < +677 ms>:CODEC RX (1 bytes) [26]
17607 ms < +0 ms>:CODEC TX (2 bytes) [4200]
17608 ms < +1 ms>:CODEC RX (2 bytes) [9e01]
18281 ms < +673 ms>:CODEC RX (1 bytes) [26]
18281 ms < +0 ms>:CODEC TX (2 bytes) [4200]
18282 ms < +1 ms>:CODEC RX (2 bytes) [9320]
18282 ms < +0 ms>:CODEC TX (5 bytes) [7caa732287]
18284 ms < +2 ms>:CODEC RX (6 bytes) [93707caa7302]
18284 ms < +0 ms>:CODEC RX (4 bytes) [0f899500]
18955 ms < +671 ms>:CODEC RX (1 bytes) [26]
18955 ms < +0 ms>:CODEC TX (2 bytes) [4200]
18956 ms < +1 ms>:CODEC RX (2 bytes) [9320]
18956 ms < +0 ms>:CODEC TX (5 bytes) [7caa732287]
18957 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
18957 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
18981 ms < +24 ms>:CODEC RX (4 bytes) [500057cd]
18981 ms < +0 ms>:APP HALT (0 bytes) []
18984 ms < +3 ms>:CODEC RX (1 bytes) [52]
18985 ms < +1 ms>:CODEC TX (2 bytes) [4200]
18986 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
18986 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
18992 ms < +6 ms>:CODEC RX (4 bytes) [500057cd]
18992 ms < +0 ms>:APP HALT (0 bytes) []
18995 ms < +3 ms>:CODEC RX (1 bytes) [52]
18995 ms < +0 ms>:CODEC TX (2 bytes) [4200]
18997 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
18997 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
19001 ms < +4 ms>:CODEC RX (2 bytes) [5000]
19002 ms < +1 ms>:CODEC TX (1 bytes) [01]
19005 ms < +3 ms>:CODEC RX (1 bytes) [52]
19071 ms < +66 ms>:CODEC RX (1 bytes) [52]
19071 ms < +0 ms>:CODEC TX (2 bytes) [4200]
19073 ms < +2 ms>:CODEC RX (6 bytes) [93707caa7302]
19073 ms < +0 ms>:CODEC RX (2 bytes) [8e06]
19080 ms < +7 ms>:CODEC RX (1 bytes) [52]
19080 ms < +0 ms>:CODEC TX (2 bytes) [4200]
19081 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
19081 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
19086 ms < +5 ms>:CODEC RX (4 bytes) [500057cd]
19086 ms < +0 ms>:APP HALT (0 bytes) []
19090 ms < +4 ms>:CODEC RX (1 bytes) [52]
19090 ms < +0 ms>:CODEC TX (2 bytes) [4200]
19091 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
19091 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
19222 ms < +131 ms>:CODEC RX (4 bytes) [500057cd]
19222 ms < +0 ms>:APP HALT (0 bytes) []
19225 ms < +3 ms>:CODEC RX (1 bytes) [52]
19225 ms < +0 ms>:CODEC TX (2 bytes) [4200]
19227 ms < +2 ms>:CODEC RX (9 bytes) [93707caa732287444a]
19227 ms < +0 ms>:CODEC TX (3 bytes) [1837cd]
19359 ms < +132 ms>:CODEC RX (4 bytes) [500057cd]
19359 ms < +0 ms>:APP HALT (0 bytes) []
19362 ms < +3 ms>:CODEC RX (1 bytes) [52]
19362 ms < +0 ms>:CODEC TX (2 bytes) [4200]
19363 ms < +1 ms>:CODEC RX (9 bytes) [93707caa732287444a]
19364 ms < +1 ms>:CODEC TX (3 bytes) [1837cd]
19494 ms < +130 ms>:CODEC RX (4 bytes) [500057cd]
19494 ms < +0 ms>:APP HALT (0 bytes) []
19497 ms < +3 ms>:CODEC RX (1 bytes) [52]
19497 ms < +0 ms>:CODEC TX (2 bytes) [4200]
19498 ms < +1 ms>:CODEC RX (5 bytes) [93707caa01]
19499 ms < +1 ms>:CODEC RX (2 bytes) [91c3]
20176 ms < +677 ms>:CODEC RX (1 bytes) [26]
20176 ms < +0 ms>:CODEC TX (2 bytes) [4200]
20177 ms < +1 ms>:CODEC RX (2 bytes) [9320]
Looks like the emulation error that is present in the latest firmware. I notice the bug but I am currently out of town and cannot identify the exact commit where the issue appeared.
EDIT: You can try tree e8d6c8
But you must first compile the source. The .hex and .eep files will appear in ChameleonMini/Firmware/Chameleon-Mini/
I'll try that, thanks for the help
edit:now works perfectly, any news of the fix ?
I Have 2 issues the first one is that I can't set the slot via dialing through socat :
Any reason why ?
In addition to that I'd like to know if it's possible to dump a classic mifare 4K data from the reader ?
thanks for any help