mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
make style
This commit is contained in:
parent
385d754fc3
commit
7ed8f08e09
4 changed files with 31 additions and 9 deletions
|
@ -101,7 +101,7 @@ static void EncodeInit(void) {
|
||||||
encode_indx = 0;
|
encode_indx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EncodeAddBit(uint8_t* data, uint8_t bit, uint8_t bit_count) {
|
static void EncodeAddBit(uint8_t *data, uint8_t bit, uint8_t bit_count) {
|
||||||
for (int i = 0; i < bit_count; i++) {
|
for (int i = 0; i < bit_count; i++) {
|
||||||
encode_acc = (encode_acc << 1) | (bit & 0x01);
|
encode_acc = (encode_acc << 1) | (bit & 0x01);
|
||||||
encode_acc_bit_count++;
|
encode_acc_bit_count++;
|
||||||
|
@ -113,7 +113,7 @@ static void EncodeAddBit(uint8_t* data, uint8_t bit, uint8_t bit_count) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t EncodeFinish(uint8_t* data) {
|
static uint32_t EncodeFinish(uint8_t *data) {
|
||||||
if (encode_acc_bit_count > 0) {
|
if (encode_acc_bit_count > 0) {
|
||||||
encode_acc = encode_acc << (8 - encode_acc_bit_count);
|
encode_acc = encode_acc << (8 - encode_acc_bit_count);
|
||||||
data[encode_indx++] = encode_acc;
|
data[encode_indx++] = encode_acc;
|
||||||
|
@ -158,7 +158,7 @@ static uint32_t HfEncodeTkm(uint8_t *uid, uint8_t modulation, uint8_t *data) {
|
||||||
// 0 --- 8 --- 12-15 --- 18-19 --- 26-28 --- 32
|
// 0 --- 8 --- 12-15 --- 18-19 --- 26-28 --- 32
|
||||||
// DO NOT NORMALIZE!!!! it must be with some error like this!!!!
|
// DO NOT NORMALIZE!!!! it must be with some error like this!!!!
|
||||||
// `00` -- 1-25-1-5
|
// `00` -- 1-25-1-5
|
||||||
// `01` -- 1-12-1-18
|
// `01` -- 1-12-1-18
|
||||||
// `10` -- 1-17-1-13
|
// `10` -- 1-17-1-13
|
||||||
// `11` -- 1-7-1-23
|
// `11` -- 1-7-1-23
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ int HfWriteTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout) {
|
||||||
|
|
||||||
LEDsoff();
|
LEDsoff();
|
||||||
|
|
||||||
uint8_t* data = BigBuf_calloc(256);
|
uint8_t *data = BigBuf_calloc(256);
|
||||||
uint32_t elen = HfEncodeTkm(uid, modulation, data);
|
uint32_t elen = HfEncodeTkm(uid, modulation, data);
|
||||||
if (elen == 0) {
|
if (elen == 0) {
|
||||||
DbpString("encode error");
|
DbpString("encode error");
|
||||||
|
|
|
@ -24,4 +24,4 @@
|
||||||
int HfReadADC(uint32_t samplesCount, bool ledcontrol);
|
int HfReadADC(uint32_t samplesCount, bool ledcontrol);
|
||||||
int HfWriteTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout);
|
int HfWriteTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6324,6 +6324,27 @@
|
||||||
],
|
],
|
||||||
"usage": "hf texkom reader [-hv]"
|
"usage": "hf texkom reader [-hv]"
|
||||||
},
|
},
|
||||||
|
"hf texkom sim": {
|
||||||
|
"command": "hf texkom sim",
|
||||||
|
"description": "Simulate a texkom tag",
|
||||||
|
"notes": [
|
||||||
|
"hf texkom sim",
|
||||||
|
"",
|
||||||
|
"hf texkom sim --raw FFFF638C7DC45553 -> simulate TK13 tag with id 8C7DC455",
|
||||||
|
"hf texkom sim --tk17 --raw FFFFCA17F31EC512 -> simulate TK17 tag with id 17F31EC5",
|
||||||
|
"hf texkom sim --id 8C7DC455 -> simulate TK13 tag with id 8C7DC455",
|
||||||
|
"hf texkom sim --id 8C7DC455 --tk17 -> simulate TK17 tag with id 17F31EC5"
|
||||||
|
],
|
||||||
|
"offline": false,
|
||||||
|
"options": [
|
||||||
|
"-h, --help This help",
|
||||||
|
"-v, --verbose Verbose work",
|
||||||
|
"-t, --tk17 Use TK-17 modulation (TK-13 by default)",
|
||||||
|
"--raw <hex 8 bytes> Raw data for texkom card, 8 bytes. Manual modulation select.",
|
||||||
|
"--id <hex 4 bytes> Raw data for texkom card, 8 bytes. Manual modulation select."
|
||||||
|
],
|
||||||
|
"usage": "hf texkom sim [-hvt] [--raw <hex 8 bytes>] [--id <hex 4 bytes>]"
|
||||||
|
},
|
||||||
"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",
|
||||||
|
@ -6585,8 +6606,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": [
|
||||||
|
@ -11055,8 +11076,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 698,
|
"commands_extracted": 699,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2022-06-30T19:19:33"
|
"extracted_on": "2022-07-03T21:31:15"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -654,6 +654,7 @@ Check column "offline" for their availability.
|
||||||
|------- |------- |-----------
|
|------- |------- |-----------
|
||||||
|`hf texkom help `|Y |`This help`
|
|`hf texkom help `|Y |`This help`
|
||||||
|`hf texkom reader `|N |`Act like a Texkom reader`
|
|`hf texkom reader `|N |`Act like a Texkom reader`
|
||||||
|
|`hf texkom sim `|N |`Simulate a Texkom tag`
|
||||||
|
|
||||||
|
|
||||||
### hf xerox
|
### hf xerox
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue