iceman1001 / proxmark3

[Deprecated] Iceman Fork, the most totally wicked fork around if you are into proxmark3
http://www.icedev.se/pm3.aspx
GNU General Public License v2.0
465 stars 116 forks source link

Problem when "hf mf cload" #124

Closed BlackPaaanda closed 7 years ago

BlackPaaanda commented 7 years ago

Hi iceman,

I found an issue when using command "hf mf cload". I've done everything before this command correctly and now i got a .eml file contains everything of a mifare classic 1K card. However, when i try to write a magic card, it says "File content error. Block data must include 32 HEX symbols". What's the problem of this?

Cheers.

iceman1001 commented 7 years ago

too little information to be able to answer your question. Have you looked at you .eml file and verfied that it has correct amount of lines? The message says you have a line of data which is not 32 hex symbols...

BlackPaaanda commented 7 years ago

I successfully loaded the file to the emulator memory and use "hf mf cload e" to write the magic card. I think this means the file is correct. The only problem is I can't do "hf mf cload" from the file directly.

Iceman notifications@github.com于2017年8月28日 周一15:12写道:

too little information to be able to answer your question. Have you looked at you .eml file and verfied that it has correct amount of lines? The message says you have a line of data which is not 32 hex symbols...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iceman1001/proxmark3/issues/124#issuecomment-325261469, or mute the thread https://github.com/notifications/unsubscribe-auth/AboTS27kRPoHp-jsPsOt0auHoXzvy7gBks5sckw8gaJpZM4PEFav .

iceman1001 commented 7 years ago

Still too little information to go on. It would help to understand if you,

Just saying that it doesn't work, is not useful in understanding a potential problem.

BlackPaaanda commented 7 years ago

Hi,

I have the .eml file for a standard mifare 1K card, which has 64 rows with 32 HEX symbols per row. For example, the file name is "George.eml". I tried to use

to write the data to a magic card. However, it said . Then I used to load the file to the memory and it worked. Then i used to write the magic card and succeed. I just wonder why the command cannot use the file directly. The source is the latest from your github. Appreciate if you can answer my question and thanks for you patience. On 28 August 2017 at 16:08, Iceman wrote: > Still too little information to go on. It would help to understand if you, > > - mention which commands did you run when you encountered this problem > - are you running the latest source from github > - what does your .eml look like? (number of rows etc) > - which commands did you run to solved your problem > > *Just saying that it doesn't work, is not useful in understanding a > potential problem.* > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . >
iceman1001 commented 7 years ago

Ok, I think I found the problem. I've pushed a fix, try pulling latest code and test.

BlackPaaanda commented 7 years ago

Hi,

I used command and updated the code. However, it still says "File content error. Block data must include 32 HEX symbols"

On 28 August 2017 at 17:48, Iceman notifications@github.com wrote:

Ok, I think I found the problem. I've pushed a fix, try pulling latest code and test.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iceman1001/proxmark3/issues/124#issuecomment-325284738, or mute the thread https://github.com/notifications/unsubscribe-auth/AboTS5fhg5-Jitr56oq0JvRxNr12uOMFks5scnDfgaJpZM4PEFav .

iceman1001 commented 7 years ago

...and you did compile it aswell... hm.

BlackPaaanda commented 7 years ago

Ok....I installed the new client from your source. Now if i run the <hf mf cload> command, sometimes it says "Can't set magic card bloack 0" sometimes it says "File content error. Block data must include 32 HEX symbols". But never succeed......I am pretty sure that the card i used is magic card. Now i'm confused.....

On 28 August 2017 at 23:11, Iceman notifications@github.com wrote:

...and you did compile it aswell... hm.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iceman1001/proxmark3/issues/124#issuecomment-325349171, or mute the thread https://github.com/notifications/unsubscribe-auth/AboTS0fKM-Q-Cu0zDXzfD-1K7lbUYcPcks5scrycgaJpZM4PEFav .

iceman1001 commented 7 years ago

"can't set magic card block0", well, you need to have a magic card gen1 on the antenna when running.

the file content error, shouldn't say anymore. Your .eml file seems be problematic.

iceman1001 commented 7 years ago

ok, I tried it on ubuntu and have same issues. Something is wrong. I'm guessing its the newline \n\r chars spooking.

dibops commented 7 years ago

band aid fix for hf mf cload.

client/cmdhfmf.c Change line 2146 from "char buf[33] = {0x00}; // 32+1 null terminator" to "char buf[256] = {0x00};"

tested and confirmed working.

iceman1001 commented 7 years ago

Thanks but the char buffer doesn't need to be 256. The reason for this bug is that I changed it from 64 down to 32, I forgot about newline chars also take space when I did this.

I pushed fixes and made the output a bit more responsive.

dibops commented 7 years ago

Confirmed fixed.