Merge pull request #1486 from merlokk/mst

make style
This commit is contained in:
Oleg Moiseenko 2021-08-25 14:48:39 +03:00 committed by GitHub
commit 680fb12250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 3972 additions and 4091 deletions

View file

@ -19,11 +19,11 @@ void hf_field_off(void);
int tearoff_hook(void);
#if defined RDV4 || defined ICOPYX
// ADC Vref = 3300mV, and an (10000k+240k):240k voltage divider on the LF input can measure voltages up to 140800 mV
#define MAX_ADC_HF_VOLTAGE 140800
// ADC Vref = 3300mV, and an (10000k+240k):240k voltage divider on the LF input can measure voltages up to 140800 mV
#define MAX_ADC_HF_VOLTAGE 140800
#else
// ADC Vref = 3300mV, and an (10M+1M):1M voltage divider on the HF input can measure voltages up to 36300 mV
#define MAX_ADC_HF_VOLTAGE 36300
// ADC Vref = 3300mV, and an (10M+1M):1M voltage divider on the HF input can measure voltages up to 36300 mV
#define MAX_ADC_HF_VOLTAGE 36300
#endif
// ADC Vref = 3300mV, (240k-10M):240k voltage divider, 140800 mV
#define MAX_ADC_LF_VOLTAGE 140800

View file

