ADD: Added the HitagS from @spenneb ref:https://events.ccc.de/congress/2015/Fahrplan/events/7166.html
PM3 Master PR: https://github.com/Proxmark/proxmark3/pull/167 Adjusted the ENUM names to fit in my fork. We need a better namestandard for it.
This commit is contained in:
@@ -15,7 +15,7 @@ APP_CFLAGS = -DWITH_ISO14443a_StandAlone -DWITH_LF -DWITH_ISO15693 -DWITH_ISO144
|
||||
#-DWITH_LCD
|
||||
|
||||
#SRC_LCD = fonts.c LCD.c
|
||||
SRC_LF = lfops.c hitag2.c lfsampling.c pcf7931.c lfdemod.c protocols.c
|
||||
SRC_LF = lfops.c hitag2.c hitagS.c lfsampling.c pcf7931.c lfdemod.c protocols.c
|
||||
SRC_ISO15693 = iso15693.c iso15693tools.c
|
||||
SRC_ISO14443a = epa.c iso14443a.c mifareutil.c mifarecmd.c mifaresniff.c
|
||||
SRC_ISO14443b = iso14443b.c
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "legicrf.h"
|
||||
#include <hitag2.h>
|
||||
#include "hitag2.h"
|
||||
#include "hitagS.h"
|
||||
#include "lfsampling.h"
|
||||
#include "BigBuf.h"
|
||||
#include "mifareutil.h"
|
||||
@@ -996,6 +997,18 @@ void UsbPacketReceived(uint8_t *packet, int len)
|
||||
case CMD_READER_HITAG: // Reader for Hitag tags, args = type and function
|
||||
ReaderHitag((hitag_function)c->arg[0],(hitag_data*)c->d.asBytes);
|
||||
break;
|
||||
case CMD_SIMULATE_HITAG_S:// Simulate Hitag s tag, args = memory content
|
||||
SimulateHitagSTag((bool)c->arg[0],(byte_t*)c->d.asBytes);
|
||||
break;
|
||||
case CMD_TEST_HITAGS_TRACES:// Tests every challenge within the given file
|
||||
check_challenges((bool)c->arg[0],(byte_t*)c->d.asBytes);
|
||||
break;
|
||||
case CMD_READ_HITAG_S://Reader for only Hitag S tags, args = key or challenge
|
||||
ReadHitagS((hitag_function)c->arg[0],(hitag_data*)c->d.asBytes);
|
||||
break;
|
||||
case CMD_WR_HITAG_S://writer for Hitag tags args=data to write,page and key or challenge
|
||||
WritePageHitagS((hitag_function)c->arg[0],(hitag_data*)c->d.asBytes,c->arg[2]);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ISO15693
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "fpgaloader.h"
|
||||
#include "usb_cdc.h"
|
||||
#include "hitag2.h"
|
||||
#include "hitagS.h"
|
||||
#include "mifare.h"
|
||||
#include "pcf7931.h"
|
||||
//#include "des.h"
|
||||
@@ -206,6 +207,13 @@ void SnoopHitag(uint32_t type);
|
||||
void SimulateHitagTag(bool tag_mem_supplied, byte_t* data);
|
||||
void ReaderHitag(hitag_function htf, hitag_data* htd);
|
||||
|
||||
//hitagS.h
|
||||
void SimulateHitagSTag(bool tag_mem_supplied, byte_t* data);
|
||||
void ReadHitagS(hitag_function htf, hitag_data* htd);
|
||||
void WritePageHitagS(hitag_function htf, hitag_data* htd,int page);
|
||||
void check_challenges(bool file_given, byte_t* data);
|
||||
|
||||
|
||||
// cmd.h
|
||||
bool cmd_receive(UsbCommand* cmd);
|
||||
bool cmd_send(uint32_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* data, size_t len);
|
||||
|
||||
@@ -1149,7 +1149,7 @@ void ReaderHitag(hitag_function htf, hitag_data* htd) {
|
||||
|
||||
case RHT2F_CRYPTO: {
|
||||
DbpString("Authenticating using key:");
|
||||
memcpy(key,htd->crypto.key,4); //HACK; 4 or 6?? I read both in the code.
|
||||
memcpy(key,htd->crypto.key,6); //HACK; 4 or 6?? I read both in the code.
|
||||
Dbhexdump(6,key,false);
|
||||
blocknr = 0;
|
||||
bQuiet = false;
|
||||
|
||||
2151
armsrc/hitagS.c
Normal file
2151
armsrc/hitagS.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user