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 2012-12-07 22:32:05

rrookie
Member
Registered: 2012-12-01
Posts: 8

Problem adding new hf command 'eTicket' using revision 629.

Hi all,

I'm trying to add a new command which should read a german transportation card (application is called VDV-Kernapplikation ) using APDUs, called eTicket. I tried keeping close to the command and functionality of 'epa'. My code compiles ok and I can see the new command in the proxmark3 Linux client using 'help'. Problem is, that now if I call any command either the client or my Proxmark3 firmware screws up, not sure which. For example:
-----------
proxmark3> hf 14a list
unrecognized command 00000000
         
unrecognized command 00000000
         
unrecognized command 00000000
--------

Even flashing with 'flasher' fails causing:
-------------
Dec  6 23:19:07 ubuntu kernel: [10909.355433] usb 1-1.2: usbfs: USBDEVFS_CONTROL failed cmd flasher rqt 128 rq 6 len 255 ret -110
-------------

Here is my svn diff: http://pastebin.com/y568FJt9
I guess it's simply something stupid I missed or didn't figure out correctly.

I would appreciate any hint.

Thanks,
rrookie

Offline

#2 2012-12-08 12:17:17

rrookie
Member
Registered: 2012-12-01
Posts: 8

Re: Problem adding new hf command 'eTicket' using revision 629.

hmmm....
This seems do be a compiler issue. When I run the 'proxmark3' executable in a debugger (gdb), it looks like the variable 'i' has been optimized out (at least) in this function:
---------

void CmdsParse(const command_t Commands[], const char *Cmd)
{
  char cmd_name[32];
  int len = 0;
  memset(cmd_name, 0, 32);
  sscanf(Cmd, "%31s%n", cmd_name, &len);
  int i = 0;
  while (Commands[i].Name && strcmp(Commands[i].Name, cmd_name))
    ++i;
    
  /* try to find exactly one prefix-match */
  if(!Commands[i].Name) {
.......

-----------------

(gdb) graph display /s Commands[i].Name
(gdb) 5: x/s Commands[i].Name  <error: value has been optimized out>

(gdb) graph display /s Commands[0].Name
6: x/s Commands[0].Name  0x420ba2:	 "help"

-----------------

I'm using  gcc version 4.4.1 (Sourcery G++ Lite 2009q3-68).

Has anybody else run across this kind of issue yet ?

Offline

#3 2012-12-08 22:03:18

rrookie
Member
Registered: 2012-12-01
Posts: 8

Re: Problem adding new hf command 'eTicket' using revision 629.

Sorry. Of course the client is not compiled with the arm-compiler.
My Linux GCC is: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Offline

Board footer

Powered by FluxBB