2010-02-21 08:47:22 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
|
2017-07-30 15:17:48 +08:00
|
|
|
// 2016,2017, marshmellow, iceman
|
2010-02-21 08:47:22 +08:00
|
|
|
// 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.
|
|
|
|
//-----------------------------------------------------------------------------
|
2019-09-19 01:43:55 +08:00
|
|
|
// Low frequency HID commands (known)
|
|
|
|
//
|
|
|
|
// Useful resources:
|
|
|
|
// RF interface, programming a T55x7 clone, 26-bit HID H10301 encoding:
|
|
|
|
// http://www.proxmark.org/files/Documents/125%20kHz%20-%20HID/HID_format_example.pdf
|
|
|
|
//
|
|
|
|
// "Understanding Card Data Formats"
|
|
|
|
// https://www.hidglobal.com/sites/default/files/hid-understanding_card_data_formats-wp-en.pdf
|
|
|
|
//
|
|
|
|
// "What Format Do You Need?"
|
|
|
|
// https://www.hidglobal.com/sites/default/files/resource_files/hid-prox-br-en.pdf
|
2010-02-21 08:47:22 +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
|
|
|
#include "cmdlfhid.h"
|
|
|
|
|
2019-08-08 22:57:33 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
|
|
|
#include "cmdparser.h" // command_t
|
|
|
|
#include "comms.h"
|
|
|
|
#include "commonutil.h" // ARRAYLEN
|
2020-10-04 03:40:03 +08:00
|
|
|
#include "cliparser.h"
|
2019-08-08 22:57:33 +08:00
|
|
|
#include "ui.h"
|
|
|
|
#include "graph.h"
|
|
|
|
#include "cmddata.h" //for g_debugMode, demodbuff cmds
|
|
|
|
#include "cmdlf.h" // lf_read
|
|
|
|
#include "util_posix.h"
|
|
|
|
#include "lfdemod.h"
|
2019-10-13 06:48:26 +08:00
|
|
|
#include "wiegand_formats.h"
|
2020-10-06 16:21:07 +08:00
|
|
|
#include "wiegand_formatutils.h"
|
2019-08-08 22:57:33 +08:00
|
|
|
|
2017-02-08 05:27:28 +08:00
|
|
|
#ifndef BITS
|
|
|
|
# define BITS 96
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
static int CmdHelp(const char *Cmd);
|
2019-09-19 19:46:38 +08:00
|
|
|
|
2017-08-12 00:13:58 +08:00
|
|
|
// sending three times. Didn't seem to break the previous sim?
|
2019-05-22 22:10:48 +08:00
|
|
|
static int sendPing(void) {
|
2019-05-08 05:35:09 +08:00
|
|
|
SendCommandNG(CMD_PING, NULL, 0);
|
|
|
|
SendCommandNG(CMD_PING, NULL, 0);
|
|
|
|
SendCommandNG(CMD_PING, NULL, 0);
|
2019-03-10 06:35:06 +08:00
|
|
|
clearCommandBuffer();
|
2019-04-18 18:43:35 +08:00
|
|
|
PacketResponseNG resp;
|
2019-05-08 05:35:09 +08:00
|
|
|
if (!WaitForResponseTimeout(CMD_PING, &resp, 1000))
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_ETIMEOUT;
|
|
|
|
return PM3_SUCCESS;
|
2016-08-26 23:18:48 +08:00
|
|
|
}
|
2019-09-19 19:46:38 +08:00
|
|
|
static int sendTry(uint8_t format_idx, wiegand_card_t *card, uint32_t delay, bool verbose) {
|
|
|
|
|
|
|
|
wiegand_message_t packed;
|
|
|
|
memset(&packed, 0, sizeof(wiegand_message_t));
|
|
|
|
|
|
|
|
if (HIDPack(format_idx, card, &packed) == false) {
|
|
|
|
PrintAndLogEx(WARNING, "The card data could not be encoded in the selected format.");
|
|
|
|
return PM3_ESOFT;
|
|
|
|
}
|
2016-08-26 23:18:48 +08:00
|
|
|
|
2019-03-10 07:00:59 +08:00
|
|
|
if (verbose)
|
2019-10-06 05:56:19 +08:00
|
|
|
PrintAndLogEx(INFO, "Trying FC: %u; CN: %"PRIu64"; Issue level: %u; OEM: %u", card->FacilityCode, card->CardNumber, card->IssueLevel, card->OEM);
|
2019-03-09 15:59:13 +08:00
|
|
|
|
2019-09-19 19:46:38 +08:00
|
|
|
lf_hidsim_t payload;
|
|
|
|
payload.hi2 = packed.Top;
|
|
|
|
payload.hi = packed.Mid;
|
|
|
|
payload.lo = packed.Bot;
|
2016-08-26 23:18:48 +08:00
|
|
|
|
2019-03-10 06:35:06 +08:00
|
|
|
clearCommandBuffer();
|
2017-08-12 00:13:58 +08:00
|
|
|
|
2019-09-19 19:46:38 +08:00
|
|
|
SendCommandNG(CMD_LF_HID_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
2019-10-13 06:48:26 +08:00
|
|
|
/*
|
|
|
|
PacketResponseNG resp;
|
|
|
|
WaitForResponse(CMD_LF_HID_SIMULATE, &resp);
|
|
|
|
if (resp.status == PM3_EOPABORTED)
|
|
|
|
return resp.status;
|
|
|
|
*/
|
2019-03-10 06:35:06 +08:00
|
|
|
msleep(delay);
|
2019-05-22 22:10:48 +08:00
|
|
|
return sendPing();
|
2016-08-26 23:18:48 +08:00
|
|
|
}
|
|
|
|
|
2017-07-30 15:17:48 +08:00
|
|
|
//by marshmellow (based on existing demod + holiman's refactor)
|
|
|
|
//HID Prox demod - FSK RF/50 with preamble of 00011101 (then manchester encoded)
|
|
|
|
//print full HID Prox ID and some bit format details if found
|
2020-09-28 17:50:20 +08:00
|
|
|
int demodHID(bool verbose) {
|
|
|
|
(void) verbose; // unused so far
|
2019-05-23 18:12:20 +08:00
|
|
|
|
|
|
|
// HID simulation etc uses 0/1 as signal data. This must be converted in order to demod it back again
|
2019-06-08 03:40:33 +08:00
|
|
|
if (isGraphBitstream()) {
|
2019-05-23 18:12:20 +08:00
|
|
|
convertGraphFromBitstream();
|
|
|
|
}
|
|
|
|
|
2019-03-10 06:35:06 +08:00
|
|
|
//raw fsk demod no manchester decoding no start bit finding just get binary from wave
|
2019-03-10 07:00:59 +08:00
|
|
|
uint32_t hi2 = 0, hi = 0, lo = 0;
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2019-05-23 18:12:20 +08:00
|
|
|
uint8_t bits[GraphTraceLen];
|
2019-03-10 06:35:06 +08:00
|
|
|
size_t size = getFromGraphBuf(bits);
|
|
|
|
if (size == 0) {
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID not enough samples"));
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_ESOFT;
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
|
|
|
//get binary from fsk wave
|
|
|
|
int waveIdx = 0;
|
|
|
|
int idx = HIDdemodFSK(bits, &size, &hi2, &hi, &lo, &waveIdx);
|
|
|
|
if (idx < 0) {
|
|
|
|
|
|
|
|
if (idx == -1)
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID not enough samples"));
|
2019-03-10 06:35:06 +08:00
|
|
|
else if (idx == -2)
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID just noise detected"));
|
2019-03-10 06:35:06 +08:00
|
|
|
else if (idx == -3)
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID problem during FSK demod"));
|
2019-03-10 06:35:06 +08:00
|
|
|
else if (idx == -4)
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID preamble not found"));
|
2019-03-10 06:35:06 +08:00
|
|
|
else if (idx == -5)
|
2020-03-13 22:52:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID error in Manchester data, size %zu"), size);
|
2019-03-10 06:35:06 +08:00
|
|
|
else
|
2020-03-13 22:52:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID error demoding fsk %d"), idx);
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_ESOFT;
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
|
|
|
|
2019-04-07 03:46:00 +08:00
|
|
|
setDemodBuff(bits, size, idx);
|
2019-03-10 07:00:59 +08:00
|
|
|
setClockGrid(50, waveIdx + (idx * 50));
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2019-03-10 07:00:59 +08:00
|
|
|
if (hi2 == 0 && hi == 0 && lo == 0) {
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: Error - " _RED_("HID no values found"));
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_ESOFT;
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
|
|
|
|
2020-10-06 16:21:07 +08:00
|
|
|
wiegand_message_t packed = initialize_message_object(hi2, hi, lo);
|
|
|
|
HIDTryUnpack(&packed, false);
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2020-03-13 22:52:25 +08:00
|
|
|
PrintAndLogEx(DEBUG, "DEBUG: HID idx: %d, Len: %zu, Printing Demod Buffer: ", idx, size);
|
2019-03-10 06:35:06 +08:00
|
|
|
if (g_debugMode)
|
|
|
|
printDemodBuff();
|
|
|
|
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_SUCCESS;
|
2017-07-30 15:17:48 +08:00
|
|
|
}
|
|
|
|
|
2020-09-28 17:50:20 +08:00
|
|
|
static int CmdHIDDemod(const char *Cmd) {
|
|
|
|
(void)Cmd; // Cmd is not used so far
|
|
|
|
return demodHID(true);
|
|
|
|
}
|
|
|
|
|
2017-07-30 15:17:48 +08:00
|
|
|
// this read is the "normal" read, which download lf signal and tries to demod here.
|
2019-04-12 07:55:25 +08:00
|
|
|
static int CmdHIDRead(const char *Cmd) {
|
2020-09-28 17:50:20 +08:00
|
|
|
(void)Cmd; // Cmd is not used so far
|
2020-10-07 06:47:34 +08:00
|
|
|
lf_read(false, 16000);
|
2020-09-28 17:50:20 +08:00
|
|
|
return demodHID(true);
|
2017-07-30 15:17:48 +08:00
|
|
|
}
|
2019-09-19 19:46:38 +08:00
|
|
|
|
2017-07-30 15:17:48 +08:00
|
|
|
// this read loops on device side.
|
|
|
|
// uses the demod in lfops.c
|
2019-09-19 19:46:38 +08:00
|
|
|
static int CmdHIDWatch(const char *Cmd) {
|
2020-10-04 03:40:03 +08:00
|
|
|
CLIParserContext *ctx;
|
|
|
|
|
|
|
|
CLIParserInit(&ctx, "lf hid watch",
|
|
|
|
"Enables HID compatible reader mode printing details.\n"
|
|
|
|
"By default, values are printed and logged until the button is pressed or another USB command is issued.\n",
|
|
|
|
"lf hid watch"
|
2020-10-06 23:50:20 +08:00
|
|
|
);
|
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
void *argtable[] = {
|
|
|
|
arg_param_begin,
|
|
|
|
arg_param_end
|
|
|
|
};
|
|
|
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
|
|
|
CLIParserFree(ctx);
|
2020-06-22 20:56:13 +08:00
|
|
|
|
|
|
|
PrintAndLogEx(SUCCESS, "Watching for HID Prox cards - place tag on antenna");
|
|
|
|
PrintAndLogEx(INFO, "Press pm3-button to stop reading cards");
|
2019-03-10 06:35:06 +08:00
|
|
|
clearCommandBuffer();
|
2020-08-13 18:25:04 +08:00
|
|
|
SendCommandNG(CMD_LF_HID_WATCH, NULL, 0);
|
2020-06-22 20:56:13 +08:00
|
|
|
PacketResponseNG resp;
|
|
|
|
WaitForResponse(CMD_LF_HID_WATCH, &resp);
|
|
|
|
PrintAndLogEx(INFO, "Done");
|
|
|
|
return resp.status;
|
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
|
|
|
}
|
2019-09-19 19:46:38 +08:00
|
|
|
|
2019-04-12 07:55:25 +08:00
|
|
|
static int CmdHIDSim(const char *Cmd) {
|
2020-10-04 03:40:03 +08:00
|
|
|
int idlen = 0;
|
|
|
|
uint8_t id[10] = {0};
|
2019-09-15 07:17:47 +08:00
|
|
|
lf_hidsim_t payload;
|
|
|
|
payload.longFMT = 0;
|
|
|
|
uint32_t hi2 = 0, hi = 0, lo = 0;
|
2020-10-04 03:40:03 +08:00
|
|
|
uint32_t i = 0;
|
|
|
|
|
|
|
|
CLIParserContext *ctx;
|
|
|
|
CLIParserInit(&ctx, "lf hid sim",
|
|
|
|
"Enables simulation of HID card with card number.",
|
|
|
|
"lf hid sim 2006ec0c86"
|
2020-10-06 23:50:20 +08:00
|
|
|
);
|
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
void *argtable[] = {
|
|
|
|
arg_param_begin,
|
|
|
|
arg_lit0("l", "long", "Simulate HID tag with long ID"),
|
|
|
|
arg_str1(NULL, NULL, "<hex>", "HID tag ID"),
|
|
|
|
arg_param_end
|
|
|
|
};
|
|
|
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
|
|
|
|
|
|
|
bool long_id = arg_get_lit(ctx, 1);
|
|
|
|
|
|
|
|
CLIGetHexWithReturn(ctx, 2, id, &idlen);
|
|
|
|
|
|
|
|
CLIParserFree(ctx);
|
|
|
|
|
|
|
|
if (long_id) {
|
2020-10-06 23:50:20 +08:00
|
|
|
for (i = 0; i < idlen; ++i) {
|
2020-10-04 03:40:03 +08:00
|
|
|
hi2 = (hi2 << 4) | (hi >> 28);
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
2019-03-09 15:59:13 +08:00
|
|
|
|
2019-09-15 07:17:47 +08:00
|
|
|
hi2 = (hi2 << 4) | (hi >> 28);
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
2020-10-04 03:40:03 +08:00
|
|
|
lo = (lo << 4) | (id[i] & 0xf); //get last 4 bits
|
2019-09-15 07:17:47 +08:00
|
|
|
}
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(INFO, "Simulating HID tag with long ID: " _GREEN_("%x%08x%08x"), hi2, hi, lo);
|
2019-09-15 07:17:47 +08:00
|
|
|
payload.longFMT = 1;
|
|
|
|
} else {
|
2020-10-06 23:50:20 +08:00
|
|
|
for (i = 0; i < idlen; ++i) {
|
2019-09-15 07:17:47 +08:00
|
|
|
hi = (hi << 4) | (lo >> 28);
|
2020-10-04 03:40:03 +08:00
|
|
|
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
|
|
|
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (id[i] & 0xf); //get last 4 bits
|
2019-09-15 07:17:47 +08:00
|
|
|
}
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(SUCCESS, "Simulating HID tag with ID: " _GREEN_("%x%08x"), hi, lo);
|
2019-09-15 07:17:47 +08:00
|
|
|
hi2 = 0;
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
2013-03-13 15:13:19 +08:00
|
|
|
|
2020-03-15 16:57:47 +08:00
|
|
|
PrintAndLogEx(INFO, "Press pm3-button to abort simulation");
|
2013-03-13 15:13:19 +08:00
|
|
|
|
2019-09-15 07:17:47 +08:00
|
|
|
payload.hi2 = hi2;
|
|
|
|
payload.hi = hi;
|
|
|
|
payload.lo = lo;
|
|
|
|
|
2019-03-10 06:35:06 +08:00
|
|
|
clearCommandBuffer();
|
2019-09-15 07:17:47 +08:00
|
|
|
SendCommandNG(CMD_LF_HID_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
2019-05-09 06:08:59 +08:00
|
|
|
PacketResponseNG resp;
|
2019-08-04 01:17:00 +08:00
|
|
|
WaitForResponse(CMD_LF_HID_SIMULATE, &resp);
|
2019-05-23 18:12:20 +08:00
|
|
|
PrintAndLogEx(INFO, "Done");
|
2019-05-10 02:20:54 +08:00
|
|
|
if (resp.status != PM3_EOPABORTED)
|
2019-05-09 06:08:59 +08:00
|
|
|
return resp.status;
|
|
|
|
return PM3_SUCCESS;
|
2013-03-13 15:13:19 +08:00
|
|
|
}
|
|
|
|
|
2019-04-12 07:55:25 +08:00
|
|
|
static int CmdHIDClone(const char *Cmd) {
|
2020-10-04 03:40:03 +08:00
|
|
|
int idlen = 0;
|
|
|
|
uint8_t id[10] = {0};
|
2020-10-07 07:29:00 +08:00
|
|
|
uint32_t hi2 = 0, hi = 0, lo = 0, i = 0;
|
2020-10-04 03:40:03 +08:00
|
|
|
|
|
|
|
CLIParserContext *ctx;
|
|
|
|
CLIParserInit(&ctx, "lf hid clone",
|
|
|
|
"Clone HID to T55x7. Tag must be on antenna!",
|
2020-10-07 07:29:00 +08:00
|
|
|
"lf hid clone 2006ec0c86 -> HID 10301 26 bit\n"
|
|
|
|
"lf hid clone 2e0ec00c87 -> HID Corporate 35 bit\n"
|
|
|
|
"lf hid clone -l 01f0760643c3 -> HID P10001 40 bit\n"
|
|
|
|
"lf hid clone -l 01400076000c86 -> HID Corporate 48 bit"
|
2020-10-06 23:50:20 +08:00
|
|
|
);
|
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
void *argtable[] = {
|
|
|
|
arg_param_begin,
|
|
|
|
arg_lit0("l", "long", "84bit HID long ID"),
|
|
|
|
arg_str1(NULL, NULL, "<hex>", "HID tag ID"),
|
|
|
|
arg_param_end
|
|
|
|
};
|
|
|
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
|
|
|
bool long_id = arg_get_lit(ctx, 1);
|
|
|
|
CLIGetHexWithReturn(ctx, 2, id, &idlen);
|
|
|
|
CLIParserFree(ctx);
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2019-04-19 23:03:39 +08:00
|
|
|
uint8_t longid[1] = {0};
|
2020-10-04 03:40:03 +08:00
|
|
|
|
|
|
|
if (long_id) {
|
2020-10-06 23:50:20 +08:00
|
|
|
for (i = 0; i < idlen; ++i) {
|
2019-03-10 06:35:06 +08:00
|
|
|
hi2 = (hi2 << 4) | (hi >> 28);
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
2020-10-04 03:40:03 +08:00
|
|
|
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
hi2 = (hi2 << 4) | (hi >> 28);
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (id[i] & 0xf); //get last 4 bits
|
|
|
|
}
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(INFO, "Preparing to clone HID tag with long ID: " _GREEN_("%x%08x%08x"), hi2, hi, lo);
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2019-04-19 23:03:39 +08:00
|
|
|
longid[0] = 1;
|
2019-03-10 06:35:06 +08:00
|
|
|
} else {
|
2020-10-06 23:50:20 +08:00
|
|
|
for (i = 0; i < idlen; ++i) {
|
2020-10-04 03:40:03 +08:00
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
|
|
|
|
2019-03-10 06:35:06 +08:00
|
|
|
hi = (hi << 4) | (lo >> 28);
|
2020-10-04 03:40:03 +08:00
|
|
|
lo = (lo << 4) | (id[i] & 0xf); //get last 4 bits
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
2020-03-13 22:09:25 +08:00
|
|
|
PrintAndLogEx(INFO, "Preparing to clone HID tag with ID: " _GREEN_("%x%08x"), hi, lo);
|
2019-03-10 06:35:06 +08:00
|
|
|
hi2 = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
clearCommandBuffer();
|
2020-02-04 03:53:50 +08:00
|
|
|
SendCommandMIX(CMD_LF_HID_CLONE, hi2, hi, lo, longid, sizeof(longid));
|
2020-03-02 20:59:41 +08:00
|
|
|
PrintAndLogEx(SUCCESS, "Done");
|
2020-04-22 08:22:55 +08:00
|
|
|
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf hid read`") " to verify");
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_SUCCESS;
|
2011-10-15 23:15:49 +08:00
|
|
|
}
|
2019-03-25 07:04:28 +08:00
|
|
|
|
|
|
|
/*
|
2019-03-10 06:35:06 +08:00
|
|
|
PrintAndLogEx(NORMAL, "HID | OEM | FC | CN | Wiegand | HID Formatted");
|
|
|
|
PrintAndLogEx(NORMAL, "----+-----+------+---------+-----------+--------------------");
|
2019-09-19 19:46:38 +08:00
|
|
|
PrintAndLogEx(NORMAL, " %u | %03u | %03u | %" PRIu64 " | %" PRIX64 " | %" PRIX64,
|
2019-03-10 07:00:59 +08:00
|
|
|
fmtlen[i],
|
|
|
|
oem,
|
|
|
|
fc,
|
|
|
|
cardnum,
|
|
|
|
wiegand,
|
|
|
|
blocks
|
|
|
|
);
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
|
|
|
PrintAndLogEx(NORMAL, "----+-----+-----+-------+-----------+--------------------");
|
2019-09-19 19:46:38 +08:00
|
|
|
*/
|
2016-01-13 07:16:11 +08:00
|
|
|
|
2019-04-12 07:55:25 +08:00
|
|
|
static int CmdHIDBrute(const char *Cmd) {
|
2019-03-09 15:59:13 +08:00
|
|
|
|
2020-03-02 00:15:48 +08:00
|
|
|
uint32_t delay = 1000;
|
2019-09-19 19:46:38 +08:00
|
|
|
int format_idx = -1;
|
2020-02-29 16:27:55 +08:00
|
|
|
int direction = 0;
|
2020-10-04 03:40:03 +08:00
|
|
|
uint8_t format[16] = {0};
|
|
|
|
int formatLen;
|
2020-02-29 16:27:55 +08:00
|
|
|
|
|
|
|
wiegand_card_t cn_hi, cn_low;
|
|
|
|
memset(&cn_hi, 0, sizeof(wiegand_card_t));
|
2020-03-02 00:15:48 +08:00
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
CLIParserContext *ctx;
|
|
|
|
CLIParserInit(&ctx, "lf hid brute",
|
|
|
|
"Enables bruteforce of HID readers with specified facility code.\n"
|
|
|
|
"This is a attack against reader. if cardnumber is given, it starts with it and goes up / down one step\n"
|
|
|
|
"if cardnumber is not given, it starts with 1 and goes up to 65535",
|
|
|
|
"lf hid brute -w H10301 -f 224\n"
|
|
|
|
"lf hid brute -w H10301 -f 21 -d 2000\n"
|
|
|
|
"lf hid brute -v -w H10301 -f 21 -c 200 -d 2000\n"
|
2020-10-06 23:50:20 +08:00
|
|
|
);
|
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
void *argtable[] = {
|
|
|
|
arg_param_begin,
|
|
|
|
arg_lit0("v", "verbose", "verbose logging, show all tries"),
|
|
|
|
arg_str1("w", "wiegand", "format", "see " _YELLOW_("`wiegand list`") " for available formats"),
|
|
|
|
arg_int0("f", "fn", "dec", "facility code"),
|
|
|
|
arg_int0("c", "cn", "dec", "card number to start with"),
|
|
|
|
arg_int0("i", NULL, "dec", "issue level"),
|
|
|
|
arg_int0("o", "oem", "dec", "OEM code"),
|
2020-10-06 23:50:20 +08:00
|
|
|
arg_int0("d", "delay", "dec", "delay betweens attempts in ms. Default 1000ms"),
|
2020-10-04 03:40:03 +08:00
|
|
|
arg_lit0(NULL, "up", "direction to increment card number. (default is both directions)"),
|
2020-10-06 23:50:20 +08:00
|
|
|
arg_lit0(NULL, "down", "direction to decrement card number. (default is both directions)"),
|
2020-10-04 03:40:03 +08:00
|
|
|
arg_param_end
|
|
|
|
};
|
|
|
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
|
|
|
|
|
|
|
bool verbose = arg_get_lit(ctx, 1);
|
2020-10-06 23:50:20 +08:00
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
CLIGetStrWithReturn(ctx, 2, format, &formatLen);
|
|
|
|
|
2020-10-06 23:50:20 +08:00
|
|
|
format_idx = HIDFindCardFormat((char *) format);
|
2020-02-29 16:27:55 +08:00
|
|
|
if (format_idx == -1) {
|
2020-10-04 03:40:03 +08:00
|
|
|
PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format);
|
2020-10-05 19:38:04 +08:00
|
|
|
CLIParserFree(ctx);
|
2020-10-04 03:40:03 +08:00
|
|
|
return PM3_EINVARG;
|
2020-02-29 16:27:55 +08:00
|
|
|
}
|
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
cn_hi.FacilityCode = arg_get_int_def(ctx, 3, 0);
|
|
|
|
cn_hi.CardNumber = arg_get_int_def(ctx, 4, 0);
|
|
|
|
cn_hi.IssueLevel = arg_get_int_def(ctx, 5, 0);
|
|
|
|
cn_hi.OEM = arg_get_int_def(ctx, 6, 0);
|
|
|
|
delay = arg_get_int_def(ctx, 7, 1000);
|
|
|
|
|
2020-10-05 19:38:04 +08:00
|
|
|
CLIParserFree(ctx);
|
|
|
|
|
2020-10-04 03:40:03 +08:00
|
|
|
if (arg_get_lit(ctx, 8) && arg_get_lit(ctx, 9)) {
|
|
|
|
direction = 0;
|
|
|
|
} else if (arg_get_lit(ctx, 8)) {
|
|
|
|
direction = 1;
|
|
|
|
} else if (arg_get_lit(ctx, 9)) {
|
|
|
|
direction = 2;
|
|
|
|
}
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2020-02-29 16:27:55 +08:00
|
|
|
if (verbose) {
|
|
|
|
PrintAndLogEx(INFO, "Wiegand format#.. %i", format_idx);
|
|
|
|
PrintAndLogEx(INFO, "OEM#............. %u", cn_hi.OEM);
|
|
|
|
PrintAndLogEx(INFO, "ISSUE#........... %u", cn_hi.IssueLevel);
|
|
|
|
PrintAndLogEx(INFO, "Facility#........ %u", cn_hi.FacilityCode);
|
2020-03-02 00:15:48 +08:00
|
|
|
PrintAndLogEx(INFO, "Card#............ %" PRIu64, cn_hi.CardNumber);
|
2020-03-11 00:05:45 +08:00
|
|
|
switch (direction) {
|
2020-02-29 16:27:55 +08:00
|
|
|
case 0:
|
|
|
|
PrintAndLogEx(INFO, "Brute-forcing direction: " _YELLOW_("BOTH"));
|
|
|
|
break;
|
2020-03-02 00:15:48 +08:00
|
|
|
case 1:
|
2020-02-29 16:27:55 +08:00
|
|
|
PrintAndLogEx(INFO, "Brute-forcing direction: " _YELLOW_("UP"));
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
PrintAndLogEx(INFO, "Brute-forcing direction: " _YELLOW_("DOWN"));
|
|
|
|
break;
|
2020-03-11 00:05:45 +08:00
|
|
|
default:
|
|
|
|
break;
|
2020-02-29 16:27:55 +08:00
|
|
|
}
|
|
|
|
}
|
2019-03-10 06:35:06 +08:00
|
|
|
PrintAndLogEx(INFO, "Brute-forcing HID reader");
|
2020-02-29 16:27:55 +08:00
|
|
|
PrintAndLogEx(INFO, "Press pm3-button to abort simulation or press `enter` to exit");
|
|
|
|
|
|
|
|
// copy values to low.
|
|
|
|
cn_low = cn_hi;
|
2019-03-10 06:35:06 +08:00
|
|
|
|
|
|
|
// main loop
|
2020-02-29 16:27:55 +08:00
|
|
|
// iceman: could add options for bruteforcing OEM, ISSUE or FC aswell..
|
|
|
|
bool exitloop = false;
|
|
|
|
bool fin_hi, fin_low;
|
|
|
|
fin_hi = fin_low = false;
|
|
|
|
do {
|
2019-03-10 06:35:06 +08:00
|
|
|
|
2019-05-01 05:52:40 +08:00
|
|
|
if (!session.pm3_present) {
|
2019-03-10 06:35:06 +08:00
|
|
|
PrintAndLogEx(WARNING, "Device offline\n");
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_ENODATA;
|
2019-03-10 06:35:06 +08:00
|
|
|
}
|
|
|
|
|
2019-07-11 19:01:34 +08:00
|
|
|
if (kbd_enter_pressed()) {
|
2019-03-10 06:35:06 +08:00
|
|
|
PrintAndLogEx(INFO, "aborted via keyboard!");
|
|
|
|
return sendPing();
|
|
|
|
}
|
|
|
|
|
2020-02-29 16:27:55 +08:00
|
|
|
// do one up
|
|
|
|
if (direction != 2) {
|
|
|
|
if (cn_hi.CardNumber < 0xFFFF) {
|
|
|
|
cn_hi.CardNumber++;
|
|
|
|
if (sendTry(format_idx, &cn_hi, delay, verbose) != PM3_SUCCESS) return PM3_ESOFT;
|
|
|
|
} else {
|
|
|
|
fin_hi = true;
|
|
|
|
}
|
2019-09-19 19:46:38 +08:00
|
|
|
}
|
2020-03-11 00:05:45 +08:00
|
|
|
|
2020-02-29 16:27:55 +08:00
|
|
|
// do one down
|
|
|
|
if (direction != 1) {
|
|
|
|
if (cn_low.CardNumber > 0) {
|
|
|
|
cn_low.CardNumber--;
|
|
|
|
if (sendTry(format_idx, &cn_low, delay, verbose) != PM3_SUCCESS) return PM3_ESOFT;
|
|
|
|
} else {
|
|
|
|
fin_low = true;
|
|
|
|
}
|
2019-10-13 06:48:26 +08:00
|
|
|
}
|
2020-02-29 16:27:55 +08:00
|
|
|
|
|
|
|
switch (direction) {
|
2020-03-11 00:05:45 +08:00
|
|
|
case 0:
|
2020-02-29 16:27:55 +08:00
|
|
|
if (fin_hi && fin_low) {
|
|
|
|
exitloop = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
exitloop = fin_hi;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
exitloop = fin_low;
|
|
|
|
break;
|
2020-03-11 00:05:45 +08:00
|
|
|
default:
|
|
|
|
break;
|
2020-02-29 16:27:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} while (exitloop == false);
|
|
|
|
|
|
|
|
PrintAndLogEx(INFO, "Brute forcing finished");
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_SUCCESS;
|
ADD: @go_tus 's code to generate wiegand codes from FacilityCode/SiteCode and Cardnumber. Almost there, formatlength supported is 26,34,35,37,38,40,44,75,84, when its finised.
2016-01-08 21:28:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static command_t CommandTable[] = {
|
2019-05-02 02:48:15 +08:00
|
|
|
{"help", CmdHelp, AlwaysAvailable, "this help"},
|
2019-05-02 06:02:38 +08:00
|
|
|
{"demod", CmdHIDDemod, AlwaysAvailable, "demodulate HID Prox tag from the GraphBuffer"},
|
|
|
|
{"read", CmdHIDRead, IfPm3Lf, "attempt to read and extract tag data"},
|
2019-10-16 16:32:50 +08:00
|
|
|
{"clone", CmdHIDClone, IfPm3Lf, "clone HID tag to T55x7"},
|
2019-05-02 06:02:38 +08:00
|
|
|
{"sim", CmdHIDSim, IfPm3Lf, "simulate HID tag"},
|
|
|
|
{"brute", CmdHIDBrute, IfPm3Lf, "bruteforce card number against reader"},
|
2019-09-19 19:46:38 +08:00
|
|
|
{"watch", CmdHIDWatch, IfPm3Lf, "continuously watch for cards. Reader mode"},
|
2019-05-02 02:48:15 +08:00
|
|
|
{NULL, NULL, NULL, 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
|
|
|
};
|
|
|
|
|
2019-04-12 07:55:25 +08:00
|
|
|
static int CmdHelp(const char *Cmd) {
|
|
|
|
(void)Cmd; // Cmd is not used so far
|
|
|
|
CmdsHelp(CommandTable);
|
2019-05-22 22:10:48 +08:00
|
|
|
return PM3_SUCCESS;
|
2019-04-12 07:55:25 +08:00
|
|
|
}
|
|
|
|
|
2019-03-10 18:20:22 +08:00
|
|
|
int CmdLFHID(const char *Cmd) {
|
2019-03-10 06:35:06 +08:00
|
|
|
clearCommandBuffer();
|
2019-04-19 06:47:51 +08:00
|
|
|
return CmdsParse(CommandTable, Cmd);
|
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
|
|
|
}
|