Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2013-05-06 09:36:33

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Bug in "hf mf eload", "esave", "csave" and "cload" commands

Working on the Graphical User Interface for Windows, I found a bug that affect "hf mf eload", "esave", "csave" and "cload" commands.

The bug consist in: the above SAVE commands are not able to find long paths to files (seems 14 characters is the maximum lenght) while LOAD commands are able to find files ONLY in client folder (short paths also seem not to be supported).

Other load/save functions (ex. legic or data) work perfectly.

Offline

#2 2014-11-13 21:48:55

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Bug in "hf mf eload", "esave", "csave" and "cload" commands

Late answer,

in cmdhfmf.c - CmdHF14AMfELoad(const char *Cmd)

char filename[20];

....
....

	len = strlen(Cmd);
	if (len > 14) len = 14;

The command string is shortend to 14chars,  so that is consistent with what you see. 
The reserved space is 20,   which is also small.

Offline

#3 2014-11-13 21:52:12

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Bug in "hf mf eload", "esave", "csave" and "cload" commands

I think 250 chars will be enough?  Will push it in my fork asap.

       char filename[255];

	len = strlen(Cmd);
	if (len > 250) len = 250;

Offline

#4 2014-11-14 21:49:34

holiman
Contributor
Registered: 2013-05-03
Posts: 566

Re: Bug in "hf mf eload", "esave", "csave" and "cload" commands

As long as we're increasing it, perhaps let's go another thousand bytes or so. It's not like bytes are an issue here...

Offline

#5 2014-11-14 22:30:54

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Bug in "hf mf eload", "esave", "csave" and "cload" commands

Don't think we will need a file path + name that is 1000+ in size.
The load command in legic don't limit the size at all..  It just reads what you stuff in the command prompt. 
Is it an issue?  the previous size was an issue thou

Offline

#6 2014-11-16 11:19:56

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: Bug in "hf mf eload", "esave", "csave" and "cload" commands

I pushed a solution into my fork.  It now looks for a FILE_PATH_SIZE constant.  There were some other functions which got this aswell.. like legic, hitag, data load/save commands

Offline

Board footer

Powered by FluxBB