mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 01:36:52 +08:00
style
This commit is contained in:
parent
a2c70e5481
commit
4929b16bf9
1 changed files with 12 additions and 13 deletions
|
@ -144,20 +144,19 @@ static uint16_t printHexLine(uint16_t tracepos, uint16_t traceLen, uint8_t *trac
|
|||
}
|
||||
|
||||
switch (protocol) {
|
||||
case ISO_14443A:
|
||||
{
|
||||
case ISO_14443A: {
|
||||
/* https://www.kaiser.cx/pcap-iso14443.html defines a pseudo header:
|
||||
* version (currently 0x00), event (Rdr: 0xfe, Tag: 0xff), length (2 bytes)
|
||||
* to convert to pcap(ng) via text2pcap or to import into Wireshark
|
||||
* we use format timestamp, newline, offset (0x000000), pseudo header, data
|
||||
* `text2pcap -t "%S." -l 264 -n <input-text-file> <output-pcapng-file>`
|
||||
*/
|
||||
char line[(data_len *3) + 1];
|
||||
char line[(data_len * 3) + 1];
|
||||
char *ptr = &line[0];
|
||||
|
||||
for (int j = 0; j < data_len ; j++) {
|
||||
ptr += sprintf (ptr, "%02x", frame[j]);
|
||||
ptr += sprintf (ptr, " ");
|
||||
ptr += sprintf(ptr, "%02x", frame[j]);
|
||||
ptr += sprintf(ptr, " ");
|
||||
}
|
||||
|
||||
char data_len_str[5];
|
||||
|
|
Loading…
Reference in a new issue