mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
Merge branch 'master' of https://github.com/adite/proxmark3
This commit is contained in:
commit
5d17177498
184 changed files with 4180 additions and 2318 deletions
|
@ -21,18 +21,45 @@
|
|||
|
||||
#define AEND "\x1b[0m"
|
||||
|
||||
#define _BLUE_(s) "\x1b[34m" s AEND
|
||||
#define _RED_(s) "\x1b[31m" s AEND
|
||||
#define _GREEN_(s) "\x1b[32m" s AEND
|
||||
#define _YELLOW_(s) "\x1b[33m" s AEND
|
||||
#define _MAGENTA_(s) "\x1b[35m" s AEND
|
||||
#define _CYAN_(s) "\x1b[36m" s AEND
|
||||
#define _WHITE_(s) "\x1b[37m" s AEND
|
||||
#define _BLACK_(s) "\x1b[30m" s AEND
|
||||
#define _RED_(s) "\x1b[31m" s AEND
|
||||
#define _GREEN_(s) "\x1b[32m" s AEND
|
||||
#define _YELLOW_(s) "\x1b[33m" s AEND
|
||||
#define _BLUE_(s) "\x1b[34m" s AEND
|
||||
#define _MAGENTA_(s) "\x1b[35m" s AEND
|
||||
#define _CYAN_(s) "\x1b[36m" s AEND
|
||||
#define _WHITE_(s) "\x1b[37m" s AEND
|
||||
|
||||
#define _BRIGHT_BLACK_(s) "\x1b[30;1m" s AEND
|
||||
#define _BRIGHT_RED_(s) "\x1b[31;1m" s AEND
|
||||
#define _BRIGHT_GREEN_(s) "\x1b[32;1m" s AEND
|
||||
#define _BRIGHT_YELLOW_(s) "\x1b[33;1m" s AEND
|
||||
#define _BRIGHT_BLUE_(s) "\x1b[34;1m" s AEND
|
||||
#define _BRIGHT_MAGENTA_(s) "\x1b[35;1m" s AEND
|
||||
#define _BRIGHT_CYAN_(s) "\x1b[36;1m" s AEND
|
||||
#define _BRIGHT_WHITE_(s) "\x1b[37;1m" s AEND
|
||||
|
||||
#define _BACK_BLACK_(s) "\x1b[40m" s AEND
|
||||
#define _BACK_RED_(s) "\x1b[41m" s AEND
|
||||
#define _BACK_GREEN_(s) "\x1b[42m" s AEND
|
||||
#define _BACK_YELLOW_(s) "\x1b[43m" s AEND
|
||||
#define _BACK_BLUE_(s) "\x1b[44m" s AEND
|
||||
#define _BACK_MAGENTA_(s) "\x1b[45m" s AEND
|
||||
#define _BACK_CYAN_(s) "\x1b[46m" s AEND
|
||||
#define _BACK_WHITE_(s) "\x1b[47m" s AEND
|
||||
|
||||
#define _BACK_BRIGHT_BLACK_(s) "\x1b[40;1m" s AEND
|
||||
#define _BACK_BRIGHT_RED_(s) "\x1b[41;1m" s AEND
|
||||
#define _BACK_BRIGHT_GREEN_(s) "\x1b[42;1m" s AEND
|
||||
#define _BACK_BRIGHT_YELLOW_(s) "\x1b[43;1m" s AEND
|
||||
#define _BACK_BRIGHT_BLUE_(s) "\x1b[44;1m" s AEND
|
||||
#define _BACK_BRIGHT_MAGENTA_(s) "\x1b[45;1m" s AEND
|
||||
#define _BACK_BRIGHT_CYAN_(s) "\x1b[46;1m" s AEND
|
||||
#define _BACK_BRIGHT_WHITE_(s) "\x1b[47;1m" s AEND
|
||||
|
||||
#define _CLEAR_ "\x1b[2J"
|
||||
#define _TOP_ "\x1b[1;1f"
|
||||
|
||||
|
||||
#if defined(HAVE_READLINE)
|
||||
// https://wiki.hackzine.org/development/misc/readline-color-prompt.html
|
||||
// Applications may indicate that the prompt contains
|
||||
|
|
|
@ -23,7 +23,14 @@
|
|||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define ABOVE "../"
|
||||
#define PATHSEP "/"
|
||||
#else
|
||||
#define ABOVE "../"
|
||||
#define PATHSEP "/"
|
||||
#endif
|
||||
|
||||
// PM3 share path relative to executable when installed
|
||||
#define PM3_SHARE_RELPATH ".." PATHSEP "share" PATHSEP "proxmark3" PATHSEP
|
||||
|
||||
|
@ -53,7 +60,7 @@ struct version_information_t {
|
|||
char clean; /* 1: Tree was clean, no local changes. 0: Tree was unclean. 2: Couldn't be determined */
|
||||
char gitversion[50]; /* String with the git revision */
|
||||
char buildtime[30]; /* string with the build time */
|
||||
char armsrc[10]; /* sha256sum of sha256sum of armsrc files */
|
||||
char armsrc[10]; /* sha256sum of sha256sum of armsrc && common_arm files */
|
||||
} PACKED;
|
||||
|
||||
// debug
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
//#define FLAG_ICLASS_READER_ONLY_ONCE 0x04
|
||||
#define FLAG_ICLASS_READER_CREDITKEY 0x08
|
||||
#define FLAG_ICLASS_READER_AIA 0x10
|
||||
#define FLAG_ICLASS_READER_SHALLOW_MOD 0x20
|
||||
|
||||
// iCLASS reader status flags
|
||||
#define FLAG_ICLASS_NULL 0x00
|
||||
|
@ -60,6 +61,7 @@ typedef struct {
|
|||
bool use_replay;
|
||||
bool send_reply;
|
||||
bool do_auth;
|
||||
bool shallow_mod;
|
||||
uint8_t blockno;
|
||||
} PACKED iclass_auth_req_t;
|
||||
|
||||
|
@ -103,6 +105,7 @@ typedef struct iclass_premac {
|
|||
|
||||
typedef struct {
|
||||
bool use_credit_key;
|
||||
bool shallow_mod;
|
||||
uint8_t count;
|
||||
iclass_premac_t items[];
|
||||
} PACKED iclass_chk_t;
|
||||
|
|
|
@ -42,4 +42,4 @@ typedef struct vigik_pk_s {
|
|||
const char *n;
|
||||
} vigik_pk_t;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -190,6 +190,9 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
|
|||
#define MIFARE_CMD_RESTORE 0xC2
|
||||
#define MIFARE_CMD_TRANSFER 0xB0
|
||||
|
||||
#define MIFARE_MAGIC_GDM_AUTH_KEYA 0x80
|
||||
#define MIFARE_MAGIC_GDM_AUTH_KEYB 0x81
|
||||
|
||||
#define MIFARE_EV1_PERSONAL_UID 0x40
|
||||
#define MIFARE_EV1_SETMODE 0x43
|
||||
#define MIFARE_EV1_UIDF0 0x00
|
||||
|
@ -450,9 +453,71 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
|
|||
#define ISO7816_MANAGE_CHANNEL 0x70
|
||||
|
||||
#define ISO7816_GET_RESPONSE 0xC0
|
||||
|
||||
// ISO7816-4 For response APDU's
|
||||
#define ISO7816_OK 0x9000
|
||||
// 6x xx = ERROR
|
||||
#define ISO7816_OK 0x9000
|
||||
|
||||
// 6x xx = APDU ERROR CODES
|
||||
|
||||
// 61 xx
|
||||
#define ISO7816_BYTES_REMAINING_00 0x6100 // Response bytes remaining
|
||||
|
||||
// 62 xx
|
||||
#define ISO7816_WARNING_STATE_UNCHANGED 0x6200 // Warning, card state unchanged
|
||||
#define ISO7816_DATA_CORRUPT 0x6281 // Returned data may be corrupted
|
||||
#define ISO7816_FILE_EOF 0x6282 // The end of the file has been reached before the end of reading
|
||||
#define ISO7816_INVALID_DF 0x6283 // Invalid DF
|
||||
#define ISO7816_INVALID_FILE 0x6284 // Selected file is not valid
|
||||
#define ISO7816_FILE_TERMINATED 0x6285 // File is terminated
|
||||
|
||||
// 63 xx
|
||||
#define ISO7816_AUTH_FAILED 0x6300 // Authentification failed
|
||||
#define ISO7816_FILE_FILLED 0x6381 // File filled up by the last write
|
||||
|
||||
// 65 xx
|
||||
#define ISO7816_MEMORY_FULL 0x6501 // Memory failure
|
||||
#define ISO7816_WRITE_MEMORY_ERR 0x6581 // Write problem / Memory failure / Unknown mode
|
||||
|
||||
// 67 xx
|
||||
#define ISO7816_WRONG_LENGTH 0x6700 // Wrong length
|
||||
|
||||
// 68 xx
|
||||
#define ISO7816_LOGICAL_CHANNEL_NOT_SUPPORTED 0x6881 // Card does not support the operation on the specified logical channel
|
||||
#define ISO7816_SECURE_MESSAGING_NOT_SUPPORTED 0x6882 // Card does not support secure messaging
|
||||
#define ISO7816_LAST_COMMAND_EXPECTED 0x6883 // Last command in chain expected
|
||||
#define ISO7816_COMMAND_CHAINING_NOT_SUPPORTED 0x6884 // Command chaining not supported
|
||||
|
||||
// 69 xx
|
||||
#define ISO7816_TRANSACTION_FAIL 0x6900 // No successful transaction executed during session
|
||||
#define ISO7816_SELECT_FILE_ERR 0x6981 // Cannot select indicated file, command not compatible with file organization
|
||||
#define ISO7816_SECURITY_STATUS_NOT_SATISFIED 0x6982 // Security condition not satisfied
|
||||
#define ISO7816_FILE_INVALID 0x6983 // File invalid
|
||||
#define ISO7816_DATA_INVALID 0x6984 // Data invalid
|
||||
#define ISO7816_CONDITIONS_NOT_SATISFIED 0x6985 // Conditions of use not satisfied
|
||||
#define ISO7816_COMMAND_NOT_ALLOWED 0x6986 // Command not allowed (no current EF)
|
||||
#define ISO7816_SM_DATA_MISSING 0x6987 // Expected SM data objects missing
|
||||
#define ISO7816_SM_DATA_INCORRECT 0x6988 // SM data objects incorrect
|
||||
#define ISO7816_APPLET_SELECT_FAILED 0x6999 // Applet selection failed
|
||||
|
||||
// 6A xx
|
||||
#define ISO7816_INVALID_P1P2 0x6A00 // Bytes P1 and/or P2 are invalid
|
||||
#define ISO7816_WRONG_DATA 0x6A80 // Wrong data
|
||||
#define ISO7816_FUNC_NOT_SUPPORTED 0x6A81 // Function not supported
|
||||
#define ISO7816_FILE_NOT_FOUND 0x6A82 // File not found
|
||||
#define ISO7816_RECORD_NOT_FOUND 0x6A83 // Record not found
|
||||
#define ISO7816_FILE_FULL 0x6A84 // Not enough memory space in the file
|
||||
#define ISO7816_LC_TLV_CONFLICT 0x6A85 // LC / TLV conlict
|
||||
#define ISO7816_INCORRECT_P1P2 0x6A86 // Incorrect parameters (P1,P2)
|
||||
#define ISO7816_FILE_EXISTS 0x6A89 // File exists
|
||||
#define ISO7816_NOT_IMPLEMENTED 0x6AFF //
|
||||
|
||||
// 6x 00
|
||||
#define ISO7816_WRONG_P1P2 0x6B00 // Incorrect parameters (P1,P2)
|
||||
#define ISO7816_CORRECT_LENGTH_00 0x6C00 // Correct Expected Length (Le)
|
||||
#define ISO7816_INS_NOT_SUPPORTED 0x6D00 // INS value not supported
|
||||
#define ISO7816_CLA_NOT_SUPPORTED 0x6E00 // CLA value not supported
|
||||
#define ISO7816_UNKNOWN 0x6F00 // No precise diagnosis
|
||||
|
||||
|
||||
// MIFARE DESFire command set:
|
||||
#define MFDES_AUTHENTICATE 0x0A // AUTHENTICATE_NATIVE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue