CHG: 'lf t55xx wipe c' - now accepts user provided configuration block to configure a wiped tag with.

ADD: 'lf t55xx protect' -  Sets password and enables password protection in configuration block.   It tries to validate its writes aswell.

Samples:
lf t55xx protect n 11223344            - set pwd to 11223344
lf t55xx protect n 01020304 p 11223344 - change a password protected tag from 11223344 to 01020304

To remove the password protection, you need to remember the password :)
lf t55xx wipe p 11223344               - wipes whole tag, removes password protection bits.
This commit is contained in:
iceman1001
2019-09-14 18:27:58 +02:00
parent c3bdf3e70f
commit da197e1999
2 changed files with 343 additions and 137 deletions

View File

@@ -13,6 +13,7 @@
#include "common.h"
#define T55x7_CONFIGURATION_BLOCK 0x00
#define T55x7_PWD_BLOCK 0x07
#define T55x7_TRACE_BLOCK1 0x01
#define T55x7_TRACE_BLOCK2 0x02
#define T55x7_PAGE0 0x00
@@ -142,7 +143,12 @@ void printT5xxHeader(uint8_t page);
void printT55xxBlock(uint8_t blockNum);
int printConfiguration(t55xx_conf_block_t b);
int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode);
bool t55xxVerifyWrite( uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode, uint32_t data);
int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode);
int T55xxReadBlockEx(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode, bool verbose);
int t55xxWrite(uint8_t block, bool page1, bool usepwd, bool testMode, uint32_t password, uint8_t downlink_mode, uint32_t data);
bool GetT55xxBlockData(uint32_t *blockdata);
bool DecodeT55xxBlock(void);
bool tryDetectModulation(uint8_t downlink_mode, bool print_config);