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.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Low frequency HID commands
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
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 <stdio.h>
|
2013-03-01 01:04:23 +08:00
|
|
|
#include <string.h>
|
2012-12-05 07:39:18 +08:00
|
|
|
#include "proxmark3.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 "ui.h"
|
|
|
|
#include "graph.h"
|
|
|
|
#include "cmdparser.h"
|
|
|
|
#include "cmdlfhid.h"
|
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
|
|
|
#include "util.h"
|
|
|
|
#include "cmdmain.h"
|
2016-01-13 07:16:11 +08:00
|
|
|
#include "sleep.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
|
|
|
|
|
|
|
static int CmdHelp(const char *Cmd);
|
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
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
int usage_lf_hid_wiegand(void){
|
|
|
|
PrintAndLog("Usage: lf hid wiegand [h] [oem] [FacilityCode] [cardnumber]");
|
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
|
|
|
PrintAndLog("This command converts FC/Cardnum to wiegand code");
|
|
|
|
PrintAndLog("Options:");
|
|
|
|
PrintAndLog(" h - This help");
|
|
|
|
PrintAndLog(" oem - Oem number");
|
|
|
|
PrintAndLog(" facilitynum - Facility number");
|
|
|
|
PrintAndLog(" cardnum - Card number");
|
|
|
|
PrintAndLog("Examples:");
|
2016-01-13 07:16:11 +08:00
|
|
|
PrintAndLog(" lf hid wiegand 0 101 2001");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
int usage_lf_hid_brute(void){
|
|
|
|
PrintAndLog("Enables bruteforce of HID readers with specified facility-code.");
|
|
|
|
PrintAndLog("Different formatlength is supported");
|
|
|
|
PrintAndLog("This is a incremental attack against reader.");
|
|
|
|
PrintAndLog("");
|
|
|
|
PrintAndLog("Usage: lf hid brute <formatlength> <Facility-Code>");
|
|
|
|
PrintAndLog("Options :");
|
2016-02-17 04:11:17 +08:00
|
|
|
PrintAndLog(" <formatlength> - 26|33|34|35|37|40|44|84");
|
|
|
|
PrintAndLog(" <Facility-Code> - 8-bit value HID facility code");
|
2016-01-13 07:16:11 +08:00
|
|
|
PrintAndLog("");
|
|
|
|
PrintAndLog("Sample : lf hid brute 26 224");
|
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
|
|
|
return 0;
|
|
|
|
}
|
2015-04-05 12:58:57 +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
|
|
|
int CmdHIDDemod(const char *Cmd)
|
|
|
|
{
|
|
|
|
if (GraphTraceLen < 4800) {
|
|
|
|
PrintAndLog("too short; need at least 4800 samples");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
GraphTraceLen = 4800;
|
|
|
|
for (int i = 0; i < GraphTraceLen; ++i) {
|
|
|
|
if (GraphBuffer[i] < 0) {
|
|
|
|
GraphBuffer[i] = 0;
|
|
|
|
} else {
|
|
|
|
GraphBuffer[i] = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RepaintGraphWindow();
|
|
|
|
return 0;
|
|
|
|
}
|
2015-04-05 12:58:57 +08:00
|
|
|
*/
|
2016-01-13 07:16:11 +08:00
|
|
|
int CmdHIDDemodFSK(const char *Cmd) {
|
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
|
|
|
int findone = ( Cmd[0] == '1' ) ? 1 : 0;
|
|
|
|
UsbCommand c = {CMD_HID_DEMOD_FSK, {findone, 0 , 0}};
|
|
|
|
clearCommandBuffer();
|
|
|
|
SendCommand(&c);
|
|
|
|
return 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
|
|
|
}
|
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
int CmdHIDSim(const char *Cmd) {
|
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
|
|
|
unsigned int hi = 0, lo = 0;
|
|
|
|
int n = 0, i = 0;
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
while (sscanf(&Cmd[i++], "%1x", &n ) == 1) {
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (n & 0xf);
|
|
|
|
}
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
PrintAndLog("Emulating tag with ID %x%16x", hi, lo);
|
|
|
|
PrintAndLog("Press pm3-button to abort simulation");
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
UsbCommand c = {CMD_HID_SIM_TAG, {hi, lo, 0}};
|
|
|
|
clearCommandBuffer();
|
|
|
|
SendCommand(&c);
|
|
|
|
return 0;
|
2013-03-13 15:13:19 +08:00
|
|
|
}
|
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
int CmdHIDClone(const char *Cmd) {
|
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
|
|
|
unsigned int hi2 = 0, hi = 0, lo = 0;
|
|
|
|
int n = 0, i = 0;
|
|
|
|
UsbCommand c;
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
if (strchr(Cmd,'l') != 0) {
|
|
|
|
while (sscanf(&Cmd[i++], "%1x", &n ) == 1) {
|
|
|
|
hi2 = (hi2 << 4) | (hi >> 28);
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (n & 0xf);
|
|
|
|
}
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
PrintAndLog("Cloning tag with long ID %x%08x%08x", hi2, hi, lo);
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
c.d.asBytes[0] = 1;
|
|
|
|
} else {
|
|
|
|
while (sscanf(&Cmd[i++], "%1x", &n ) == 1) {
|
|
|
|
hi = (hi << 4) | (lo >> 28);
|
|
|
|
lo = (lo << 4) | (n & 0xf);
|
|
|
|
}
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
PrintAndLog("Cloning tag with ID %x%08x", hi, lo);
|
2013-03-13 15:13:19 +08:00
|
|
|
|
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
|
|
|
hi2 = 0;
|
|
|
|
c.d.asBytes[0] = 0;
|
|
|
|
}
|
2011-10-15 23:15:49 +08:00
|
|
|
|
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
|
|
|
c.cmd = CMD_HID_CLONE_TAG;
|
|
|
|
c.arg[0] = hi2;
|
|
|
|
c.arg[1] = hi;
|
|
|
|
c.arg[2] = lo;
|
|
|
|
|
|
|
|
clearCommandBuffer();
|
|
|
|
SendCommand(&c);
|
|
|
|
return 0;
|
2011-10-15 23:15:49 +08:00
|
|
|
}
|
|
|
|
|
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 void getParity26(uint32_t *hi, uint32_t *lo){
|
|
|
|
uint32_t result = 0;
|
|
|
|
int i;
|
|
|
|
// even parity
|
|
|
|
for (i = 24;i >= 13;i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
// even parity 26th bit
|
|
|
|
*lo |= result << 25;
|
|
|
|
|
|
|
|
// odd parity
|
|
|
|
result = 0;
|
|
|
|
for (i = 12;i >= 1;i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
*lo |= !result;
|
2016-01-13 07:16:11 +08:00
|
|
|
}
|
|
|
|
static void getParity33(uint32_t *hi, uint32_t *lo){
|
|
|
|
|
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 void getParity34(uint32_t *hi, uint32_t *lo){
|
|
|
|
uint32_t result = 0;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
// even parity
|
|
|
|
for (i = 7;i >= 0;i--)
|
|
|
|
result ^= (*hi >> i) & i;
|
|
|
|
for (i = 31;i >= 24;i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
|
|
|
|
*hi |= result << 2;
|
|
|
|
|
|
|
|
// odd parity bit
|
|
|
|
result = 0;
|
|
|
|
for (i = 23;i >= 1;i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
|
|
|
|
*lo |= !result;
|
|
|
|
}
|
2016-01-17 05:58:44 +08:00
|
|
|
static void getParity35(uint32_t *hi, uint32_t *lo){
|
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 void getParity37S(uint32_t *hi,uint32_t *lo){
|
|
|
|
uint32_t result = 0;
|
2016-01-17 05:58:44 +08:00
|
|
|
int i;
|
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
|
|
|
|
|
|
|
// even parity
|
|
|
|
for (i = 4; i >= 0; i--)
|
|
|
|
result ^= (*hi >> i) & 1;
|
|
|
|
|
|
|
|
for (i = 31; i >= 20; i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
|
|
|
|
*hi |= result;
|
|
|
|
|
|
|
|
// odd parity
|
|
|
|
result = 0;
|
|
|
|
for (i = 19; i >= 1; i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
|
|
|
|
*lo |= result;
|
|
|
|
}
|
|
|
|
static void getParity37H(uint32_t *hi, uint32_t *lo){
|
|
|
|
uint32_t result = 0;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
// even parity
|
|
|
|
for (i = 4;i >= 0;i--)
|
|
|
|
result ^= (*hi >> i) & 1;
|
|
|
|
for (i = 31;i >= 20;i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
*hi |= result << 4;
|
|
|
|
|
|
|
|
// odd parity
|
|
|
|
result = 0;
|
|
|
|
for (i = 19;i >= 1;i--)
|
|
|
|
result ^= (*lo >> i) & 1;
|
|
|
|
*lo |= result;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void calc26(uint16_t fc, uint32_t cardno, uint32_t *hi, uint32_t *lo){
|
|
|
|
*lo = ((cardno & 0xFFFF) << 1) | ((fc & 0xFF) << 17) | (1 << 26);
|
|
|
|
*hi = (1 << 5);
|
2016-01-13 07:16:11 +08:00
|
|
|
}
|
|
|
|
static void calc33(uint16_t fc, uint32_t cardno, uint32_t *hi, uint32_t *lo){
|
|
|
|
|
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 void calc34(uint16_t fc, uint32_t cardno, uint32_t *hi, uint32_t *lo){
|
|
|
|
// put card number first bit 1 .. 20 //
|
|
|
|
*lo = ((cardno & 0X000F7FFF) << 1) | ((fc & 0XFFFF) << 17);
|
|
|
|
// set bit format for less than 37 bit format
|
|
|
|
*hi = (1 << 5) | (fc >> 15);
|
|
|
|
}
|
|
|
|
static void calc35(uint16_t fc, uint32_t cardno, uint32_t *hi, uint32_t *lo){
|
|
|
|
*lo = ((cardno & 0xFFFFF) << 1) | fc << 21;
|
|
|
|
*hi = (1 << 5) | ((fc >> 11) & 1);
|
|
|
|
}
|
2016-01-13 07:16:11 +08:00
|
|
|
static void calc37S(uint16_t fc, uint32_t cardno, uint32_t *hi, uint32_t *lo){
|
|
|
|
// FC 2 - 17 - 16 bit
|
|
|
|
// cardno 18 - 36 - 19 bit
|
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
|
|
|
// Even P1 1 - 19
|
|
|
|
// Odd P37 19 - 36
|
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
fc = fc & 0xFFFF;
|
|
|
|
*lo = ((fc << 20) | (cardno & 0x7FFFF) << 1);
|
|
|
|
*hi = (fc >> 12);
|
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
|
|
|
}
|
2016-01-13 07:16:11 +08:00
|
|
|
static void calc37H(uint64_t cardno, uint32_t *hi, uint32_t *lo){
|
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
|
|
|
// SC NONE
|
2016-01-13 07:16:11 +08:00
|
|
|
// cardno 1-35 34 bits
|
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
|
|
|
// Even Parity 0th bit 1-18
|
|
|
|
// Odd Parity 36th bit 19-35
|
2016-01-13 07:16:11 +08:00
|
|
|
cardno = (cardno & 0x00000003FFFFFFFF);
|
|
|
|
*lo = (cardno << 1);
|
|
|
|
*hi = (cardno >> 31);
|
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
|
|
|
}
|
2016-01-13 07:16:11 +08:00
|
|
|
static void calc40(uint64_t cardno, uint32_t *hi, uint32_t *lo){
|
|
|
|
cardno = (cardno & 0xFFFFFFFFFF);
|
|
|
|
*lo = ((cardno & 0xFFFFFFFF) << 1 );
|
|
|
|
*hi = (cardno >> 31);
|
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
|
|
|
}
|
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
static void calcWiegand(uint8_t fmtlen, uint16_t fc, uint64_t cardno, uint32_t *hi, uint32_t *lo){
|
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
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
uint32_t cn = (cardno & 0xFFFFFFFF);
|
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
|
|
|
switch ( fmtlen ) {
|
2016-01-13 07:16:11 +08:00
|
|
|
case 26 : {
|
|
|
|
calc26(fc, cn, hi, lo);
|
|
|
|
getParity26(hi, lo);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 33 : {
|
|
|
|
calc33(fc, cn, hi, lo);
|
|
|
|
getParity33(hi, lo);
|
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
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 34 : {
|
2016-01-13 07:16:11 +08:00
|
|
|
calc34(fc, cn, hi, lo);
|
|
|
|
getParity34(hi, lo);
|
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
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 35 : {
|
2016-01-13 07:16:11 +08:00
|
|
|
calc35(fc, cn, hi, lo);
|
|
|
|
getParity35(hi, lo);
|
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
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 37 : {
|
2016-01-13 07:16:11 +08:00
|
|
|
calc37S(fc, cn, hi, lo);
|
|
|
|
getParity37S(hi, lo);
|
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
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 38 : {
|
2016-01-13 07:16:11 +08:00
|
|
|
calc37H(cn, hi, lo);
|
|
|
|
getParity37H(hi, lo);
|
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
|
|
|
break;
|
|
|
|
}
|
2016-01-13 07:16:11 +08:00
|
|
|
case 40 : calc40(cardno, hi, lo); break;
|
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
|
|
|
case 44 : { break; }
|
|
|
|
case 84 : { break; }
|
|
|
|
}
|
2016-01-13 07:16:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int CmdHIDWiegand(const char *Cmd) {
|
|
|
|
uint32_t oem;
|
|
|
|
uint32_t fc, lo = 0, hi = 0;
|
|
|
|
uint64_t cardnum = 0;
|
|
|
|
|
|
|
|
uint8_t ctmp = param_getchar(Cmd, 0);
|
2016-01-17 05:58:44 +08:00
|
|
|
if ( strlen(Cmd) == 0 || strlen(Cmd) < 3 || ctmp == 'H' || ctmp == 'h' ) return usage_lf_hid_wiegand();
|
2016-01-13 07:16:11 +08:00
|
|
|
|
|
|
|
oem = param_get8(Cmd, 0);
|
|
|
|
fc = param_get32ex(Cmd, 1, 0, 10);
|
|
|
|
cardnum = param_get64ex(Cmd, 2, 0, 10);
|
|
|
|
|
|
|
|
uint8_t ftmlen[] = {26,33,34,35,37,38,40};
|
|
|
|
for (uint8_t i = 0; i < sizeof(ftmlen); i++){
|
|
|
|
calcWiegand( ftmlen[i], fc, cardnum, &hi, &lo);
|
|
|
|
PrintAndLog("HID %d bit | FC: %d CN: %llu | Wiegand Code: %08X%08X", ftmlen[i], fc, cardnum, hi, lo);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CmdHIDBrute(const char *Cmd){
|
|
|
|
|
2016-01-17 05:58:44 +08:00
|
|
|
bool error = TRUE;
|
2016-01-13 07:16:11 +08:00
|
|
|
uint8_t fc = 0, fmtlen = 0;
|
|
|
|
uint32_t hi = 0, lo = 0;
|
|
|
|
|
|
|
|
UsbCommand c = {CMD_HID_SIM_TAG, {0, 0, 0}};
|
|
|
|
|
|
|
|
char cmdp = param_getchar(Cmd, 0);
|
|
|
|
if (strlen(Cmd) > 2 || strlen(Cmd) == 0 || cmdp == 'h' || cmdp == 'H') return usage_lf_hid_brute();
|
|
|
|
|
|
|
|
fmtlen = param_get8(Cmd, 0);
|
2016-01-17 05:58:44 +08:00
|
|
|
uint8_t ftms[] = {26,33,34,35,37};
|
|
|
|
for ( uint8_t i = 0; i < sizeof(ftms); i++){
|
|
|
|
if ( ftms[i] == fmtlen ) {
|
2016-01-13 07:16:11 +08:00
|
|
|
error = FALSE;
|
|
|
|
}
|
|
|
|
}
|
2016-01-17 05:58:44 +08:00
|
|
|
|
2016-01-13 07:16:11 +08:00
|
|
|
if ( error ) return usage_lf_hid_brute();
|
|
|
|
|
|
|
|
fc = param_get8(Cmd, 1);
|
|
|
|
if ( fc == 0) return usage_lf_hid_brute();
|
|
|
|
|
|
|
|
PrintAndLog("Bruteforceing HID Reader");
|
|
|
|
PrintAndLog("Press pm3-button to abort simulation or run another command");
|
|
|
|
|
|
|
|
for ( uint16_t cn = 1; cn < 0xFFFF; ++cn){
|
|
|
|
if (ukbhit()) {
|
|
|
|
PrintAndLog("aborted via keyboard!");
|
|
|
|
c.cmd = CMD_PING;
|
|
|
|
c.arg[0] = 0x00;
|
|
|
|
c.arg[1] = 0x00;
|
|
|
|
c.arg[2] = 0x00;
|
|
|
|
clearCommandBuffer();
|
|
|
|
SendCommand(&c);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
calcWiegand( fmtlen, fc, cn, &hi, &lo);
|
|
|
|
|
|
|
|
c.arg[0] = hi;
|
|
|
|
c.arg[1] = lo;
|
|
|
|
clearCommandBuffer();
|
|
|
|
SendCommand(&c);
|
|
|
|
|
|
|
|
PrintAndLog("Trying FC: %u; CN: %u", fc, cn);
|
|
|
|
// pause
|
|
|
|
sleep(1);
|
|
|
|
}
|
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
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static command_t CommandTable[] = {
|
2016-02-17 04:11:17 +08:00
|
|
|
{"help", CmdHelp, 1, "This help"},
|
|
|
|
//{"demod", CmdHIDDemod, 1, "Demodulate HID Prox Card II (not optimal)"},
|
|
|
|
{"fskdemod",CmdHIDDemodFSK, 0, "['1'] Realtime HID FSK demodulator (option '1' for one tag only)"},
|
|
|
|
{"sim", CmdHIDSim, 0, "<ID> -- HID tag simulator"},
|
|
|
|
{"clone", CmdHIDClone, 0, "<ID> ['l'] -- Clone HID to T55x7 (tag must be in antenna)(option 'l' for 84bit ID)"},
|
|
|
|
{"wiegand", CmdHIDWiegand, 0, "<oem> <fc> <cardnum> -- convert facilitycode, cardnumber to Wiegand code"},
|
|
|
|
{"brute", CmdHIDBrute, 0, "<formatlength> <Facility-Code> -- bruteforce card number"},
|
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
|
|
|
{NULL, NULL, 0, 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
|
|
|
};
|
|
|
|
|
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
|
|
|
int CmdLFHID(const char *Cmd) {
|
2016-02-14 22:24:11 +08:00
|
|
|
clearCommandBuffer();
|
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
|
|
|
CmdsParse(CommandTable, Cmd);
|
|
|
|
return 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
|
|
|
}
|
|
|
|
|
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
|
|
|
int CmdHelp(const char *Cmd) {
|
|
|
|
CmdsHelp(CommandTable);
|
|
|
|
return 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
|
|
|
}
|