Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
cHG.. missing
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Jan 29, 2018
1 parent 787d87e commit 29c15b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/mifarehost.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ int saveTraceCard(void) {

// given 4096 tracecard size, these loop will only match a 1024, 1kb card memory
// 4086/16 == 256blocks.
for (int i = 0; i < 256; i++) { // blocks
for (int j = 0; j < 16; j++) // bytes
for (uint16_t i = 0; i < 256; i++) { // blocks
for (uint8_t j = 0; j < 16; j++) // bytes
fprintf(f, "%02X", *(traceCard + i * 16 + j));

// no extra line in the end
Expand Down
15 changes: 15 additions & 0 deletions include/mifare.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,19 @@ typedef struct {
} state;
} nonces_t;

//-----------------------------------------------------------------------------
// FeliCa
//-----------------------------------------------------------------------------
typedef struct {
uint8_t uid[8];
} __attribute__((__packed__)) felica_card_select_t;

typedef enum FELICA_COMMAND {
FELICA_CONNECT = (1 << 0),
FELICA_NO_DISCONNECT = (1 << 1),
FELICA_RAW = (1 << 3),
FELICA_APPEND_CRC = (1 << 5),
FELICA_NO_SELECT = (1 << 6),
} felica_command_t;

#endif // _MIFARE_H_

0 comments on commit 29c15b3

Please sign in to comment.