mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
Added T55 downlink mode support
This commit is contained in:
@@ -293,6 +293,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
|
||||
- Added `hf fido` `assert` and `make` commands from fido2 protocol (authenticatorMakeCredential and authenticatorGetAssertion) (@merlokk)
|
||||
- Added trailer block decoding to `hf mf rdbl` and `hf mf cgetbl` (@merlokk)
|
||||
- Added `hf mf mad` and `hf mfp mad` MAD decode, check and print commands (@merlokk)
|
||||
- Added T55x7 downlink mode support r <mode> 0 Default, 1 Long Leading 0, 2 Leading 0, 3 1 of 4 and 4 (in some commands) try all.
|
||||
|
||||
### Fixed
|
||||
- Changed driver file proxmark3.inf to support both old and new Product/Vendor IDs (piwi)
|
||||
|
||||
+9
-8
@@ -873,12 +873,13 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
case CMD_T55XX_READ_BLOCK: {
|
||||
struct p {
|
||||
uint32_t password;
|
||||
uint8_t blockno;
|
||||
uint8_t page;
|
||||
bool pwdmode;
|
||||
uint8_t blockno;
|
||||
uint8_t page;
|
||||
bool pwdmode;
|
||||
uint8_t downlink_mode;
|
||||
} PACKED;
|
||||
struct p *payload = (struct p *) packet->data.asBytes;
|
||||
T55xxReadBlock(payload->page, payload->pwdmode, false, payload->blockno, payload->password);
|
||||
T55xxReadBlock(payload->page, payload->pwdmode, false, payload->blockno, payload->password,payload->downlink_mode);
|
||||
break;
|
||||
}
|
||||
case CMD_T55XX_WRITE_BLOCK: {
|
||||
@@ -887,15 +888,15 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
break;
|
||||
}
|
||||
case CMD_T55XX_WAKEUP: {
|
||||
T55xxWakeUp(packet->oldarg[0]);
|
||||
break;
|
||||
T55xxWakeUp(packet->oldarg[0],packet->oldarg[1]);
|
||||
break;
|
||||
}
|
||||
case CMD_T55XX_RESET_READ: {
|
||||
T55xxResetRead();
|
||||
T55xxResetRead(packet->data.asBytes[0]&0xff);
|
||||
break;
|
||||
}
|
||||
case CMD_T55XX_CHKPWDS: {
|
||||
T55xx_ChkPwds();
|
||||
T55xx_ChkPwds(packet->data.asBytes[0]&0xff);
|
||||
break;
|
||||
}
|
||||
case CMD_PCF7931_READ: {
|
||||
|
||||
+6
-5
@@ -102,12 +102,13 @@ void CopyVikingtoT55xx(uint32_t block1, uint32_t block2, uint8_t Q5);
|
||||
void WriteEM410x(uint32_t card, uint32_t id_hi, uint32_t id_lo);
|
||||
void CopyIndala64toT55x7(uint32_t hi, uint32_t lo); // Clone Indala 64-bit tag by UID to T55x7
|
||||
void CopyIndala224toT55x7(uint32_t uid1, uint32_t uid2, uint32_t uid3, uint32_t uid4, uint32_t uid5, uint32_t uid6, uint32_t uid7); // Clone Indala 224-bit tag by UID to T55x7
|
||||
void T55xxResetRead(void);
|
||||
void T55xxResetRead(uint8_t flags);
|
||||
//id T55xxWriteBlock(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags);
|
||||
void T55xxWriteBlock(uint8_t *data);
|
||||
void T55xxWriteBlockExt(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags);
|
||||
void T55xxReadBlock(uint8_t page, bool pwd_mode, bool brute_mem, uint8_t block, uint32_t pwd);
|
||||
void T55xxWakeUp(uint32_t Pwd);
|
||||
void T55xx_ChkPwds(void);
|
||||
// void T55xxWriteBlockExt(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags);
|
||||
void T55xxReadBlock(uint8_t page, bool pwd_mode, bool brute_mem, uint8_t block, uint32_t pwd,uint8_t downlink_mode);
|
||||
void T55xxWakeUp(uint32_t Pwd, uint8_t flags);
|
||||
void T55xx_ChkPwds(uint8_t flags);
|
||||
|
||||
void TurnReadLFOn(uint32_t delay);
|
||||
|
||||
|
||||
+474
-200
File diff suppressed because it is too large
Load Diff
+491
-193
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -148,9 +148,9 @@ char *GetModelStrFromCID(uint32_t cid);
|
||||
char *GetSelectedModulationStr(uint8_t id);
|
||||
void printT5xxHeader(uint8_t page);
|
||||
void printT55xxBlock(uint8_t blockNum);
|
||||
int printConfiguration(t55xx_conf_block_t b);
|
||||
int printConfiguration(t55xx_conf_block_t b);
|
||||
|
||||
int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, bool override, uint32_t password);
|
||||
int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode);
|
||||
bool GetT55xxBlockData(uint32_t *blockdata);
|
||||
bool DecodeT55xxBlock(void);
|
||||
bool tryDetectModulation(void);
|
||||
@@ -158,9 +158,9 @@ bool testKnownConfigBlock(uint32_t block0);
|
||||
|
||||
bool tryDetectP1(bool getData);
|
||||
bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);
|
||||
int special(const char *Cmd);
|
||||
bool AquireData(uint8_t page, uint8_t block, bool pwdmode, uint32_t password);
|
||||
int tryOnePassword(uint32_t password);
|
||||
int special(const char *Cmd);
|
||||
bool AquireData(uint8_t page, uint8_t block, bool pwdmode, uint32_t password, uint8_t downlink_mode);
|
||||
uint8_t tryOnePassword(uint32_t password, uint8_t downlink_mode);
|
||||
|
||||
void printT55x7Trace(t55x7_tracedata_t data, uint8_t repeat);
|
||||
void printT5555Trace(t5555_tracedata_t data, uint8_t repeat);
|
||||
|
||||
+3
-3
@@ -903,7 +903,7 @@ static int l_T55xx_readblock(lua_State *L) {
|
||||
// try reading the config block and verify that PWD bit is set before doing this!
|
||||
if (!override) {
|
||||
|
||||
if (!AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, false, 0)) {
|
||||
if (!AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, false, 0,0)) {
|
||||
return returnToLuaWithError(L, "Failed to read config block");
|
||||
}
|
||||
|
||||
@@ -920,7 +920,7 @@ static int l_T55xx_readblock(lua_State *L) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!AquireData(usepage1, block, usepwd, password)) {
|
||||
if (!AquireData(usepage1, block, usepwd, password,0)) {
|
||||
return returnToLuaWithError(L, "Failed to aquire data from card");
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ static int l_T55xx_detect(lua_State *L) {
|
||||
|
||||
if (!useGB) {
|
||||
|
||||
isok = AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, usepwd, password);
|
||||
isok = AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, usepwd, password,0);
|
||||
if (isok == false) {
|
||||
return returnToLuaWithError(L, "Failed to aquire LF signal data");
|
||||
}
|
||||
|
||||
+28
-1
@@ -119,7 +119,7 @@ typedef struct {
|
||||
int divisor;
|
||||
int trigger_threshold;
|
||||
} sample_config;
|
||||
|
||||
/*
|
||||
typedef struct {
|
||||
uint16_t start_gap;
|
||||
uint16_t write_gap;
|
||||
@@ -127,7 +127,34 @@ typedef struct {
|
||||
uint16_t write_1;
|
||||
uint16_t read_gap;
|
||||
} t55xx_config;
|
||||
*/
|
||||
|
||||
// Extended to support 1 of 4 timing
|
||||
typedef struct {
|
||||
uint8_t start_gap ;
|
||||
uint8_t write_gap ;
|
||||
uint8_t write_0 ;
|
||||
uint8_t write_1 ;
|
||||
uint8_t write_2 ;
|
||||
uint8_t write_3 ;
|
||||
uint8_t read_gap ;
|
||||
} t55xx_config_t;
|
||||
// This setup will allow for the 4 downlink modes "m" as well as other items if needed.
|
||||
// Given the one struct we can then read/write to flash/client in one go.
|
||||
typedef struct {
|
||||
t55xx_config_t m[4]; // mode
|
||||
} t55xx_config;
|
||||
|
||||
/*typedef struct {
|
||||
uint16_t start_gap [4];
|
||||
uint16_t write_gap [4];
|
||||
uint16_t write_0 [4];
|
||||
uint16_t write_1 [4];
|
||||
uint16_t write_2 [4];
|
||||
uint16_t write_3 [4];
|
||||
uint16_t read_gap [4];
|
||||
} t55xx_config;
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t version;
|
||||
uint32_t baudrate;
|
||||
|
||||
Reference in New Issue
Block a user