make style

This commit is contained in:
merlokk 2022-06-28 11:45:48 +03:00
commit 67fc919c72
5 changed files with 100 additions and 74 deletions

View file

@ -177,14 +177,11 @@ static uint8_t TexcomTK13CRC(uint8_t* data) {
return crc; return crc;
} }
static unsigned char dallas_crc8(const unsigned char * data, const unsigned int size) static unsigned char dallas_crc8(const unsigned char *data, const unsigned int size) {
{
unsigned char crc = 0; unsigned char crc = 0;
for ( unsigned int i = 0; i < size; ++i ) for (unsigned int i = 0; i < size; ++i) {
{
unsigned char inbyte = data[i]; unsigned char inbyte = data[i];
for ( unsigned char j = 0; j < 8; ++j ) for (unsigned char j = 0; j < 8; ++j) {
{
unsigned char mix = (crc ^ inbyte) & 0x01; unsigned char mix = (crc ^ inbyte) & 0x01;
crc >>= 1; crc >>= 1;
if (mix) crc ^= 0x8C; if (mix) crc ^= 0x8C;
@ -359,7 +356,6 @@ static bool TexcomTK17Decode(uint32_t* implengths, uint32_t implengthslen, char*
return (strlen(bitstring) == 64) && (strncmp(cbitstring, "1111111111111111", 16) == 0); return (strlen(bitstring) == 64) && (strncmp(cbitstring, "1111111111111111", 16) == 0);
} }
static bool TexcomGeneralDecode(uint32_t *implengths, uint32_t implengthslen, char *bitstring, bool verbose) { static bool TexcomGeneralDecode(uint32_t *implengths, uint32_t implengthslen, char *bitstring, bool verbose) {
uint32_t hilength = 0; uint32_t hilength = 0;
uint32_t lowlength = 0; uint32_t lowlength = 0;
@ -400,7 +396,6 @@ static void TexcomReverseCode(const uint8_t *code, int length, uint8_t *reverse_
} }
}; };
static int CmdHFTexkomReader(const char *Cmd) { static int CmdHFTexkomReader(const char *Cmd) {
CLIParserContext *ctx; CLIParserContext *ctx;
CLIParserInit(&ctx, "hf texkom reader", CLIParserInit(&ctx, "hf texkom reader",

View file

@ -2661,7 +2661,7 @@
}, },
"hf help": { "hf help": {
"command": "hf help", "command": "hf help",
"description": "-------- ----------------------- High Frequency ----------------------- 14a { ISO14443A RFIDs... } 14b { ISO14443B RFIDs... } 15 { ISO15693 RFIDs... } cipurse { Cipurse transport Cards... } epa { German Identification Card... } emrtd { Machine Readable Travel Document... } felica { ISO18092 / FeliCa RFIDs... } fido { FIDO and FIDO2 authenticators... } gallagher { Gallagher DESFire RFIDs... } ksx6924 { KS X 6924 (T-Money, Snapper+) RFIDs } jooki { Jooki RFIDs... } iclass { ICLASS RFIDs... } legic { LEGIC RFIDs... } lto { LTO Cartridge Memory RFIDs... } mf { MIFARE RFIDs... } mfp { MIFARE Plus RFIDs... } mfu { MIFARE Ultralight RFIDs... } mfdes { MIFARE Desfire RFIDs... } ntag424 { NXP NTAG 4242 DNA RFIDs... } seos { SEOS RFIDs... } st25ta { ST25TA RFIDs... } thinfilm { Thinfilm RFIDs... } topaz { TOPAZ (NFC Type 1) RFIDs... } waveshare { Waveshare NFC ePaper... } ----------- --------------------- General --------------------- help This help list List protocol data in trace buffer search Search for known HF tags", "description": "-------- ----------------------- High Frequency ----------------------- 14a { ISO14443A RFIDs... } 14b { ISO14443B RFIDs... } 15 { ISO15693 RFIDs... } cipurse { Cipurse transport Cards... } epa { German Identification Card... } emrtd { Machine Readable Travel Document... } felica { ISO18092 / FeliCa RFIDs... } fido { FIDO and FIDO2 authenticators... } gallagher { Gallagher DESFire RFIDs... } ksx6924 { KS X 6924 (T-Money, Snapper+) RFIDs } jooki { Jooki RFIDs... } iclass { ICLASS RFIDs... } legic { LEGIC RFIDs... } lto { LTO Cartridge Memory RFIDs... } mf { MIFARE RFIDs... } mfp { MIFARE Plus RFIDs... } mfu { MIFARE Ultralight RFIDs... } mfdes { MIFARE Desfire RFIDs... } ntag424 { NXP NTAG 4242 DNA RFIDs... } seos { SEOS RFIDs... } st25ta { ST25TA RFIDs... } thinfilm { Thinfilm RFIDs... } topaz { TOPAZ (NFC Type 1) RFIDs... } texkom { Texkom RFIDs... } waveshare { Waveshare NFC ePaper... } ----------- --------------------- General --------------------- help This help list List protocol data in trace buffer search Search for known HF tags",
"notes": [], "notes": [],
"offline": true, "offline": true,
"options": [], "options": [],
@ -6302,6 +6302,27 @@
], ],
"usage": "hf st25ta sim [-h] -u <hex>" "usage": "hf st25ta sim [-h] -u <hex>"
}, },
"hf texkom help": {
"command": "hf texkom help",
"description": "help This help",
"notes": [],
"offline": true,
"options": [],
"usage": ""
},
"hf texkom reader": {
"command": "hf texkom reader",
"description": "Read a texkom tag",
"notes": [
"hf texkom reader"
],
"offline": false,
"options": [
"-h, --help This help",
"-v, --verbose Verbose scan and output"
],
"usage": "hf texkom reader [-hv]"
},
"hf thinfilm help": { "hf thinfilm help": {
"command": "hf thinfilm help", "command": "hf thinfilm help",
"description": "help This help list List NFC Barcode / Thinfilm history - not correct", "description": "help This help list List NFC Barcode / Thinfilm history - not correct",
@ -6528,8 +6549,8 @@
"command": "hw connect", "command": "hw connect",
"description": "Connects to a Proxmark3 device via specified serial port. Baudrate here is only for physical UART or UART-BT, NOT for USB-CDC or blue shark add-on", "description": "Connects to a Proxmark3 device via specified serial port. Baudrate here is only for physical UART or UART-BT, NOT for USB-CDC or blue shark add-on",
"notes": [ "notes": [
"hw connect -p /dev/ttyACM0", "hw connect -p /dev/ttyacm0",
"hw connect -p /dev/ttyACM0 -b 115200" "hw connect -p /dev/ttyacm0 -b 115200"
], ],
"offline": true, "offline": true,
"options": [ "options": [
@ -10998,8 +11019,8 @@
} }
}, },
"metadata": { "metadata": {
"commands_extracted": 693, "commands_extracted": 695,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2022-06-12T09:54:12" "extracted_on": "2022-06-28T08:43:20"
} }
} }

View file

@ -646,6 +646,16 @@ Check column "offline" for their availability.
|`hf topaz raw `|N |`Send raw hex data to tag` |`hf topaz raw `|N |`Send raw hex data to tag`
### hf texkom
{ Texkom RFIDs... }
|command |offline |description
|------- |------- |-----------
|`hf texkom help `|Y |`This help`
|`hf texkom reader `|N |`Act like a Texkom reader`
### hf waveshare ### hf waveshare
{ Waveshare NFC ePaper... } { Waveshare NFC ePaper... }