2010-02-21 08:47:22 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
2010-02-26 05:57:35 +08:00
|
|
|
// Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
|
2010-02-21 08:47:22 +08:00
|
|
|
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
|
|
|
|
//
|
|
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
|
|
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
|
|
|
// the license.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Main binary
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2009-04-09 14:43:20 +08:00
|
|
|
#include <stdio.h>
|
2010-02-07 08:31:32 +08:00
|
|
|
#include <stdlib.h>
|
2009-04-09 14:43:20 +08:00
|
|
|
#include <string.h>
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
#include <pthread.h>
|
2011-06-18 02:39:54 +08:00
|
|
|
#include <unistd.h>
|
2009-04-09 14:43:20 +08:00
|
|
|
#include <readline/readline.h>
|
|
|
|
#include <readline/history.h>
|
2015-01-06 18:17:02 +08:00
|
|
|
|
2009-04-09 14:43:20 +08:00
|
|
|
#include "proxmark3.h"
|
|
|
|
#include "proxgui.h"
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
#include "cmdmain.h"
|
2012-12-05 07:39:18 +08:00
|
|
|
#include "uart.h"
|
|
|
|
#include "ui.h"
|
2013-03-14 23:03:04 +08:00
|
|
|
#include "sleep.h"
|
2014-03-27 05:35:25 +08:00
|
|
|
#include "cmdparser.h"
|
|
|
|
#include "cmdmain.h"
|
2012-12-05 07:39:18 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
// a global mutex to prevent interlaced printing from different threads
|
|
|
|
pthread_mutex_t print_lock;
|
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
static serial_port sp;
|
2012-12-07 20:22:05 +08:00
|
|
|
static UsbCommand txcmd;
|
2013-06-05 16:53:20 +08:00
|
|
|
volatile static bool txcmd_pending = false;
|
2012-12-05 07:39:18 +08:00
|
|
|
|
|
|
|
void SendCommand(UsbCommand *c) {
|
2015-01-07 04:20:41 +08:00
|
|
|
#if 0
|
2012-12-05 07:39:18 +08:00
|
|
|
printf("Sending %d bytes\n", sizeof(UsbCommand));
|
2015-01-07 04:20:41 +08:00
|
|
|
#endif
|
2015-01-08 05:51:34 +08:00
|
|
|
|
|
|
|
if (offline) {
|
2013-11-07 02:32:11 +08:00
|
|
|
PrintAndLog("Sending bytes to proxmark failed - offline");
|
|
|
|
return;
|
|
|
|
}
|
2014-03-31 23:57:14 +08:00
|
|
|
/**
|
2014-10-24 00:36:44 +08:00
|
|
|
The while-loop below causes hangups at times, when the pm3 unit is unresponsive
|
|
|
|
or disconnected. The main console thread is alive, but comm thread just spins here.
|
|
|
|
Not good.../holiman
|
|
|
|
**/
|
2012-12-07 20:22:05 +08:00
|
|
|
while(txcmd_pending);
|
|
|
|
txcmd = *c;
|
|
|
|
txcmd_pending = true;
|
2012-12-05 07:39:18 +08:00
|
|
|
}
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
struct receiver_arg {
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
int run;
|
2009-04-09 14:43:20 +08:00
|
|
|
};
|
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
struct main_loop_arg {
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
int usb_present;
|
2011-09-01 17:03:20 +08:00
|
|
|
char *script_cmds_file;
|
2009-04-09 17:37:34 +08:00
|
|
|
};
|
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
byte_t rx[0x1000000];
|
2012-12-07 20:51:19 +08:00
|
|
|
byte_t* prx = rx;
|
2012-12-05 07:39:18 +08:00
|
|
|
|
|
|
|
static void *uart_receiver(void *targ) {
|
|
|
|
struct receiver_arg *arg = (struct receiver_arg*)targ;
|
|
|
|
size_t rxlen;
|
|
|
|
size_t cmd_count;
|
2015-01-07 04:20:41 +08:00
|
|
|
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
while (arg->run) {
|
2012-12-07 15:21:00 +08:00
|
|
|
rxlen = sizeof(UsbCommand);
|
2015-01-07 04:20:41 +08:00
|
|
|
if (uart_receive(sp, prx, &rxlen)) {
|
2012-12-07 20:51:19 +08:00
|
|
|
prx += rxlen;
|
|
|
|
if (((prx-rx) % sizeof(UsbCommand)) != 0) {
|
2012-12-05 07:39:18 +08:00
|
|
|
continue;
|
|
|
|
}
|
2012-12-07 20:51:19 +08:00
|
|
|
cmd_count = (prx-rx) / sizeof(UsbCommand);
|
2015-01-08 05:51:34 +08:00
|
|
|
|
2015-01-07 04:20:41 +08:00
|
|
|
for (size_t i = 0; i < cmd_count; i++) {
|
2012-12-05 07:39:18 +08:00
|
|
|
UsbCommandReceived((UsbCommand*)(rx+(i*sizeof(UsbCommand))));
|
|
|
|
}
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
}
|
2012-12-07 20:51:19 +08:00
|
|
|
prx = rx;
|
2015-01-07 04:20:41 +08:00
|
|
|
|
2012-12-07 20:22:05 +08:00
|
|
|
if(txcmd_pending) {
|
2015-01-07 04:20:41 +08:00
|
|
|
if (!uart_send(sp, (byte_t*) &txcmd, sizeof(UsbCommand))) {
|
2012-12-07 20:22:05 +08:00
|
|
|
PrintAndLog("Sending bytes to proxmark failed");
|
|
|
|
}
|
|
|
|
txcmd_pending = false;
|
|
|
|
}
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
}
|
2015-01-07 04:20:41 +08:00
|
|
|
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
pthread_exit(NULL);
|
2010-02-21 07:35:09 +08:00
|
|
|
return NULL;
|
2009-04-09 14:43:20 +08:00
|
|
|
}
|
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
static void *main_loop(void *targ) {
|
|
|
|
struct main_loop_arg *arg = (struct main_loop_arg*)targ;
|
|
|
|
struct receiver_arg rarg;
|
|
|
|
char *cmd = NULL;
|
|
|
|
pthread_t reader_thread;
|
|
|
|
|
|
|
|
if (arg->usb_present == 1) {
|
2015-01-07 04:20:41 +08:00
|
|
|
rarg.run = 1;
|
2012-12-05 07:39:18 +08:00
|
|
|
pthread_create(&reader_thread, NULL, &uart_receiver, &rarg);
|
|
|
|
}
|
2015-01-07 04:20:41 +08:00
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
FILE *script_file = NULL;
|
2015-01-07 04:20:41 +08:00
|
|
|
char script_cmd_buf[256]; // iceman, needs lua script the same file_path_buffer as the rest
|
|
|
|
|
2015-01-08 05:51:34 +08:00
|
|
|
if (arg->script_cmds_file) {
|
2012-12-05 07:39:18 +08:00
|
|
|
script_file = fopen(arg->script_cmds_file, "r");
|
2015-01-08 05:51:34 +08:00
|
|
|
if (script_file) {
|
2012-12-05 07:39:18 +08:00
|
|
|
printf("using 'scripting' commands file %s\n", arg->script_cmds_file);
|
2011-09-01 17:03:20 +08:00
|
|
|
}
|
2012-12-05 07:39:18 +08:00
|
|
|
}
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
|
2011-06-18 02:39:54 +08:00
|
|
|
read_history(".history");
|
2015-01-08 05:51:34 +08:00
|
|
|
|
|
|
|
while(1) {
|
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
// If there is a script file
|
|
|
|
if (script_file)
|
|
|
|
{
|
2015-01-08 05:51:34 +08:00
|
|
|
if (!fgets(script_cmd_buf, sizeof(script_cmd_buf), script_file)) {
|
2012-12-05 07:39:18 +08:00
|
|
|
fclose(script_file);
|
|
|
|
script_file = NULL;
|
2015-01-08 05:51:34 +08:00
|
|
|
} else {
|
2012-12-05 07:39:18 +08:00
|
|
|
char *nl;
|
|
|
|
nl = strrchr(script_cmd_buf, '\r');
|
|
|
|
if (nl) *nl = '\0';
|
2015-01-08 06:52:33 +08:00
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
nl = strrchr(script_cmd_buf, '\n');
|
|
|
|
if (nl) *nl = '\0';
|
2015-01-07 04:20:41 +08:00
|
|
|
|
2015-01-08 05:51:34 +08:00
|
|
|
if ((cmd = (char*) malloc(strlen(script_cmd_buf) + 1)) != NULL) {
|
2012-12-05 07:39:18 +08:00
|
|
|
memset(cmd, 0, strlen(script_cmd_buf));
|
|
|
|
strcpy(cmd, script_cmd_buf);
|
|
|
|
printf("%s\n", cmd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-09-01 17:03:20 +08:00
|
|
|
|
2015-01-08 05:51:34 +08:00
|
|
|
if (!script_file) {
|
2012-12-05 07:39:18 +08:00
|
|
|
cmd = readline(PROXPROMPT);
|
2011-09-01 17:03:20 +08:00
|
|
|
}
|
|
|
|
|
2011-06-18 02:39:54 +08:00
|
|
|
if (cmd) {
|
2015-01-08 05:51:34 +08:00
|
|
|
|
2011-06-18 02:39:54 +08:00
|
|
|
while(cmd[strlen(cmd) - 1] == ' ')
|
2012-12-05 07:39:18 +08:00
|
|
|
cmd[strlen(cmd) - 1] = 0x00;
|
2011-06-18 02:39:54 +08:00
|
|
|
|
|
|
|
if (cmd[0] != 0x00) {
|
|
|
|
if (strncmp(cmd, "quit", 4) == 0) {
|
2013-10-11 16:43:23 +08:00
|
|
|
exit(0);
|
2011-06-18 02:39:54 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
CommandReceived(cmd);
|
|
|
|
add_history(cmd);
|
|
|
|
}
|
|
|
|
free(cmd);
|
|
|
|
} else {
|
|
|
|
printf("\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2012-12-05 07:39:18 +08:00
|
|
|
|
2011-06-24 00:49:39 +08:00
|
|
|
write_history(".history");
|
2012-12-05 07:39:18 +08:00
|
|
|
|
|
|
|
if (arg->usb_present == 1) {
|
|
|
|
rarg.run = 0;
|
|
|
|
pthread_join(reader_thread, NULL);
|
|
|
|
}
|
2015-01-07 04:20:41 +08:00
|
|
|
|
2015-01-08 05:51:34 +08:00
|
|
|
if (script_file) {
|
2012-12-05 07:39:18 +08:00
|
|
|
fclose(script_file);
|
|
|
|
script_file = NULL;
|
|
|
|
}
|
2015-01-07 04:20:41 +08:00
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
ExitGraphics();
|
|
|
|
pthread_exit(NULL);
|
|
|
|
return NULL;
|
2009-04-09 14:43:20 +08:00
|
|
|
}
|
|
|
|
|
2014-03-27 06:35:53 +08:00
|
|
|
static void dumpAllHelp(int markdown)
|
2014-03-27 05:08:55 +08:00
|
|
|
{
|
2014-03-27 06:35:53 +08:00
|
|
|
printf("\n%sProxmark3 command dump%s\n\n",markdown?"# ":"",markdown?"":"\n======================");
|
|
|
|
printf("Some commands are available only if a Proxmark is actually connected.%s\n",markdown?" ":"");
|
2014-03-27 05:44:25 +08:00
|
|
|
printf("Check column \"offline\" for their availability.\n");
|
2014-03-27 05:08:55 +08:00
|
|
|
printf("\n");
|
2014-03-27 05:35:25 +08:00
|
|
|
command_t *cmds = getTopLevelCommandTable();
|
2014-03-27 06:35:53 +08:00
|
|
|
dumpCommandsRecursive(cmds, markdown);
|
2014-03-27 05:08:55 +08:00
|
|
|
}
|
|
|
|
|
2012-12-05 07:39:18 +08:00
|
|
|
int main(int argc, char* argv[]) {
|
2013-09-15 17:33:17 +08:00
|
|
|
srand(time(0));
|
2013-03-01 06:22:24 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
if (argc < 2) {
|
|
|
|
printf("syntax: %s <port>\n\n",argv[0]);
|
|
|
|
printf("\tLinux example:'%s /dev/ttyACM0'\n\n", argv[0]);
|
2014-03-27 06:35:53 +08:00
|
|
|
printf("help: %s -h\n\n", argv[0]);
|
|
|
|
printf("\tDump all interactive help at once\n");
|
|
|
|
printf("markdown: %s -m\n\n", argv[0]);
|
|
|
|
printf("\tDump all interactive help at once in markdown syntax\n");
|
2013-09-15 17:33:17 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2014-03-27 06:35:53 +08:00
|
|
|
if (strcmp(argv[1], "-h") == 0) {
|
|
|
|
printf("syntax: %s <port>\n\n",argv[0]);
|
|
|
|
printf("\tLinux example:'%s /dev/ttyACM0'\n\n", argv[0]);
|
|
|
|
dumpAllHelp(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (strcmp(argv[1], "-m") == 0) {
|
|
|
|
dumpAllHelp(1);
|
|
|
|
return 0;
|
|
|
|
}
|
2013-09-15 17:33:17 +08:00
|
|
|
// Make sure to initialize
|
|
|
|
struct main_loop_arg marg = {
|
|
|
|
.usb_present = 0,
|
|
|
|
.script_cmds_file = NULL
|
|
|
|
};
|
|
|
|
pthread_t main_loop_t;
|
2011-09-01 17:03:20 +08:00
|
|
|
|
2013-03-27 00:01:52 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
sp = uart_open(argv[1]);
|
|
|
|
if (sp == INVALID_SERIAL_PORT) {
|
|
|
|
printf("ERROR: invalid serial port\n");
|
|
|
|
marg.usb_present = 0;
|
|
|
|
offline = 1;
|
|
|
|
} else if (sp == CLAIMED_SERIAL_PORT) {
|
|
|
|
printf("ERROR: serial port is claimed by another process\n");
|
|
|
|
marg.usb_present = 0;
|
|
|
|
offline = 1;
|
|
|
|
} else {
|
|
|
|
marg.usb_present = 1;
|
|
|
|
offline = 0;
|
|
|
|
}
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
// If the user passed the filename of the 'script' to execute, get it
|
|
|
|
if (argc > 2 && argv[2]) {
|
2013-10-09 02:30:01 +08:00
|
|
|
if (argv[2][0] == 'f' && //buzzy, if a word 'flush' passed, flush the output after every log entry.
|
|
|
|
argv[2][1] == 'l' &&
|
|
|
|
argv[2][2] == 'u' &&
|
|
|
|
argv[2][3] == 's' &&
|
|
|
|
argv[2][4] == 'h')
|
|
|
|
{
|
|
|
|
printf("Output will be flushed after every print.\n");
|
|
|
|
flushAfterWrite = 1;
|
|
|
|
}
|
|
|
|
else
|
2013-09-15 17:33:17 +08:00
|
|
|
marg.script_cmds_file = argv[2];
|
|
|
|
}
|
2013-10-09 02:30:01 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
// create a mutex to avoid interlacing print commands from our different threads
|
|
|
|
pthread_mutex_init(&print_lock, NULL);
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
pthread_create(&main_loop_t, NULL, &main_loop, &marg);
|
|
|
|
InitGraphics(argc, argv);
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
MainGraphics();
|
|
|
|
|
|
|
|
pthread_join(main_loop_t, NULL);
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
|
2013-09-15 17:33:17 +08:00
|
|
|
// Clean up the port
|
|
|
|
uart_close(sp);
|
|
|
|
|
|
|
|
// clean up mutex
|
|
|
|
pthread_mutex_destroy(&print_lock);
|
2012-12-05 07:39:18 +08:00
|
|
|
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
return 0;
|
2009-04-09 14:43:20 +08:00
|
|
|
}
|