@ -444,8 +444,7 @@ static bool FpgaConfCurrentMode(int bitstream_version) {
if (bitstream_version == FPGA_BITSTREAM_LF) {
LOW(GPIO_FPGA_SWITCH);
}
else {
} else {
HIGH(GPIO_FPGA_SWITCH);
}
// update downloaded_bitstream

View file

@ -164,7 +164,7 @@ uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n) {
int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
if ((gs_ntag_i2c_state == 1) && (cmdsize == 6) && (memcmp(cmd+1, "\x00\x00\x00", 3) == 0)) {
if ((gs_ntag_i2c_state == 1) && (cmdsize == 6) && (memcmp(cmd + 1, "\x00\x00\x00", 3) == 0)) {
snprintf(exp, size, "SECTOR(%d)", cmd[0]);
gs_ntag_i2c_state = 0;
return 1;
@ -250,8 +250,7 @@ int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
gs_ntag_i2c_state = 1;
} else {
snprintf(exp, size, "RESTORE(%d)", cmd[1]);
}
else
} else
return 0;
break;
case MIFARE_CMD_TRANSFER:

View file

@ -638,7 +638,7 @@ static int ndefDecodePayload(NDEFHeader_t *ndef) {
break;
}
char *begin = calloc(ndef->TypeLen + 1,sizeof(char));
char *begin = calloc(ndef->TypeLen + 1, sizeof(char));
memcpy(begin, ndef->Type, ndef->TypeLen);
str_lower(begin);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -378,9 +378,9 @@ char *sprint_bytebits_bin(const uint8_t *data, const size_t len) {
}
char *sprint_bin(const uint8_t *data, const size_t len) {
size_t binlen = (len*8 > MAX_BIN_BREAK_LENGTH) ? MAX_BIN_BREAK_LENGTH : len*8;
size_t binlen = (len * 8 > MAX_BIN_BREAK_LENGTH) ? MAX_BIN_BREAK_LENGTH : len * 8;
static uint8_t buf[MAX_BIN_BREAK_LENGTH];
bytes_to_bytebits(data, binlen/8, buf);
bytes_to_bytebits(data, binlen / 8, buf);
return sprint_bytebits_bin_break(buf, binlen, 0);
}

View file

@ -13,9 +13,9 @@
#define FPGA_BITSTREAM_FIXED_HEADER_SIZE sizeof(bitparse_fixed_header)
#define FPGA_INTERLEAVE_SIZE 288
#if defined XC3
#define FPGA_CONFIG_SIZE 72864L // our current fpga_[lh]f.bit files are 72742 bytes. Rounded up to next multiple of FPGA_INTERLEAVE_SIZE
#define FPGA_CONFIG_SIZE 72864L // our current fpga_[lh]f.bit files are 72742 bytes. Rounded up to next multiple of FPGA_INTERLEAVE_SIZE
#else
#define FPGA_CONFIG_SIZE 42336L // our current fpga_[lh]f.bit files are 42175 bytes. Rounded up to next multiple of FPGA_INTERLEAVE_SIZE
#define FPGA_CONFIG_SIZE 42336L // our current fpga_[lh]f.bit files are 42175 bytes. Rounded up to next multiple of FPGA_INTERLEAVE_SIZE
#endif
#define FPGA_RING_BUFFER_BYTES (1024 * 39)
#define FPGA_TRACE_SIZE 3072

View file

@ -973,7 +973,7 @@
},
"help": {
"command": "help",
"description": "help use `<command> help` for details of a command prefs { edit client/device preferences... } -------- ----------------------- technology ----------------------- analyse { analyse utils... } data { plot window / data buffer manipulation... } emv { emv iso-14443 / iso-7816... } hf { high frequency commands... } hw { hardware commands... } lf { low frequency commands... } nfc { nfc commands... } reveng { crc calculations from reveng software... } smart { smart card iso-7816 commands... } script { scripting commands... } trace { trace manipulation... } wiegand { wiegand format manipulation... } -------- ----------------------- general ----------------------- clear clear screen hints turn hints on / off msleep add a pause in milliseconds rem add a text line in log file quit exit exit program [=] session log e:\\proxspace\\pm3/.proxmark3/logs/log_20210821.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save",
"description": "help use `<command> help` for details of a command prefs { edit client/device preferences... } -------- ----------------------- technology ----------------------- analyse { analyse utils... } data { plot window / data buffer manipulation... } emv { emv iso-14443 / iso-7816... } hf { high frequency commands... } hw { hardware commands... } lf { low frequency commands... } nfc { nfc commands... } reveng { crc calculations from reveng software... } smart { smart card iso-7816 commands... } script { scripting commands... } trace { trace manipulation... } wiegand { wiegand format manipulation... } -------- ----------------------- general ----------------------- clear clear screen hints turn hints on / off msleep add a pause in milliseconds rem add a text line in log file quit exit exit program [=] session log e:\\proxspace\\pm3/.proxmark3/logs/log_20210825.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save",
"notes": [
"auto"
],
@ -3726,9 +3726,10 @@
"--tb target b key",
"--emu fill simulator keys from found keys",
"--dump dump found keys to file",
"--single single sector (defaults to all)"
"--single single sector (defaults to all)",
"--mem use dictionary from flashmemory"
],
"usage": "hf mf nested [-hab] [-k <hex>] [--mini] [--1k] [--2k] [--4k] [--blk <dec>] [--tblk <dec>] [--ta] [--tb] [--emu] [--dump] [--single]"
"usage": "hf mf nested [-hab] [-k <hex>] [--mini] [--1k] [--2k] [--4k] [--blk <dec>] [--tblk <dec>] [--ta] [--tb] [--emu] [--dump] [--single] [--mem]"
},
"hf mf personalize": {
"command": "hf mf personalize",
@ -4438,7 +4439,8 @@
"hf mfdes detect -> detect key 0 from picc level",
"hf mfdes detect -s d40 -> detect key 0 from picc level via secure channel d40",
"hf mfdes detect --dict mfdes_default_keys -> detect key 0 from picc level with help of the standard dictionary",
"hf mfdes detect --aid 123456 -n 2 --save -> detect key 2 from app 123456 and if succeed - save params to defaults (`default` command)"
"hf mfdes detect --aid 123456 -n 2 --save -> detect key 2 from app 123456 and if succeed - save params to defaults (`default` command)",
"hf mfdes detect --appisoid df01 --save -> detect key 0 and save to defaults with card in the lrp mode"
],
"offline": false,
"options": [
@ -4454,10 +4456,11 @@
"-c, --ccset <native/niso/iso> communicaton command set: native/niso/iso",
"-s, --schann <d40/ev1/ev2/lrp> secure channel: d40/ev1/ev2/lrp",
"--aid <app id hex> application id (3 hex bytes, big endian)",
"--appisoid <isoid hex> application iso id (iso df id) (2 hex bytes, big endian).",
"--dict <file> file with keys dictionary",
"--save save found key and parameters to defaults"
],
"usage": "hf mfdes detect [-hav] [-n <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2/lrp>] [--aid <app id hex>] [--dict <file>] [--save]"
"usage": "hf mfdes detect [-hav] [-n <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2/lrp>] [--aid <app id hex>] [--appisoid <isoid hex>] [--dict <file>] [--save]"
},
"hf mfdes dump": {
"command": "hf mfdes dump",
@ -5468,8 +5471,8 @@
"command": "hf mfu sim",
"description": "simulate mifare ultralight family type based upon iso/iec 14443 type a tag with 4,7 or 10 byte uid from emulator memory. see `hf mfu eload` first. see `hf 14a sim -h` to see available types. you want 2 or 7 usually.",
"notes": [
"hf mfu sim -t 2 --uid 1122344556677 -> mifare ultralight",
"hf mfu sim -t 7 --uid 1122344556677 -n 5 -> amiibo (ntag 215), pack 0x8080"
"hf mfu sim -t 2 --uid 11223344556677 -> mifare ultralight",
"hf mfu sim -t 7 --uid 11223344556677 -n 5 -> amiibo (ntag 215), pack 0x8080"
],
"offline": false,
"options": [
@ -7239,7 +7242,7 @@
},
"lf hitag info": {
"command": "lf hitag info",
"description": "sniff traffic between hitag reader and tag.",
"description": "hitag2 tag information",
"notes": [
"lf hitag info"
],
@ -9997,6 +10000,6 @@
"metadata": {
"commands_extracted": 589,
"extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2021-08-21T16:13:04"
"extracted_on": "2021-08-25T11:37:52"
}
}

View file

@ -838,7 +838,7 @@ Check column "offline" for their availability.
|`lf hitag help `|Y |`This help`
|`lf hitag eload `|N |`Load Hitag dump file into emulator memory`
|`lf hitag list `|Y |`List Hitag trace history`
|`lf hitag info `|N |`Tag information`
|`lf hitag info `|N |`Hitag2 tag information`
|`lf hitag reader `|N |`Act like a Hitag reader`
|`lf hitag sim `|N |`Simulate Hitag transponder`
|`lf hitag sniff `|N |`Eavesdrop Hitag communication`

View file

@ -44,9 +44,9 @@
#define GPIO_USB_PU AT91C_PIO_PA24
#define GPIO_RELAY AT91C_PIO_PA25
#if defined XC3
#define GPIO_FPGA_SWITCH AT91C_PIO_PA26
#define GPIO_FPGA_SWITCH AT91C_PIO_PA26
#else
#define GPIO_FPGA_ON AT91C_PIO_PA26
#define GPIO_FPGA_ON AT91C_PIO_PA26
#endif
#define GPIO_FPGA_DONE AT91C_PIO_PA27
#define GPIO_FPGA_NPROGRAM AT91C_PIO_PA28

View file

@ -29,9 +29,9 @@
#define ADC_CHAN_LF 4
#if defined RDV4 || defined ICOPYX
#define ADC_CHAN_HF 7
#define ADC_CHAN_HF 7
#else
#define ADC_CHAN_HF 5
#define ADC_CHAN_HF 5
#endif
#define ADC_MODE_PRESCALE(x) ((x) << 8)
#define ADC_MODE_STARTUP_TIME(x) ((x) << 16)