From a8ccba77d63d1576bfac054eba1425e2379b28a3 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 7 Jan 2022 19:13:24 +0100 Subject: [PATCH 01/73] cppcheck fixes const --- client/src/emv/emvcore.c | 1 - client/src/fileutils.c | 12 +++++------ client/src/loclass/cipher.c | 4 ++-- client/src/loclass/elite_crack.c | 6 +++--- client/src/loclass/elite_crack.h | 6 +++--- client/src/mifare/desfirecore.c | 34 ++++++++++++++++++-------------- client/src/mifare/desfirecore.h | 6 +++--- 7 files changed, 35 insertions(+), 34 deletions(-) diff --git a/client/src/emv/emvcore.c b/client/src/emv/emvcore.c index 3dccf4d47..5f154815c 100644 --- a/client/src/emv/emvcore.c +++ b/client/src/emv/emvcore.c @@ -329,7 +329,6 @@ static int EMVSelectWithRetry(Iso7816CommandChannel channel, bool ActivateField, return 1; } - retrycnt = 0; PrintAndLogEx(FAILED, "Retry failed [%s]. Skipped...", sprint_hex_inrow(AID, AIDLen)); return res; } diff --git a/client/src/fileutils.c b/client/src/fileutils.c index c38613959..9b285e257 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -1263,20 +1263,18 @@ int loadFileJSONroot(const char *preferredName, void **proot, bool verbose) { if (root == NULL) { PrintAndLogEx(ERR, "ERROR: json " _YELLOW_("%s") " error on line %d: %s", preferredName, error.line, error.text); retval = PM3_ESOFT; - goto out; } - if (!json_is_object(root)) { + if (json_is_object(root) == false) { PrintAndLogEx(ERR, "ERROR: Invalid json " _YELLOW_("%s") " format. root must be an object.", preferredName); retval = PM3_ESOFT; - goto out; } - *proot = root; - return PM3_SUCCESS; + if (retval == PM3_ESOFT) + json_decref(root); + else + *proot = root; -out: - json_decref(root); return retval; } diff --git a/client/src/loclass/cipher.c b/client/src/loclass/cipher.c index 9a646b9f6..943a616fb 100644 --- a/client/src/loclass/cipher.c +++ b/client/src/loclass/cipher.c @@ -169,7 +169,7 @@ static uint8_t _select(bool x, bool y, uint8_t r) { * @param s - state * @param k - array containing 8 bytes **/ -static State_t successor(uint8_t *k, State_t s, bool y) { +static State_t successor(const uint8_t *k, State_t s, bool y) { bool r0 = s.r >> 7 & 0x1; bool r4 = s.r >> 3 & 0x1; bool r7 = s.r & 0x1; @@ -227,7 +227,7 @@ static void output(uint8_t *k, State_t s, BitstreamIn_t *in, BitstreamOut_t *ou * key k โˆˆ (F 82 ) 8 and outputs the initial cipher state s =< l, r, t, b > **/ -static State_t init(uint8_t *k) { +static State_t init(const uint8_t *k) { State_t s = { ((k[0] ^ 0x4c) + 0xEC) & 0xFF,// l ((k[0] ^ 0x4c) + 0x21) & 0xFF,// r diff --git a/client/src/loclass/elite_crack.c b/client/src/loclass/elite_crack.c index 58f022779..89d4cfdf7 100644 --- a/client/src/loclass/elite_crack.c +++ b/client/src/loclass/elite_crack.c @@ -70,7 +70,7 @@ * @param key * @param dest */ -void permutekey(uint8_t key[8], uint8_t dest[8]) { +void permutekey(const uint8_t key[8], uint8_t dest[8]) { for (uint8_t i = 0 ; i < 8 ; i++) { dest[i] = (((key[7] & (0x80 >> i)) >> (7 - i)) << 7) | (((key[6] & (0x80 >> i)) >> (7 - i)) << 6) | @@ -88,7 +88,7 @@ void permutekey(uint8_t key[8], uint8_t dest[8]) { * @param key * @param dest */ -void permutekey_rev(uint8_t key[8], uint8_t dest[8]) { +void permutekey_rev(const uint8_t key[8], uint8_t dest[8]) { int i; for (i = 0 ; i < 8 ; i++) { dest[7 - i] = (((key[0] & (0x80 >> i)) >> (7 - i)) << 7) | @@ -138,7 +138,7 @@ static inline uint8_t swap(uint8_t val) { * @param csn the CSN used * @param k output */ -void hash1(uint8_t csn[], uint8_t k[]) { +void hash1(const uint8_t csn[], uint8_t k[]) { k[0] = csn[0] ^ csn[1] ^ csn[2] ^ csn[3] ^ csn[4] ^ csn[5] ^ csn[6] ^ csn[7]; k[1] = csn[0] + csn[1] + csn[2] + csn[3] + csn[4] + csn[5] + csn[6] + csn[7]; k[2] = rr(swap(csn[2] + k[1])); diff --git a/client/src/loclass/elite_crack.h b/client/src/loclass/elite_crack.h index fca942c51..213ceb373 100644 --- a/client/src/loclass/elite_crack.h +++ b/client/src/loclass/elite_crack.h @@ -54,14 +54,14 @@ typedef struct { } loclass_dumpdata_t; -void permutekey(uint8_t key[8], uint8_t dest[8]); +void permutekey(const uint8_t key[8], uint8_t dest[8]); /** * Permutes a key from iclass specific format to NIST format * @brief permutekey_rev * @param key * @param dest */ -void permutekey_rev(uint8_t key[8], uint8_t dest[8]); +void permutekey_rev(const uint8_t key[8], uint8_t dest[8]); /** * Perform a bruteforce against a file which has been saved by pm3 @@ -107,7 +107,7 @@ int bruteforceItem(loclass_dumpdata_t item, uint16_t keytable[]); * @param csn the CSN used * @param k output */ -void hash1(uint8_t *csn, uint8_t *k); +void hash1(const uint8_t *csn, uint8_t *k); void hash2(uint8_t *key64, uint8_t *outp_keytable); /** * From dismantling iclass-paper: diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 8c67242fe..06e4077d9 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -115,7 +115,7 @@ const CLIParserOption DesfireReadFileTypeOpts[] = { {0, NULL}, }; -static const char *getstatus(uint16_t *sw) { +static const char *getstatus(const uint16_t *sw) { if (sw == NULL) return "--> sw argument error. This should never happen !"; if (((*sw >> 8) & 0xFF) == 0x91) { switch (*sw & 0xFF) { @@ -340,7 +340,8 @@ bool DesfireMFSelected(DesfireISOSelectWay way, uint32_t id) { return false; } -uint32_t DesfireAIDByteToUint(uint8_t *data) { +// iceman todo: use commonutil.c instead +uint32_t DesfireAIDByteToUint(const uint8_t *data) { return data[0] + (data[1] << 8) + (data[2] << 16); } @@ -544,8 +545,8 @@ static int DesfireExchangeNative(bool activate_field, DesfireContext_t *ctx, uin memcpy(&cdata[1], data, datalen); cdatalen = datalen + 1; - int res = 0; - size_t len = 0; + int res; + size_t len; // tx chaining size_t sentdatalen = 0; while (cdatalen >= sentdatalen) { @@ -638,26 +639,28 @@ static int DesfireExchangeNative(bool activate_field, DesfireContext_t *ctx, uin static int DesfireExchangeISONative(bool activate_field, DesfireContext_t *ctx, uint8_t cmd, uint8_t *data, size_t datalen, uint8_t *respcode, uint8_t *resp, size_t *resplen, bool enable_chaining, size_t splitbysize) { if (resplen) *resplen = 0; + if (respcode) *respcode = 0xff; uint16_t sw = 0; uint8_t *buf = calloc(DESFIRE_BUFFER_SIZE, 1); - if (buf == NULL) + if (buf == NULL) { return PM3_EMALLOC; + } + uint32_t buflen = 0; uint32_t pos = 0; uint32_t i = 1; - sAPDU_t apdu = {0}; - apdu.CLA = MFDES_NATIVE_ISO7816_WRAP_CLA; //0x90 - apdu.INS = cmd; - apdu.Lc = datalen; - apdu.P1 = 0; - apdu.P2 = 0; - apdu.data = data; + sAPDU_t apdu = { + .CLA = MFDES_NATIVE_ISO7816_WRAP_CLA, //0x90 + .INS = cmd, + .P1 = 0, + .P2 = 0, + }; - int res = 0; + int res; // tx chaining size_t sentdatalen = 0; while (datalen >= sentdatalen) { @@ -665,6 +668,7 @@ static int DesfireExchangeISONative(bool activate_field, DesfireContext_t *ctx, apdu.Lc = DESFIRE_TX_FRAME_MAX_LEN; else apdu.Lc = datalen - sentdatalen; + apdu.data = &data[sentdatalen]; if (sentdatalen > 0) @@ -2330,7 +2334,7 @@ void DesfireEncodeFileAcessMode(uint8_t *mode, uint8_t r, uint8_t w, uint8_t rw, mode[1] = (w & 0x0f) | ((r << 4) & 0xf0); } -void DesfireDecodeFileAcessMode(uint8_t *mode, uint8_t *r, uint8_t *w, uint8_t *rw, uint8_t *ch) { +void DesfireDecodeFileAcessMode(const uint8_t *mode, uint8_t *r, uint8_t *w, uint8_t *rw, uint8_t *ch) { // read if (r) *r = (mode[1] >> 4) & 0x0f; // hi 2b @@ -2972,7 +2976,7 @@ int DesfireAnticollision(bool verbose) { return SelectCard14443A_4(false, verbose, NULL); } -int DesfireSelectEx(DesfireContext_t *ctx, bool fieldon, DesfireISOSelectWay way, uint32_t id, char *dfname) { +int DesfireSelectEx(DesfireContext_t *ctx, bool fieldon, DesfireISOSelectWay way, uint32_t id, const char *dfname) { uint8_t resp[250] = {0}; size_t resplen = 0; diff --git a/client/src/mifare/desfirecore.h b/client/src/mifare/desfirecore.h index f66c83981..3b1fe4d72 100644 --- a/client/src/mifare/desfirecore.h +++ b/client/src/mifare/desfirecore.h @@ -153,7 +153,7 @@ extern const CLIParserOption DesfireValueFileOperOpts[]; extern const CLIParserOption DesfireReadFileTypeOpts[]; const char *DesfireGetErrorString(int res, uint16_t *sw); -uint32_t DesfireAIDByteToUint(uint8_t *data); +uint32_t DesfireAIDByteToUint(const uint8_t *data); void DesfireAIDUintToByte(uint32_t aid, uint8_t *data); void DesfirePrintContext(DesfireContext_t *ctx); @@ -175,7 +175,7 @@ int DesfireGetCardUID(DesfireContext_t *ctx); const char *DesfireSelectWayToStr(DesfireISOSelectWay way); char *DesfireWayIDStr(DesfireISOSelectWay way, uint32_t id); bool DesfireMFSelected(DesfireISOSelectWay way, uint32_t id); -int DesfireSelectEx(DesfireContext_t *ctx, bool fieldon, DesfireISOSelectWay way, uint32_t id, char *dfname); +int DesfireSelectEx(DesfireContext_t *ctx, bool fieldon, DesfireISOSelectWay way, uint32_t id, const char *dfname); int DesfireSelect(DesfireContext_t *ctx, DesfireISOSelectWay way, uint32_t id, char *dfname); const char *DesfireAuthErrorToStr(int error); @@ -230,7 +230,7 @@ const DesfireCreateFileCommands_t *GetDesfireFileCmdRec(uint8_t type); const char *GetDesfireAccessRightStr(uint8_t right); const char *GetDesfireAccessRightShortStr(uint8_t right); void DesfireEncodeFileAcessMode(uint8_t *mode, uint8_t r, uint8_t w, uint8_t rw, uint8_t ch); -void DesfireDecodeFileAcessMode(uint8_t *mode, uint8_t *r, uint8_t *w, uint8_t *rw, uint8_t *ch); +void DesfireDecodeFileAcessMode(const uint8_t *mode, uint8_t *r, uint8_t *w, uint8_t *rw, uint8_t *ch); void DesfirePrintAccessRight(uint8_t *data); void DesfirePrintFileSettings(uint8_t *data, size_t len); void DesfirePrintSetFileSettings(uint8_t *data, size_t len); From 2bf2bb301a4554b142538c9691073a6effa9144e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 7 Jan 2022 19:23:42 +0100 Subject: [PATCH 02/73] cppcheck fixes --- client/src/mifare/desfirecrypto.c | 2 +- client/src/mifare/desfirecrypto.h | 2 +- client/src/mifare/gallaghercore.c | 4 ++-- client/src/mifare/lrpcrypto.c | 2 +- client/src/mifare/lrpcrypto.h | 2 +- client/src/mifare/mad.c | 4 ++-- client/src/mifare/mifare4.c | 4 ++-- client/src/mifare/mifare4.h | 4 ++-- client/src/mifare/mifarehost.c | 6 +++--- client/src/mifare/mifarehost.h | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client/src/mifare/desfirecrypto.c b/client/src/mifare/desfirecrypto.c index f022bbe65..8ee68c29e 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -439,7 +439,7 @@ void DesfireDESKeySetVersion(uint8_t *key, DesfireCryptoAlgorithm keytype, uint8 } } -uint8_t DesfireDESKeyGetVersion(uint8_t *key) { +uint8_t DesfireDESKeyGetVersion(const uint8_t *key) { uint8_t version = 0; for (int n = 0; n < 8; n++) version |= ((key[n] & 1) << (7 - n)); diff --git a/client/src/mifare/desfirecrypto.h b/client/src/mifare/desfirecrypto.h index 96f508fa6..7147eb981 100644 --- a/client/src/mifare/desfirecrypto.h +++ b/client/src/mifare/desfirecrypto.h @@ -114,7 +114,7 @@ void MifareKdfAn10922(DesfireContext_t *ctx, DesfireCryptoOpKeyType key_type, co void DesfireGenSessionKeyLRP(uint8_t *key, uint8_t *rndA, uint8_t *rndB, bool enckey, uint8_t *sessionkey); void DesfireDESKeySetVersion(uint8_t *key, DesfireCryptoAlgorithm keytype, uint8_t version); -uint8_t DesfireDESKeyGetVersion(uint8_t *key); +uint8_t DesfireDESKeyGetVersion(const uint8_t *key); DesfireCryptoAlgorithm DesfireKeyTypeToAlgo(uint8_t keyType); uint8_t DesfireKeyAlgoToType(DesfireCryptoAlgorithm keyType); diff --git a/client/src/mifare/gallaghercore.c b/client/src/mifare/gallaghercore.c index 71e235286..e9ae26364 100644 --- a/client/src/mifare/gallaghercore.c +++ b/client/src/mifare/gallaghercore.c @@ -13,7 +13,7 @@ #include "ui.h" static void scramble(uint8_t *arr, uint8_t len) { - uint8_t lut[] = { + const uint8_t lut[] = { 0xa3, 0xb0, 0x80, 0xc6, 0xb2, 0xf4, 0x5c, 0x6c, 0x81, 0xf1, 0xbb, 0xeb, 0x55, 0x67, 0x3c, 0x05, 0x1a, 0x0e, 0x61, 0xf6, 0x22, 0xce, 0xaa, 0x8f, 0xbd, 0x3b, 0x1f, 0x5e, 0x44, 0x04, 0x51, 0x2e, 0x4d, 0x9a, 0x84, 0xea, 0xf8, 0x66, 0x74, 0x29, 0x7f, 0x70, 0xd8, 0x31, 0x7a, 0x6d, 0xa4, 0x00, @@ -38,7 +38,7 @@ static void scramble(uint8_t *arr, uint8_t len) { } static void descramble(uint8_t *arr, uint8_t len) { - uint8_t lut[] = { + const uint8_t lut[] = { 0x2f, 0x6e, 0xdd, 0xdf, 0x1d, 0x0f, 0xb0, 0x76, 0xad, 0xaf, 0x7f, 0xbb, 0x77, 0x85, 0x11, 0x6d, 0xf4, 0xd2, 0x84, 0x42, 0xeb, 0xf7, 0x34, 0x55, 0x4a, 0x3a, 0x10, 0x71, 0xe7, 0xa1, 0x62, 0x1a, 0x3e, 0x4c, 0x14, 0xd3, 0x5e, 0xb2, 0x7d, 0x56, 0xbc, 0x27, 0x82, 0x60, 0xe3, 0xae, 0x1f, 0x9b, diff --git a/client/src/mifare/lrpcrypto.c b/client/src/mifare/lrpcrypto.c index bd0368b9d..8016293f8 100644 --- a/client/src/mifare/lrpcrypto.c +++ b/client/src/mifare/lrpcrypto.c @@ -106,7 +106,7 @@ void LRPGenerateUpdatedKeys(LRPContext_t *ctx, size_t updatedKeysCount) { // https://www.nxp.com/docs/en/application-note/AN12304.pdf // Algorithm 3 -void LRPEvalLRP(LRPContext_t *ctx, uint8_t *iv, size_t ivlen, bool final, uint8_t *y) { +void LRPEvalLRP(LRPContext_t *ctx, const uint8_t *iv, size_t ivlen, bool final, uint8_t *y) { uint8_t ry[CRYPTO_AES128_KEY_SIZE] = {0}; memcpy(ry, ctx->updatedKeys[ctx->useUpdatedKeyNum], CRYPTO_AES128_KEY_SIZE); diff --git a/client/src/mifare/lrpcrypto.h b/client/src/mifare/lrpcrypto.h index aa7f45704..1b6622ed9 100644 --- a/client/src/mifare/lrpcrypto.h +++ b/client/src/mifare/lrpcrypto.h @@ -50,7 +50,7 @@ void LRPSetKeyEx(LRPContext_t *ctx, uint8_t *key, uint8_t *counter, size_t count void LRPSetCounter(LRPContext_t *ctx, uint8_t *counter, size_t counterLenNibbles); void LRPGeneratePlaintexts(LRPContext_t *ctx, size_t plaintextsCount); void LRPGenerateUpdatedKeys(LRPContext_t *ctx, size_t updatedKeysCount); -void LRPEvalLRP(LRPContext_t *ctx, uint8_t *iv, size_t ivlen, bool final, uint8_t *y); +void LRPEvalLRP(LRPContext_t *ctx, const uint8_t *iv, size_t ivlen, bool final, uint8_t *y); void LRPIncCounter(uint8_t *ctr, size_t ctrlen); void LRPEncode(LRPContext_t *ctx, uint8_t *data, size_t datalen, uint8_t *resp, size_t *resplen); void LRPDecode(LRPContext_t *ctx, uint8_t *data, size_t datalen, uint8_t *resp, size_t *resplen); diff --git a/client/src/mifare/mad.c b/client/src/mifare/mad.c index 55868cfae..ca5be1e01 100644 --- a/client/src/mifare/mad.c +++ b/client/src/mifare/mad.c @@ -159,7 +159,7 @@ static int madCRCCheck(uint8_t *sector, bool verbose, int MADver) { return PM3_SUCCESS; } -static uint16_t madGetAID(uint8_t *sector, bool swapmad, int MADver, int sectorNo) { +static uint16_t madGetAID(const uint8_t *sector, bool swapmad, int MADver, int sectorNo) { uint16_t mad; if (MADver == 1) mad = (sector[16 + 2 + (sectorNo - 1) * 2 + 1] << 8) + (sector[16 + 2 + (sectorNo - 1) * 2]); @@ -267,7 +267,7 @@ int MADCardHolderInfoDecode(uint8_t *data, size_t datalen, bool verbose) { return PM3_SUCCESS; } -static int MADInfoByteDecode(uint8_t *sector, bool swapmad, int mad_ver, bool verbose) { +static int MADInfoByteDecode(const uint8_t *sector, bool swapmad, int mad_ver, bool verbose) { uint8_t info; if (mad_ver == 1) { info = sector[16 + 1] & 0x3f; diff --git a/client/src/mifare/mifare4.c b/client/src/mifare/mifare4.c index 42dff092c..8b262ec40 100644 --- a/client/src/mifare/mifare4.c +++ b/client/src/mifare/mifare4.c @@ -66,7 +66,7 @@ AccessConditions_t MFAccessConditionsTrailer[] = { {0x07, "read ACCESS by AB", ""} }; -bool mfValidateAccessConditions(uint8_t *data) { +bool mfValidateAccessConditions(const uint8_t *data) { uint8_t ndata1 = (data[0]) & 0x0f; uint8_t ndata2 = (data[0] >> 4) & 0x0f; uint8_t ndata3 = (data[1]) & 0x0f; @@ -77,7 +77,7 @@ bool mfValidateAccessConditions(uint8_t *data) { return ((ndata1 == (data1 ^ 0xF)) && (ndata2 == (data2 ^ 0xF)) && (ndata3 == (data3 ^ 0xF))); } -const char *mfGetAccessConditionsDesc(uint8_t blockn, uint8_t *data) { +const char *mfGetAccessConditionsDesc(uint8_t blockn, const uint8_t *data) { uint8_t data1 = ((data[1] >> 4) & 0x0f) >> blockn; uint8_t data2 = ((data[2]) & 0x0f) >> blockn; uint8_t data3 = ((data[2] >> 4) & 0x0f) >> blockn; diff --git a/client/src/mifare/mifare4.h b/client/src/mifare/mifare4.h index 132cf6ee5..0cc716d58 100644 --- a/client/src/mifare/mifare4.h +++ b/client/src/mifare/mifare4.h @@ -63,8 +63,8 @@ int mfpReadSector(uint8_t sectorNo, uint8_t keyType, uint8_t *key, uint8_t *data int MFPGetSignature(bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen); int MFPGetVersion(bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen); -bool mfValidateAccessConditions(uint8_t *data); -const char *mfGetAccessConditionsDesc(uint8_t blockn, uint8_t *data); +bool mfValidateAccessConditions(const uint8_t *data); +const char *mfGetAccessConditionsDesc(uint8_t blockn, const uint8_t *data); uint8_t mfNumBlocksPerSector(uint8_t sectorNo); uint8_t mfFirstBlockOfSector(uint8_t sectorNo); diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 4b5e4e5a1..7fa5ed18f 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -327,7 +327,7 @@ int mfCheckKeys_file(uint8_t *destfn, uint64_t *key) { // PM3 imp of J-Run mf_key_brute (part 2) // ref: https://github.com/J-Run/mf_key_brute -int mfKeyBrute(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint64_t *resultkey) { +int mfKeyBrute(uint8_t blockNo, uint8_t keyType, const uint8_t *key, uint64_t *resultkey) { uint64_t key64; uint8_t found = false; @@ -655,7 +655,6 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl PrintAndLogEx(SUCCESS, "Found " _YELLOW_("%u") " key candidates", keycnt); memset(resultKey, 0, 6); - uint64_t key64 = -1; // The list may still contain several key candidates. Test each of them with mfCheckKeys uint32_t maxkeysinblock = IfPm3Flash() ? 1000 : KEYS_IN_BLOCK; @@ -706,7 +705,8 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl } int res = 0; - key64 = 0; + uint64_t key64 = 0; + uint32_t chunk = keycnt - i > max_keys_chunk ? max_keys_chunk : keycnt - i; // copy x keys to device. diff --git a/client/src/mifare/mifarehost.h b/client/src/mifare/mifarehost.h index 56cc5d841..0d26b5da0 100644 --- a/client/src/mifare/mifarehost.h +++ b/client/src/mifare/mifarehost.h @@ -67,7 +67,7 @@ int mfCheckKeys_fast(uint8_t sectorsCnt, uint8_t firstChunk, uint8_t lastChunk, int mfCheckKeys_file(uint8_t *destfn, uint64_t *key); -int mfKeyBrute(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint64_t *resultkey); +int mfKeyBrute(uint8_t blockNo, uint8_t keyType, const uint8_t *key, uint64_t *resultkey); int mfReadSector(uint8_t sectorNo, uint8_t keyType, uint8_t *key, uint8_t *data); int mfReadBlock(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t *data); From 89a05b47a80d261597d7320d0b292a0989243cd5 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 7 Jan 2022 19:31:19 +0100 Subject: [PATCH 03/73] cppcheck fixes const --- client/src/mifare/mifarehost.c | 4 ++-- client/src/mifare/mifarehost.h | 4 ++-- client/src/nfc/ndef.c | 2 +- client/src/util.c | 8 ++++---- client/src/util.h | 8 ++++---- common/crapto1/crapto1.c | 2 +- common/crapto1/crapto1.h | 2 +- common/crc.c | 2 +- common/crc.h | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 7fa5ed18f..31eee3ef0 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -880,7 +880,7 @@ int mfEmlSetMem_xt(uint8_t *data, int blockNum, int blocksCount, int blockBtWidt } // "MAGIC" CARD -int mfCSetUID(uint8_t *uid, uint8_t uidlen, uint8_t *atqa, uint8_t *sak, uint8_t *old_uid, uint8_t *verifed_uid, uint8_t wipecard) { +int mfCSetUID(uint8_t *uid, uint8_t uidlen, const uint8_t *atqa, const uint8_t *sak, uint8_t *old_uid, uint8_t *verifed_uid, uint8_t wipecard) { uint8_t params = MAGIC_SINGLE; uint8_t block0[16]; @@ -945,7 +945,7 @@ int mfCSetUID(uint8_t *uid, uint8_t uidlen, uint8_t *atqa, uint8_t *sak, uint8_t return res; } -int mfCWipe(uint8_t *uid, uint8_t *atqa, uint8_t *sak) { +int mfCWipe(uint8_t *uid, const uint8_t *atqa, const uint8_t *sak) { uint8_t block0[16] = {0x01, 0x02, 0x03, 0x04, 0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBE, 0xAF}; uint8_t blockD[16] = {0x00}; uint8_t blockK[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x08, 0x77, 0x8F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; diff --git a/client/src/mifare/mifarehost.h b/client/src/mifare/mifarehost.h index 0d26b5da0..c12113c45 100644 --- a/client/src/mifare/mifarehost.h +++ b/client/src/mifare/mifarehost.h @@ -76,8 +76,8 @@ int mfEmlGetMem(uint8_t *data, int blockNum, int blocksCount); int mfEmlSetMem(uint8_t *data, int blockNum, int blocksCount); int mfEmlSetMem_xt(uint8_t *data, int blockNum, int blocksCount, int blockBtWidth); -int mfCSetUID(uint8_t *uid, uint8_t uidlen, uint8_t *atqa, uint8_t *sak, uint8_t *old_uid, uint8_t *verifed_uid, uint8_t wipecard); -int mfCWipe(uint8_t *uid, uint8_t *atqa, uint8_t *sak); +int mfCSetUID(uint8_t *uid, uint8_t uidlen, const uint8_t *atqa, const uint8_t *sak, uint8_t *old_uid, uint8_t *verifed_uid, uint8_t wipecard); +int mfCWipe(uint8_t *uid, const uint8_t *atqa, const uint8_t *sak); int mfCSetBlock(uint8_t blockNo, uint8_t *data, uint8_t *uid, uint8_t params); int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params); diff --git a/client/src/nfc/ndef.c b/client/src/nfc/ndef.c index 7e07639ad..c0d0e0c4d 100644 --- a/client/src/nfc/ndef.c +++ b/client/src/nfc/ndef.c @@ -105,7 +105,7 @@ static const char *URI_s[] = { static int ndefRecordDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen); static int ndefDecodePayload(NDEFHeader_t *ndef); -static uint16_t ndefTLVGetLength(uint8_t *data, size_t *indx) { +static uint16_t ndefTLVGetLength(const uint8_t *data, size_t *indx) { uint16_t len = 0; if (data[0] == 0xff) { len = (data[1] << 8) + data[2]; diff --git a/client/src/util.c b/client/src/util.c index 7fa177911..867c1fc15 100644 --- a/client/src/util.c +++ b/client/src/util.c @@ -843,7 +843,7 @@ int hextobinstring(char *target, char *source) { // convert binary array of 0x00/0x01 values to hex // return number of bits converted -int binarraytohex(char *target, const size_t targetlen, char *source, size_t srclen) { +int binarraytohex(char *target, const size_t targetlen, const char *source, size_t srclen) { uint8_t i = 0, x = 0; uint32_t t = 0; // written target chars uint32_t r = 0; // consumed bits @@ -914,7 +914,7 @@ int binstring2binarray(uint8_t *target, char *source, int length) { } // return parity bit required to match type -uint8_t GetParity(uint8_t *bits, uint8_t type, int length) { +uint8_t GetParity(const uint8_t *bits, uint8_t type, int length) { int x; for (x = 0 ; length > 0 ; --length) x += bits[length - 1]; @@ -939,7 +939,7 @@ void wiegand_add_parity_swapped(uint8_t *target, uint8_t *source, uint8_t length } // Pack a bitarray into a uint32_t. -uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bits) { +uint32_t PackBits(uint8_t start, uint8_t len, const uint8_t *bits) { if (len > 32) return 0; @@ -1082,7 +1082,7 @@ int binstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str) * * Returns the number of bits entered. */ -int binarray_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, uint8_t *arr, int arrlen) { +int binarray_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const uint8_t *arr, int arrlen) { int i = 0; for (; i < arrlen; i++) { uint8_t n = arr[i]; diff --git a/client/src/util.h b/client/src/util.h index 532f47313..df9149829 100644 --- a/client/src/util.h +++ b/client/src/util.h @@ -86,17 +86,17 @@ int param_getstr(const char *line, int paramnum, char *str, size_t buffersize); int hextobinarray(char *target, char *source); int hextobinstring(char *target, char *source); -int binarraytohex(char *target, const size_t targetlen, char *source, size_t srclen); +int binarraytohex(char *target, const size_t targetlen, const char *source, size_t srclen); void binarraytobinstring(char *target, char *source, int length); int binstring2binarray(uint8_t *target, char *source, int length); -uint8_t GetParity(uint8_t *bits, uint8_t type, int length); +uint8_t GetParity(const uint8_t *bits, uint8_t type, int length); void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length); void wiegand_add_parity_swapped(uint8_t *target, uint8_t *source, uint8_t length); //void xor(unsigned char *dst, unsigned char *src, size_t len); -uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bits); +uint32_t PackBits(uint8_t start, uint8_t len, const uint8_t *bits); uint64_t HornerScheme(uint64_t num, uint64_t divider, uint64_t factor); int num_CPUs(void); // number of logical CPUs @@ -111,7 +111,7 @@ char *str_dup(const char *src); char *str_ndup(const char *src, size_t len); int hexstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str); int binstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str); -int binarray_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, uint8_t *arr, int arrlen); +int binarray_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const uint8_t *arr, int arrlen); uint32_t bitcount32(uint32_t a); uint64_t bitcount64(uint64_t a); diff --git a/common/crapto1/crapto1.c b/common/crapto1/crapto1.c index c59c28107..b70cfa159 100644 --- a/common/crapto1/crapto1.c +++ b/common/crapto1/crapto1.c @@ -418,7 +418,7 @@ static uint32_t fastfwd[2][8] = { * encrypt the NACK which is observed when varying only the 3 last bits of Nr * only correct iff [NR_3] ^ NR_3 does not depend on Nr_3 */ -uint32_t *lfsr_prefix_ks(uint8_t ks[8], int isodd) { +uint32_t *lfsr_prefix_ks(const uint8_t ks[8], int isodd) { uint32_t *candidates = calloc(4 << 10, sizeof(uint8_t)); if (!candidates) return 0; diff --git a/common/crapto1/crapto1.h b/common/crapto1/crapto1.h index 708ddb033..105b3ab06 100644 --- a/common/crapto1/crapto1.h +++ b/common/crapto1/crapto1.h @@ -43,7 +43,7 @@ struct Crypto1State *lfsr_recovery64(uint32_t ks2, uint32_t ks3); struct Crypto1State * lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8], uint32_t no_par); #endif -uint32_t *lfsr_prefix_ks(uint8_t ks[8], int isodd); +uint32_t *lfsr_prefix_ks(const uint8_t ks[8], int isodd); uint8_t lfsr_rollback_bit(struct Crypto1State *s, uint32_t in, int fb); diff --git a/common/crc.c b/common/crc.c index cb077182f..f4cf3834f 100644 --- a/common/crc.c +++ b/common/crc.c @@ -148,7 +148,7 @@ uint32_t CRC8Hitag1(uint8_t *buff, size_t size) { return crc_finish(&crc); } -uint32_t CRC8Hitag1Bits(uint8_t *buff, size_t bitsize) { +uint32_t CRC8Hitag1Bits(const uint8_t *buff, size_t bitsize) { crc_t crc; uint8_t data = 0; uint8_t n = 0; diff --git a/common/crc.h b/common/crc.h index 33e289ee8..f06ceddf0 100644 --- a/common/crc.h +++ b/common/crc.h @@ -78,6 +78,6 @@ uint32_t CRC8Cardx(uint8_t *buff, size_t size); // Calculate CRC-8/Hitag1, ZX8211 checksum uint32_t CRC8Hitag1(uint8_t *buff, size_t size); -uint32_t CRC8Hitag1Bits(uint8_t *buff, size_t bitsize); +uint32_t CRC8Hitag1Bits(const uint8_t *buff, size_t bitsize); #endif /* __CRC_H */ From a432b49393ab5010edb8a4555a11724d64a1cb51 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 7 Jan 2022 21:06:07 +0100 Subject: [PATCH 04/73] change gprox ii clone/sim to handle 20b cardnumber for the 36b format --- client/src/cmdlfguard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/cmdlfguard.c b/client/src/cmdlfguard.c index 4a31e8f19..231b0f6f2 100644 --- a/client/src/cmdlfguard.c +++ b/client/src/cmdlfguard.c @@ -236,8 +236,8 @@ static int CmdGuardClone(const char *Cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "lf gproxii clone", "clone a Guardall tag to a T55x7, Q5/T5555 or EM4305/4469 tag.\n" - "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated.\n" - "Currently work only on 26bit", + "The facility-code is 8-bit and the card number is 20-bit. Larger values are truncated.\n" + "Currently work only on 26 | 36 bit format", "lf gproxii clone --fmt 26 --fc 123 --cn 1337\n" "lf gproxii clone --q5 --fmt 26 --fc 123 --cn 1337 -> encode for Q5/T5555 tag\n" "lf gproxii clone --em --fmt 26 --fc 123 --cn 1337 -> encode for EM4305/4469" @@ -268,7 +268,7 @@ static int CmdGuardClone(const char *Cmd) { fmtlen &= 0x7f; uint32_t facilitycode = (fc & 0x000000FF); - uint32_t cardnumber = (cn & 0x0000FFFF); + uint32_t cardnumber = (cn & 0x00FFFFFF); //GuardProxII - compat mode, ASK/Biphase, data rate 64, 3 data blocks uint8_t *bs = calloc(96, sizeof(uint8_t)); @@ -323,7 +323,7 @@ static int CmdGuardSim(const char *Cmd) { "Enables simulation of Guardall card with specified card number.\n" "Simulation runs until the button is pressed or another USB command is issued.\n" "The facility-code is 8-bit and the card number is 16-bit. Larger values are truncated.\n" - "Currently work only on 26bit", + "Currently work only on 26 | 36 bit format", "lf gproxii sim --fmt 26 --fc 123 --cn 1337\n" ); @@ -343,7 +343,7 @@ static int CmdGuardSim(const char *Cmd) { fmtlen &= 0x7F; uint32_t facilitycode = (fc & 0x000000FF); - uint32_t cardnumber = (cn & 0x0000FFFF); + uint32_t cardnumber = (cn & 0x000FFFFF); uint8_t bs[96]; memset(bs, 0x00, sizeof(bs)); From 43fc71673ac509a940a99b90d92df3fc90cbbec6 Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 18:02:08 -0500 Subject: [PATCH 05/73] 15693 sniff - Makefile/hf_15693sniff.c --- armsrc/Standalone/Makefile.hal | 22 ++--- armsrc/Standalone/Makefile.inc | 20 +---- armsrc/Standalone/hf_15693sniff.c | 129 ++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 33 deletions(-) create mode 100644 armsrc/Standalone/hf_15693sniff.c diff --git a/armsrc/Standalone/Makefile.hal b/armsrc/Standalone/Makefile.hal index f8277da97..b7fc6e11b 100644 --- a/armsrc/Standalone/Makefile.hal +++ b/armsrc/Standalone/Makefile.hal @@ -1,18 +1,3 @@ -#----------------------------------------------------------------------------- -# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See LICENSE.txt for the text of the license. -#----------------------------------------------------------------------------- # Default standalone if no standalone specified DEFAULT_STANDALONE=LF_SAMYRUN HELP_EXAMPLE_STANDALONE=LF_SAMYRUN @@ -62,6 +47,9 @@ define KNOWN_STANDALONE_DEFINITIONS | HF_14ASNIFF | 14a sniff to flashmem | | (RDV4 only) | | +----------------------------------------------------------+ +| HF_15693SNIFF | 15693 sniff to flashmem | +| (RDV4 only) | | ++----------------------------------------------------------+ | HF_AVEFUL | Mifare ultralight read/simulation | | | - Ave Ozkal | +----------------------------------------------------------+ @@ -107,10 +95,10 @@ define KNOWN_STANDALONE_DEFINITIONS endef STANDALONE_MODES := LF_SKELETON LF_EM4100EMUL LF_EM4100RSWB LF_EM4100RWC LF_HIDBRUTE LF_HIDFCBRUTE LF_ICEHID LF_PROXBRUTE LF_SAMYRUN LF_THAREXDE LF_NEXID -STANDALONE_MODES += HF_14ASNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MFCSIM HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG HF_REBLAY DANKARMULTI +STANDALONE_MODES += HF_14ASNIFF HF_15693SNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MFCSIM HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG HF_REBLAY DANKARMULTI STANDALONE_MODES_REQ_BT := HF_REBLAY STANDALONE_MODES_REQ_SMARTCARD := -STANDALONE_MODES_REQ_FLASH := LF_HIDFCBRUTE LF_ICEHID LF_NEXID LF_THAREXDE HF_14ASNIFF HF_BOG HF_COLIN HF_ICECLASS HF_MFCSIM +STANDALONE_MODES_REQ_FLASH := LF_HIDFCBRUTE LF_ICEHID LF_NEXID LF_THAREXDE HF_14ASNIFF HF_15693SNIFF HF_BOG HF_COLIN HF_ICECLASS HF_MFCSIM ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES)),) STANDALONE_PLATFORM_DEFS += -DWITH_STANDALONE_$(STANDALONE) ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES_REQ_SMARTCARD)),) diff --git a/armsrc/Standalone/Makefile.inc b/armsrc/Standalone/Makefile.inc index 021d219f4..c65533a57 100644 --- a/armsrc/Standalone/Makefile.inc +++ b/armsrc/Standalone/Makefile.inc @@ -1,20 +1,4 @@ -#----------------------------------------------------------------------------- -# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See LICENSE.txt for the text of the license. -#----------------------------------------------------------------------------- # Generic standalone Mode injection of source code -#----------------------------------------------------------------------------- SRC_STANDALONE = placeholder.c # WITH_STANDALONE_LF_SKELETON @@ -57,6 +41,10 @@ endif ifneq (,$(findstring WITH_STANDALONE_HF_14ASNIFF,$(APP_CFLAGS))) SRC_STANDALONE = hf_14asniff.c endif +# WITH_STANDALONE_HF_15693SNIFF +ifneq (,$(findstring WITH_STANDALONE_HF_15693SNIFF,$(APP_CFLAGS))) + SRC_STANDALONE = hf_15693sniff.c +endif # WITH_STANDALONE_HF_AVEFUL ifneq (,$(findstring WITH_STANDALONE_HF_AVEFUL,$(APP_CFLAGS))) SRC_STANDALONE = hf_aveful.c diff --git a/armsrc/Standalone/hf_15693sniff.c b/armsrc/Standalone/hf_15693sniff.c new file mode 100644 index 000000000..cf72bc646 --- /dev/null +++ b/armsrc/Standalone/hf_15693sniff.c @@ -0,0 +1,129 @@ +//----------------------------------------------------------------------------- +// Copyright 2020 Michael Farrell +// +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. +//----------------------------------------------------------------------------- +// main code for standalone HF/iso15693 Sniff to flash +//----------------------------------------------------------------------------- + +/* + * `hf_15693sniff` passively sniffs ISO15693 frames, and stores them in internal + * flash. It requires RDV4 hardware (for flash and battery). + * + * This module is similar to hf_bog (which only logs ULC/NTAG/ULEV1 auth). + * + * On entering stand-alone mode, this module will start sniffing ISO15693 frames. + * This will be stored in the normal trace buffer (ie: in RAM -- will be lost + * at power-off). + * + * Short-pressing the button again will stop sniffing, and at _this_ point + * append trace data from RAM to a file in flash (hf_15693sniff.trace) and unmount. + * + * Once the data is saved, standalone mode will exit. + * + * LEDs: + * - LED1: sniffing + * - LED2: sniffed tag command, turns off when finished sniffing reader command + * - LED3: sniffed reader command, turns off when finished sniffing tag command + * - LED4: unmounting/sync'ing flash (normally < 100ms) + * + * To retrieve trace data from flash: + * + * 1. mem spiffs dump -s hf_15693sniff.trace -d hf_15693sniff.trace + * Copies trace data file from flash to your PC. + * + * 2. trace load hf_15693sniff.trace + * Loads trace data from a file into PC-side buffers. + * + * 3. For ISO15693: trace list -t 15 -1 + * For MIFARE Classic: trace list -t mf -1 + * + * Lists trace data from buffer without requesting it from PM3. + * + * This module emits debug strings during normal operation -- so try it out in + * the lab connected to PM3 client before taking it into the field. + * + * To delete the trace data from flash: + * + * Caveats / notes: + * - Trace buffer will be cleared on starting stand-alone mode. Data in flash + * will remain unless explicitly deleted. + * - This module will terminate if the trace buffer is full (and save data to + * flash). + * - Like normal sniffing mode, timestamps overflow after 5 min 16 sec. + * However, the trace buffer is sequential, so will be in the correct order. + */ + +#include "standalone.h" // standalone definitions +#include "proxmark3_arm.h" +#include "fpgaloader.h" +#include "iso15693.h" +#include "iso15.h" +#include "util.h" +#include "spiffs.h" +#include "appmain.h" +#include "dbprint.h" +#include "ticks.h" +#include "BigBuf.h" + + + + +#define HF_15693SNIFF_LOGFILE "hf_15693sniff.trace" + +static void DownloadTraceInstructions(void) { + Dbprintf(""); + Dbprintf("To get the trace from flash and display it:"); + Dbprintf("1. mem spiffs dump -s "HF_15693SNIFF_LOGFILE" -d hf_15693sniff.trace"); + Dbprintf("2. trace load -f hf_15693sniff.trace"); + Dbprintf("3. trace list -t 15 -1"); +} + +void ModInfo(void) { + DbpString(" HF 15693 SNIFF, a ISO15693 sniffer with storing in flashmem"); + DownloadTraceInstructions(); +} + +void RunMod(void) { + StandAloneMode(); + + Dbprintf(_YELLOW_("HF 15693 SNIFF started")); + rdv40_spiffs_lazy_mount(); + + SniffIso15693(0, NULL); + + Dbprintf("Stopped sniffing"); + SpinDelay(200); + + // Write stuff to spiffs logfile + uint32_t trace_len = BigBuf_get_traceLen(); + if (trace_len > 0) { + Dbprintf("[!] Trace length (bytes) = %u", trace_len); + + uint8_t *trace_buffer = BigBuf_get_addr(); + if (!exists_in_spiffs(HF_15693SNIFF_LOGFILE)) { + rdv40_spiffs_write( + HF_15693SNIFF_LOGFILE, trace_buffer, trace_len, RDV40_SPIFFS_SAFETY_SAFE); + Dbprintf("[!] Wrote trace to "HF_15693SNIFF_LOGFILE); + } else { + rdv40_spiffs_append( + HF_15693SNIFF_LOGFILE, trace_buffer, trace_len, RDV40_SPIFFS_SAFETY_SAFE); + Dbprintf("[!] Appended trace to "HF_15693SNIFF_LOGFILE); + } + } else { + Dbprintf("[!] Trace buffer is empty, nothing to write!"); + } + + LED_D_ON(); + rdv40_spiffs_lazy_unmount(); + LED_D_OFF(); + + SpinErr(LED_A, 200, 5); + SpinDelay(100); + + Dbprintf("-=[ exit ]=-"); + LEDsoff(); + DownloadTraceInstructions(); +} From d5842d9d9203bd7757b0816edf426ff06e302b3e Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 18:12:28 -0500 Subject: [PATCH 06/73] changed beginning of 15693 sniff file --- armsrc/Standalone/hf_15693sniff.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/armsrc/Standalone/hf_15693sniff.c b/armsrc/Standalone/hf_15693sniff.c index cf72bc646..e44478f58 100644 --- a/armsrc/Standalone/hf_15693sniff.c +++ b/armsrc/Standalone/hf_15693sniff.c @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// Copyright 2020 Michael Farrell +// Copyright 2021 Nathan Glaser // // This code is licensed to you under the terms of the GNU GPL, version 2 or, // at your option, any later version. See the LICENSE.txt file for the text of @@ -9,11 +9,11 @@ //----------------------------------------------------------------------------- /* + * This is 95% the same code as Michael Farrell's hf_14ASNIFF Standalone mode. + * * `hf_15693sniff` passively sniffs ISO15693 frames, and stores them in internal * flash. It requires RDV4 hardware (for flash and battery). * - * This module is similar to hf_bog (which only logs ULC/NTAG/ULEV1 auth). - * * On entering stand-alone mode, this module will start sniffing ISO15693 frames. * This will be stored in the normal trace buffer (ie: in RAM -- will be lost * at power-off). @@ -38,7 +38,6 @@ * Loads trace data from a file into PC-side buffers. * * 3. For ISO15693: trace list -t 15 -1 - * For MIFARE Classic: trace list -t mf -1 * * Lists trace data from buffer without requesting it from PM3. * @@ -83,7 +82,7 @@ static void DownloadTraceInstructions(void) { void ModInfo(void) { DbpString(" HF 15693 SNIFF, a ISO15693 sniffer with storing in flashmem"); - DownloadTraceInstructions(); +// DownloadTraceInstructions(); } void RunMod(void) { From 323248060e10a3c62d481577d3891036040abf79 Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 18:16:41 -0500 Subject: [PATCH 07/73] changed description --- armsrc/Standalone/hf_15693sniff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/Standalone/hf_15693sniff.c b/armsrc/Standalone/hf_15693sniff.c index e44478f58..35e22c966 100644 --- a/armsrc/Standalone/hf_15693sniff.c +++ b/armsrc/Standalone/hf_15693sniff.c @@ -81,7 +81,7 @@ static void DownloadTraceInstructions(void) { } void ModInfo(void) { - DbpString(" HF 15693 SNIFF, a ISO15693 sniffer with storing in flashmem"); + DbpString(" HF 15693 SNIFF, a ISO15693 sniffer with storing in flashmem (Nathan Glaser)"); // DownloadTraceInstructions(); } From fcc9a315a29145efa3fe24848ab3e16257df20ed Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 18:19:33 -0500 Subject: [PATCH 08/73] Changelog.md update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6622413..07061b864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac - Fixed `SimulateTagLowFrequencyEx` ignoring the `ledcontrol` argument (@zabszk) - Added ledcontrol argument to LF operations (@zabszk) - Added new standalone mode `dankarmulti` - select and run multiple standalone modes (@dankar) + - Added new standalone mode `hf_15693SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem ## [crimson.4.14434][2021-09-18] - Fixed `hf mf staticnested` - flashmem / non loop now works (@horrordash) From 5ccc749f237c7bffea05cdc72b1ef68e836153ec Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 18:22:08 -0500 Subject: [PATCH 09/73] Added Advanced compilation parameters --- doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md b/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md index 150ad762a..1d2127926 100644 --- a/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md +++ b/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md @@ -113,6 +113,7 @@ Here are the supported values you can assign to `STANDALONE` in `Makefile.platfo | LF_SKELETON | standalone mode skeleton - Iceman1001 | LF_THAREXDE | LF EM4x50 simulator/read standalone mode - tharexde | HF_14ASNIFF | 14a sniff storing to flashmem - Micolous +| HF_15693SNIFF | 15693 sniff storing to flashmem - Glaser | HF_AVEFUL | MIFARE Ultralight read/simulation - Ave Ozkal | HF_BOG | 14a sniff with ULC/ULEV1/NTAG auth storing in flashmem - Bogito | HF_CRAFTBYTE | UID stealer - Emulates scanned 14a UID - Anze Jensterle From 30aa7aa7d1694ac9272cefdfb838931e1b46d990 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 7 Jan 2022 01:58:03 +0100 Subject: [PATCH 10/73] Adapting license headers, WIP --- AUTHORS.md | 7 ++- Makefile | 15 ++++++ Makefile.defs | 16 +++++- Makefile.host | 15 ++++++ client/CMakeLists.txt | 15 ++++++ client/Makefile | 16 ++++-- client/android/CMakeLists.txt | 16 ++++++ client/experimental_lib/CMakeLists.txt | 16 ++++++ client/include/pm3.h | 15 ++++++ client/src/aidsearch.c | 16 ++++-- client/src/aidsearch.h | 16 ++++-- client/src/atrs.c | 16 ++++-- client/src/atrs.h | 17 +++++-- client/src/cipurse/cipursecore.c | 16 ++++-- client/src/cipurse/cipursecore.h | 16 ++++-- client/src/cipurse/cipursecrypto.c | 16 ++++-- client/src/cipurse/cipursecrypto.h | 16 ++++-- client/src/cipurse/cipursetest.c | 16 ++++-- client/src/cipurse/cipursetest.h | 16 ++++-- client/src/cmdanalyse.c | 16 ++++-- client/src/cmdanalyse.h | 16 ++++-- client/src/cmdcrc.c | 20 ++++++-- client/src/cmdcrc.h | 18 +++++-- client/src/cmddata.c | 18 ++++--- client/src/cmddata.h | 16 ++++-- client/src/cmdflashmem.c | 16 ++++-- client/src/cmdflashmem.h | 16 ++++-- client/src/cmdflashmemspiffs.c | 16 ++++-- client/src/cmdflashmemspiffs.h | 16 ++++-- client/src/cmdhf.c | 20 +++++--- client/src/cmdhf.h | 18 +++++-- client/src/cmdhf14a.c | 19 ++++--- client/src/cmdhf14a.h | 19 ++++--- client/src/cmdhf14b.c | 17 +++++-- client/src/cmdhf14b.h | 16 ++++-- client/src/cmdhf15.c | 19 ++++--- client/src/cmdhf15.h | 16 ++++-- client/src/cmdhfcipurse.c | 16 ++++-- client/src/cmdhfcipurse.h | 16 ++++-- client/src/cmdhfcryptorf.c | 16 ++++-- client/src/cmdhfcryptorf.h | 16 ++++-- client/src/cmdhfemrtd.c | 16 ++++-- client/src/cmdhfemrtd.h | 16 ++++-- client/src/cmdhfepa.c | 16 ++++-- client/src/cmdhfepa.h | 16 ++++-- client/src/cmdhffelica.c | 20 +++++--- client/src/cmdhffelica.h | 20 +++++--- client/src/cmdhffido.c | 18 +++++-- client/src/cmdhffido.h | 16 ++++-- client/src/cmdhfgallagher.c | 29 +++++++---- client/src/cmdhfgallagher.h | 30 +++++++---- client/src/cmdhficlass.c | 20 +++++--- client/src/cmdhficlass.h | 17 +++++-- client/src/cmdhfjooki.c | 19 +++++-- client/src/cmdhfjooki.h | 18 +++++-- client/src/cmdhfksx6924.c | 16 ++++-- client/src/cmdhfksx6924.h | 16 ++++-- client/src/cmdhflegic.c | 16 ++++-- client/src/cmdhflegic.h | 16 ++++-- client/src/cmdhflist.c | 17 +++++-- client/src/cmdhflist.h | 16 ++++-- client/src/cmdhflto.c | 16 ++++-- client/src/cmdhflto.h | 16 ++++-- client/src/cmdhfmf.c | 16 ++++-- client/src/cmdhfmf.h | 16 ++++-- client/src/cmdhfmfdes.c | 17 +++++-- client/src/cmdhfmfdes.h | 17 +++++-- client/src/cmdhfmfhard.c | 19 ++++--- client/src/cmdhfmfhard.h | 16 ++++-- client/src/cmdhfmfp.c | 17 +++++-- client/src/cmdhfmfp.h | 16 ++++-- client/src/cmdhfmfu.c | 18 +++++-- client/src/cmdhfmfu.h | 17 +++++++ client/src/cmdhfseos.c | 16 ++++-- client/src/cmdhfseos.h | 16 ++++-- client/src/cmdhfst.c | 16 ++++-- client/src/cmdhfst.h | 16 ++++-- client/src/cmdhfst25ta.c | 16 ++++-- client/src/cmdhfst25ta.h | 16 ++++-- client/src/cmdhfthinfilm.c | 16 ++++-- client/src/cmdhfthinfilm.h | 16 ++++-- client/src/cmdhftopaz.c | 16 ++++-- client/src/cmdhftopaz.h | 16 ++++-- client/src/cmdhfwaveshare.c | 14 ++++++ client/src/cmdhfwaveshare.h | 14 ++++++ client/src/cmdhw.c | 16 ++++-- client/src/cmdhw.h | 16 ++++-- client/src/cmdlf.c | 20 +++++--- client/src/cmdlf.h | 16 ++++-- client/src/cmdlfawid.c | 16 ++++-- client/src/cmdlfawid.h | 16 ++++-- client/src/cmdlfcotag.c | 16 ++++-- client/src/cmdlfcotag.h | 16 ++++-- client/src/cmdlfdestron.c | 15 ++++-- client/src/cmdlfdestron.h | 15 ++++-- client/src/cmdlfem.c | 16 ++++-- client/src/cmdlfem.h | 17 +++++-- client/src/cmdlfem410x.c | 21 +++++--- client/src/cmdlfem410x.h | 18 +++++-- client/src/cmdlfem4x05.c | 18 +++++-- client/src/cmdlfem4x05.h | 18 +++++-- client/src/cmdlfem4x50.c | 16 ++++-- client/src/cmdlfem4x50.h | 16 ++++-- client/src/cmdlfem4x70.c | 16 ++++-- client/src/cmdlfem4x70.h | 16 ++++-- client/src/cmdlffdxb.c | 15 ++++-- client/src/cmdlffdxb.h | 15 ++++-- client/src/cmdlfgallagher.c | 17 +++++-- client/src/cmdlfgallagher.h | 16 ++++-- client/src/cmdlfguard.c | 16 ++++-- client/src/cmdlfguard.h | 15 ++++-- client/src/cmdlfhid.c | 18 +++++-- client/src/cmdlfhid.h | 16 ++++-- client/src/cmdlfhitag.c | 16 ++++-- client/src/cmdlfhitag.h | 18 +++++-- client/src/cmdlfidteck.c | 16 ++++-- client/src/cmdlfidteck.h | 15 ++++-- client/src/cmdlfindala.c | 15 ++++-- client/src/cmdlfindala.h | 15 ++++-- client/src/cmdlfio.c | 16 ++++-- client/src/cmdlfio.h | 15 ++++++ client/src/cmdlfjablotron.c | 15 ++++-- client/src/cmdlfjablotron.h | 15 ++++-- client/src/cmdlfkeri.c | 15 ++++-- client/src/cmdlfkeri.h | 17 +++++-- client/src/cmdlfmotorola.c | 16 ++++-- client/src/cmdlfmotorola.h | 16 ++++-- client/src/cmdlfnedap.c | 15 ++++-- client/src/cmdlfnedap.h | 15 ++++-- client/src/cmdlfnexwatch.c | 15 ++++-- client/src/cmdlfnexwatch.h | 15 ++++-- client/src/cmdlfnoralsy.c | 15 ++++-- client/src/cmdlfnoralsy.h | 15 ++++-- client/src/cmdlfpac.c | 17 +++++-- client/src/cmdlfpac.h | 15 ++++-- client/src/cmdlfparadox.c | 16 ++++-- client/src/cmdlfparadox.h | 15 ++++-- client/src/cmdlfpcf7931.c | 19 ++++--- client/src/cmdlfpcf7931.h | 19 ++++--- client/src/cmdlfpresco.c | 15 ++++-- client/src/cmdlfpresco.h | 15 ++++-- client/src/cmdlfpyramid.c | 15 ++++-- client/src/cmdlfpyramid.h | 15 ++++-- client/src/cmdlfsecurakey.c | 15 ++++-- client/src/cmdlfsecurakey.h | 15 ++++-- client/src/cmdlft55xx.c | 15 ++++-- client/src/cmdlft55xx.h | 15 ++++-- client/src/cmdlfti.c | 16 ++++-- client/src/cmdlfti.h | 16 ++++-- client/src/cmdlfverichip_disabled.c | 15 ++++-- client/src/cmdlfverichip_disabled.h | 15 ++++-- client/src/cmdlfviking.c | 16 ++++-- client/src/cmdlfviking.h | 15 ++++-- client/src/cmdlfvisa2000.c | 15 ++++-- client/src/cmdlfvisa2000.h | 15 ++++-- client/src/cmdlfzx8211.c | 16 ++++-- client/src/cmdlfzx8211.h | 15 ++++-- client/src/cmdmain.c | 17 +++++-- client/src/cmdmain.h | 16 ++++-- client/src/cmdnfc.c | 16 ++++-- client/src/cmdnfc.h | 16 ++++-- client/src/cmdparser.c | 16 ++++-- client/src/cmdparser.h | 16 ++++-- client/src/cmdscript.c | 19 ++++--- client/src/cmdscript.h | 18 +++++-- client/src/cmdsmartcard.c | 16 ++++-- client/src/cmdsmartcard.h | 16 ++++-- client/src/cmdtrace.c | 16 ++++-- client/src/cmdtrace.h | 16 ++++-- client/src/cmdusart.c | 16 ++++-- client/src/cmdusart.h | 16 ++++-- client/src/cmdwiegand.c | 18 +++++-- client/src/cmdwiegand.h | 18 +++++-- client/src/comms.c | 17 +++++-- client/src/comms.h | 17 +++++-- client/src/crypto/asn1dump.c | 18 +++++-- client/src/crypto/asn1dump.h | 16 ++++-- client/src/crypto/asn1utils.c | 16 ++++-- client/src/crypto/asn1utils.h | 16 ++++-- client/src/crypto/libpcrypto.c | 17 +++++-- client/src/crypto/libpcrypto.h | 16 ++++-- client/src/elf.h | 16 ++++-- client/src/emojis.h | 15 ++++++ client/src/emojis_alt.h | 15 ++++++ client/src/emv/cmdemv.c | 18 +++++-- client/src/emv/cmdemv.h | 18 +++++-- client/src/emv/crypto.c | 33 ++++++------ client/src/emv/crypto.h | 33 ++++++------ client/src/emv/crypto_backend.h | 33 ++++++------ client/src/emv/crypto_polarssl.c | 34 +++++++------ client/src/emv/dol.c | 33 ++++++------ client/src/emv/dol.h | 33 ++++++------ client/src/emv/emv_pk.c | 33 ++++++------ client/src/emv/emv_pk.h | 33 ++++++------ client/src/emv/emv_pki.c | 33 ++++++------ client/src/emv/emv_pki.h | 33 ++++++------ client/src/emv/emv_pki_priv.c | 33 ++++++------ client/src/emv/emv_pki_priv.h | 33 ++++++------ client/src/emv/emv_roca.c | 38 +++++++------- client/src/emv/emv_roca.h | 38 +++++++------- client/src/emv/emv_tags.c | 33 ++++++------ client/src/emv/emv_tags.h | 33 ++++++------ client/src/emv/emvcore.c | 16 ++++-- client/src/emv/emvcore.h | 16 ++++-- client/src/emv/emvjson.c | 16 ++++-- client/src/emv/emvjson.h | 16 ++++-- client/src/emv/test/cda_test.c | 33 ++++++------ client/src/emv/test/cda_test.h | 34 +++++++------ client/src/emv/test/crypto_test.c | 33 ++++++------ client/src/emv/test/crypto_test.h | 33 ++++++------ client/src/emv/test/cryptotest.c | 16 ++++-- client/src/emv/test/cryptotest.h | 16 ++++-- client/src/emv/test/dda_test.c | 33 ++++++------ client/src/emv/test/dda_test.h | 33 ++++++------ client/src/emv/test/sda_test.c | 33 ++++++------ client/src/emv/test/sda_test.h | 33 ++++++------ client/src/emv/tlv.c | 35 +++++++------ client/src/emv/tlv.h | 35 +++++++------ client/src/fido/additional_ca.c | 17 +++++-- client/src/fido/additional_ca.h | 17 +++++-- client/src/fido/cbortools.c | 17 +++++-- client/src/fido/cbortools.h | 17 +++++-- client/src/fido/cose.c | 17 +++++-- client/src/fido/cose.h | 17 +++++-- client/src/fido/fidocore.c | 17 +++++-- client/src/fido/fidocore.h | 17 +++++-- client/src/fileutils.c | 44 ++++++---------- client/src/fileutils.h | 44 ++++++---------- client/src/flash.c | 16 ++++-- client/src/flash.h | 16 ++++-- client/src/graph.c | 16 ++++-- client/src/graph.h | 16 ++++-- client/src/guidummy.cpp | 16 ++++-- client/src/iso7816/apduinfo.c | 16 ++++-- client/src/iso7816/apduinfo.h | 16 ++++-- client/src/iso7816/iso7816core.c | 16 ++++-- client/src/iso7816/iso7816core.h | 16 ++++-- client/src/jansson_path.c | 26 +++++++--- client/src/jansson_path.h | 24 ++++++--- client/src/ksx6924/ksx6924core.c | 16 ++++-- client/src/ksx6924/ksx6924core.h | 16 ++++-- client/src/loclass/cipher.c | 70 ++++++++++++-------------- client/src/loclass/cipher.h | 70 ++++++++++++-------------- client/src/loclass/cipherutils.c | 69 ++++++++++++------------- client/src/loclass/cipherutils.h | 69 ++++++++++++------------- client/src/loclass/elite_crack.c | 70 ++++++++++++-------------- client/src/loclass/elite_crack.h | 70 ++++++++++++-------------- client/src/loclass/hash1_brute.c | 15 ++++++ client/src/loclass/hash1_brute.h | 15 ++++++ client/src/loclass/ikeys.c | 70 ++++++++++++-------------- client/src/loclass/ikeys.h | 69 ++++++++++++------------- client/src/mifare/aiddesfire.c | 16 ++++-- client/src/mifare/aiddesfire.h | 16 ++++-- client/src/mifare/desfirecore.c | 20 +++++--- client/src/mifare/desfirecore.h | 20 +++++--- client/src/mifare/desfirecrypto.c | 36 +++++++------ client/src/mifare/desfirecrypto.h | 36 +++++++------ client/src/mifare/desfiresecurechan.c | 20 +++++--- client/src/mifare/desfiresecurechan.h | 20 +++++--- client/src/mifare/desfiretest.c | 18 ++++--- client/src/mifare/desfiretest.h | 16 ++++-- client/src/mifare/gallaghercore.c | 27 ++++++---- client/src/mifare/gallaghercore.h | 25 +++++---- client/src/mifare/lrpcrypto.c | 38 +++++++------- client/src/mifare/lrpcrypto.h | 38 +++++++------- client/src/mifare/mad.c | 16 ++++-- client/src/mifare/mad.h | 16 ++++-- client/src/mifare/mfkey.c | 19 ++++--- client/src/mifare/mfkey.h | 19 ++++--- client/src/mifare/mifare4.c | 17 +++++-- client/src/mifare/mifare4.h | 17 +++++-- client/src/mifare/mifaredefault.c | 16 ++++-- client/src/mifare/mifaredefault.h | 16 ++++-- client/src/mifare/mifarehost.c | 20 ++++++-- client/src/mifare/mifarehost.h | 20 ++++++-- client/src/nfc/ndef.c | 16 ++++-- client/src/nfc/ndef.h | 16 ++++-- client/src/pm3.c | 14 ++++++ client/src/pm3_binlib.c | 30 +++++++---- client/src/pm3_binlib.h | 21 ++++++++ client/src/pm3_bit_limits.h | 15 ++++++ client/src/pm3_bitlib.c | 22 ++++++-- client/src/pm3_bitlib.h | 19 +++++++ client/src/preferences.c | 16 ++++-- client/src/preferences.h | 16 ++++-- client/src/prng.c | 16 +++++- client/src/prng.h | 16 +++++- client/src/proxendian.h | 16 ++++-- client/src/proxgui.cpp | 16 ++++-- client/src/proxgui.h | 16 ++++-- client/src/proxguiqt.cpp | 16 ++++-- client/src/proxguiqt.h | 16 ++++-- client/src/proxmark3.c | 17 +++++-- client/src/proxmark3.h | 17 +++++-- client/src/rl_vocabulory.h | 16 ++++-- client/src/scandir.c | 29 +++++++---- client/src/scandir.h | 21 +++++--- client/src/scripting.c | 17 +++++-- client/src/scripting.h | 16 ++++-- client/src/tea.c | 20 ++++++-- client/src/tea.h | 20 ++++++-- client/src/uart/uart.h | 47 +++++++---------- client/src/uart/uart_posix.c | 51 +++++++------------ client/src/uart/uart_win32.c | 54 +++++++------------- client/src/ui.c | 17 +++++-- client/src/ui.h | 16 ++++-- client/src/util.c | 16 ++++-- client/src/util.h | 16 ++++-- client/src/util_darwin.h | 16 ++++-- client/src/util_darwin.m | 16 ++++-- client/src/wiegand_formats.c | 18 +++++-- client/src/wiegand_formats.h | 16 ++++-- client/src/wiegand_formatutils.c | 16 ++++-- client/src/wiegand_formatutils.h | 16 ++++-- common/bucketsort.c | 15 ++++++ common/bucketsort.h | 15 ++++++ common/cardhelper.c | 16 ++++-- common/cardhelper.h | 16 ++++-- common/commonutil.c | 16 ++++-- common/commonutil.h | 16 ++++-- common/crapto1/crapto1.c | 35 ++++++------- common/crapto1/crapto1.h | 35 ++++++------- common/crapto1/crypto1.c | 35 ++++++------- common/crc.c | 16 ++++-- common/crc.h | 16 ++++-- common/crc16.c | 16 ++++-- common/crc16.h | 16 ++++-- common/crc32.c | 15 ++++++ common/crc32.h | 16 ++++-- common/crc64.c | 15 ++++++ common/crc64.h | 16 ++++-- common/cryptorf/cryptolib.c | 40 +++++++-------- common/cryptorf/cryptolib.h | 40 +++++++-------- common/default_version_pm3.c | 15 ++++++ common/generator.c | 16 ++++-- common/generator.h | 16 ++++-- common/get_lz4.sh | 16 ++++++ common/iso15693tools.c | 16 ++++-- common/iso15693tools.h | 18 +++++-- common/legic_prng.c | 18 +++++-- common/legic_prng.h | 18 +++++-- common/lfdemod.c | 19 ++++--- common/lfdemod.h | 19 ++++--- common/parity.c | 16 ++++-- common/parity.h | 16 ++++-- common/util_posix.c | 16 ++++-- common/util_posix.h | 16 ++++-- common_arm/Makefile.common | 16 ++++-- common_arm/Makefile.hal | 15 ++++++ common_arm/clocks.c | 15 ++++++ common_arm/clocks.h | 15 ++++++ common_arm/ldscript.common | 28 +++++++---- common_arm/usb_cdc.c | 51 +++++++------------ common_arm/usb_cdc.h | 51 +++++++------------ common_fpga/fpga.h | 16 ++++-- include/ansi.h | 15 ++++++ include/common.h | 15 ++++-- include/config_gpio.h | 16 ++++-- include/desfire.h | 15 ++++++ include/em4x50.h | 16 ++++-- include/em4x70.h | 16 ++++-- include/hitag.h | 20 +++++--- include/iclass_cmd.h | 16 ++++-- include/iso14b.h | 16 ++++-- include/iso15.h | 16 ++++-- include/iso18.h | 16 ++++-- include/legic.h | 16 ++++-- include/mifare.h | 16 ++++-- include/pm3_cmd.h | 17 +++++-- include/pmflash.h | 15 ++++-- include/protocols.h | 15 ++++++ include/proxmark3_arm.h | 16 ++++-- include/usart_defs.h | 15 ++++++ include/zx8211.h | 16 ++++-- tools/build_all_firmwares.sh | 15 ++++++ 375 files changed, 5186 insertions(+), 2346 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 7fde2b668..c453bb1dc 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -13,5 +13,10 @@ Therefore, only the following copyright notices are left untouched in the corres - copyright notices present in the `20090306_ela` release - copyright notices of code borrowed from other projects - copyright notices of standalone modes initial authors +- copyright notices of dependencies (client/deps, common) -Since then, copyright of each contribution is tracked by the Git history. See the output of `git shortlog -nse` for a full list. See also [the Contributors page on Github](https://github.com/RfidResearchGroup/proxmark3/graphs/contributors). +Since then, copyright of each contribution is tracked by the Git history. See the output of `git shortlog -nse` for a full list or `git log --pretty=short --follow |git shortlog -ne` to track a specific file. See also [the Contributors page on Github](https://github.com/RfidResearchGroup/proxmark3/graphs/contributors). + +A [mailmap](.mailmap) is maintained to map author and committer names and email addresses to canonical real names and email addresses. + +If by accident a copyright was removed from a file and is *not* directly deducible from the Git history, please submit a PR. diff --git a/Makefile b/Makefile index 6b041b54a..32c9b26aa 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,18 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- -include Makefile.platform -include .Makefile.options.cache diff --git a/Makefile.defs b/Makefile.defs index ffde9cec1..06396d3d0 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -1,4 +1,18 @@ -# Hide full compilation line: +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- ifneq ($(V),1) Q?=@ endif diff --git a/Makefile.host b/Makefile.host index 694ab5a1c..9be2caa32 100644 --- a/Makefile.host +++ b/Makefile.host @@ -1,3 +1,18 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # This Makefile might have been called from various subdirs, trying to find our Makefile.defs ifeq ($(DEFSBEENHERE),) -include Makefile.defs diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 574303188..454bbdd7d 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,3 +1,18 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # Usage: # mkdir build # cd build diff --git a/client/Makefile b/client/Makefile index 2bbc72af6..08b935919 100644 --- a/client/Makefile +++ b/client/Makefile @@ -1,7 +1,17 @@ #----------------------------------------------------------------------------- -# This code is licensed to you under the terms of the GNU GPL, version 2 or, -# at your option, any later version. See the LICENSE.txt file for the text of -# the license. +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. #----------------------------------------------------------------------------- ifeq ($(PLTNAME),) diff --git a/client/android/CMakeLists.txt b/client/android/CMakeLists.txt index 9bf318d09..e8c9f9e3c 100644 --- a/client/android/CMakeLists.txt +++ b/client/android/CMakeLists.txt @@ -1,3 +1,19 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Jonathan Westhues, Mar 2006 +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # version message(STATUS "CMake ${CMAKE_VERSION}") cmake_minimum_required(VERSION 3.4.1) diff --git a/client/experimental_lib/CMakeLists.txt b/client/experimental_lib/CMakeLists.txt index a693a37e6..b39ede6fe 100644 --- a/client/experimental_lib/CMakeLists.txt +++ b/client/experimental_lib/CMakeLists.txt @@ -1,3 +1,19 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Jonathan Westhues, Mar 2006 +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # Usage: # mkdir build # cd build diff --git a/client/include/pm3.h b/client/include/pm3.h index b9814ae48..ff0a69d0c 100644 --- a/client/include/pm3.h +++ b/client/include/pm3.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef LIBPM3_H #define LIBPM3_H diff --git a/client/src/aidsearch.c b/client/src/aidsearch.c index 377bc2f9e..3e9e6fc0b 100644 --- a/client/src/aidsearch.c +++ b/client/src/aidsearch.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 merlokk +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 AID list library //----------------------------------------------------------------------------- diff --git a/client/src/aidsearch.h b/client/src/aidsearch.h index e3783fd71..b394d43df 100644 --- a/client/src/aidsearch.h +++ b/client/src/aidsearch.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 merlokk +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 AID list library //----------------------------------------------------------------------------- diff --git a/client/src/atrs.c b/client/src/atrs.c index af404a6eb..0b22eb79b 100644 --- a/client/src/atrs.c +++ b/client/src/atrs.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ATR information lookup //----------------------------------------------------------------------------- diff --git a/client/src/atrs.h b/client/src/atrs.h index 7b1f9ed9b..dd160b17d 100644 --- a/client/src/atrs.h +++ b/client/src/atrs.h @@ -1,11 +1,20 @@ //----------------------------------------------------------------------------- -// List scraped from +// Borrowed initially from // https://raw.githubusercontent.com/LudovicRousseau/pcsc-tools/master/smartcard_list.txt // Copyright (C) 2002-2021 Ludovic Rousseau +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- #ifndef ATRS_H__ diff --git a/client/src/cipurse/cipursecore.c b/client/src/cipurse/cipursecore.c index 2de99429e..3ff3e80e6 100644 --- a/client/src/cipurse/cipursecore.c +++ b/client/src/cipurse/cipursecore.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CIPURSE transport cards data and commands //----------------------------------------------------------------------------- diff --git a/client/src/cipurse/cipursecore.h b/client/src/cipurse/cipursecore.h index 29b3d56fd..7eba93c1f 100644 --- a/client/src/cipurse/cipursecore.h +++ b/client/src/cipurse/cipursecore.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CIPURSE transport cards data and commands //----------------------------------------------------------------------------- diff --git a/client/src/cipurse/cipursecrypto.c b/client/src/cipurse/cipursecrypto.c index 63519d468..ed823d9bb 100644 --- a/client/src/cipurse/cipursecrypto.c +++ b/client/src/cipurse/cipursecrypto.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CIPURSE crypto primitives //----------------------------------------------------------------------------- diff --git a/client/src/cipurse/cipursecrypto.h b/client/src/cipurse/cipursecrypto.h index 7d5bc19f0..2c0c3138d 100644 --- a/client/src/cipurse/cipursecrypto.h +++ b/client/src/cipurse/cipursecrypto.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CIPURSE crypto primitives //----------------------------------------------------------------------------- diff --git a/client/src/cipurse/cipursetest.c b/client/src/cipurse/cipursetest.c index 3d6015d2d..6e1ba9609 100644 --- a/client/src/cipurse/cipursetest.c +++ b/client/src/cipurse/cipursetest.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // tests for crypto //----------------------------------------------------------------------------- diff --git a/client/src/cipurse/cipursetest.h b/client/src/cipurse/cipursetest.h index 1f69a3abc..941d9e7cc 100644 --- a/client/src/cipurse/cipursetest.h +++ b/client/src/cipurse/cipursetest.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // tests for crypto //----------------------------------------------------------------------------- diff --git a/client/src/cmdanalyse.c b/client/src/cmdanalyse.c index d30f7d298..716107956 100644 --- a/client/src/cmdanalyse.c +++ b/client/src/cmdanalyse.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2016 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Analyse bytes commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdanalyse.h b/client/src/cmdanalyse.h index 4d223be1b..09ed459d4 100644 --- a/client/src/cmdanalyse.h +++ b/client/src/cmdanalyse.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2016 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Data and Graph commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdcrc.c b/client/src/cmdcrc.c index e5207544f..98befcc00 100644 --- a/client/src/cmdcrc.c +++ b/client/src/cmdcrc.c @@ -1,11 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2015 iceman +// Borrowed initially from https://reveng.sourceforge.io/ +// Copyright (C) Greg Cook 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// CRC Calculations from the software reveng commands +// CRC Calculations //----------------------------------------------------------------------------- #include "cmdcrc.h" diff --git a/client/src/cmdcrc.h b/client/src/cmdcrc.h index 957cd1eec..b642a4bf6 100644 --- a/client/src/cmdcrc.h +++ b/client/src/cmdcrc.h @@ -1,9 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2015 iceman +// Borrowed initially from https://reveng.sourceforge.io/ +// Copyright (C) Greg Cook 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CRC Calculations from the software reveng commands //----------------------------------------------------------------------------- diff --git a/client/src/cmddata.c b/client/src/cmddata.c index 5c70a99eb..84eb220f9 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -1,11 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// modified Marshmellow, -// modified Iceman 2019, 2020, 2021 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Data and Graph commands //----------------------------------------------------------------------------- diff --git a/client/src/cmddata.h b/client/src/cmddata.h index 4bddfcf0a..bcf8afac1 100644 --- a/client/src/cmddata.h +++ b/client/src/cmddata.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Data and Graph commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdflashmem.c b/client/src/cmdflashmem.c index c2e5591a6..b1cf1fdfd 100644 --- a/client/src/cmdflashmem.c +++ b/client/src/cmdflashmem.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 Flash memory commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdflashmem.h b/client/src/cmdflashmem.h index 5a8f6eebc..60bdd5857 100644 --- a/client/src/cmdflashmem.h +++ b/client/src/cmdflashmem.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 Flash memory commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdflashmemspiffs.c b/client/src/cmdflashmemspiffs.c index 407f1e54c..b3234ba1a 100644 --- a/client/src/cmdflashmemspiffs.c +++ b/client/src/cmdflashmemspiffs.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 Flash memory commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdflashmemspiffs.h b/client/src/cmdflashmemspiffs.h index 385d78401..042704b11 100644 --- a/client/src/cmdflashmemspiffs.h +++ b/client/src/cmdflashmemspiffs.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 Flash memory commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index ce87a5e62..1e29eb139 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -1,13 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// Merlok - 2017 -// Doegox - 2019 -// Iceman - 2019 -// Piwi - 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf.h b/client/src/cmdhf.h index c54fd076c..55f5d081d 100644 --- a/client/src/cmdhf.h +++ b/client/src/cmdhf.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// Piwi, Feb 2019 -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 6d3a89fa4..9317147ea 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -1,12 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh , Hagen Fritsch -// 2011, 2017 - 2019 Merlok -// 2014, Peter Fillmore -// 2015, 2016, 2017 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf14a.h b/client/src/cmdhf14a.h index 953f84e8c..72d2e6e4f 100644 --- a/client/src/cmdhf14a.h +++ b/client/src/cmdhf14a.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// 2011,2019 Merlok -// 2015,2016,2017 iceman, marshmellow, piwi -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf14b.c b/client/src/cmdhf14b.c index 91f84aa0d..28f4ec9ee 100644 --- a/client/src/cmdhf14b.c +++ b/client/src/cmdhf14b.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// Modified 2018, 2020 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443B commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf14b.h b/client/src/cmdhf14b.h index 7f311898f..b81149722 100644 --- a/client/src/cmdhf14b.h +++ b/client/src/cmdhf14b.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443B commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 16071df8b..38f07b6ae 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -1,12 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// Modified 2010-2012 by -// Modified 2012 by -// Modified 2018 by +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO15693 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhf15.h b/client/src/cmdhf15.h index 42e5e12c0..8803a58b4 100644 --- a/client/src/cmdhf15.h +++ b/client/src/cmdhf15.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO15693 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfcipurse.c b/client/src/cmdhfcipurse.c index 02010e454..e082af37a 100644 --- a/client/src/cmdhfcipurse.c +++ b/client/src/cmdhfcipurse.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency FIDO U2F and FIDO2 contactless authenticators //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfcipurse.h b/client/src/cmdhfcipurse.h index 85e98ed60..0aa2303cc 100644 --- a/client/src/cmdhfcipurse.h +++ b/client/src/cmdhfcipurse.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency FIDO U2F and FIDO2 contactless authenticators //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfcryptorf.c b/client/src/cmdhfcryptorf.c index a4cdf0272..db17c75c0 100644 --- a/client/src/cmdhfcryptorf.c +++ b/client/src/cmdhfcryptorf.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency CryptoRF commands (ISO14443B) //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfcryptorf.h b/client/src/cmdhfcryptorf.h index 544532d20..53412fce9 100644 --- a/client/src/cmdhfcryptorf.h +++ b/client/src/cmdhfcryptorf.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency CryptoRF commands (ISO14443B) //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfemrtd.c b/client/src/cmdhfemrtd.c index 493720853..ed87fd591 100644 --- a/client/src/cmdhfemrtd.c +++ b/client/src/cmdhfemrtd.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 A. Ozkal +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Electronic Machine Readable Travel Document commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfemrtd.h b/client/src/cmdhfemrtd.h index 45d0d28df..1b9588983 100644 --- a/client/src/cmdhfemrtd.h +++ b/client/src/cmdhfemrtd.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 A. Ozkal +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Electronic Machine Readable Travel Document commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfepa.c b/client/src/cmdhfepa.c index 9864cc55e..4f230ea04 100644 --- a/client/src/cmdhfepa.c +++ b/client/src/cmdhfepa.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2012 Frederik Mรถllers +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Commands related to the German electronic Identification Card //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfepa.h b/client/src/cmdhfepa.h index da21630cd..ecf8eac38 100644 --- a/client/src/cmdhfepa.h +++ b/client/src/cmdhfepa.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2012 Frederik Mรถllers +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Commands related to the German electronic Identification Card //----------------------------------------------------------------------------- diff --git a/client/src/cmdhffelica.c b/client/src/cmdhffelica.c index 7a9c5acac..0f67fc8f6 100644 --- a/client/src/cmdhffelica.c +++ b/client/src/cmdhffelica.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 October, Satsuoni -// 2017,2021 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// High frequency ISO18092 / FeliCa commands +// High frequency ISO 18002 / FeliCa commands //----------------------------------------------------------------------------- #include "cmdhffelica.h" #include diff --git a/client/src/cmdhffelica.h b/client/src/cmdhffelica.h index 63f738a2d..9cb524814 100644 --- a/client/src/cmdhffelica.h +++ b/client/src/cmdhffelica.h @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 October, Satsuoni -// 2017 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// High frequency ISO18092 / FeliCa commands +// High frequency ISO 18002 / FeliCa commands //----------------------------------------------------------------------------- #ifndef CMDHFFELICA_H__ diff --git a/client/src/cmdhffido.c b/client/src/cmdhffido.c index f2dbc38fa..1698ac8a5 100644 --- a/client/src/cmdhffido.c +++ b/client/src/cmdhffido.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// High frequency MIFARE Plus commands +// High frequency FIDO U2F and FIDO2 contactless authenticators //----------------------------------------------------------------------------- // // Documentation here: diff --git a/client/src/cmdhffido.h b/client/src/cmdhffido.h index 9aca8ecc8..c90bf7cfe 100644 --- a/client/src/cmdhffido.h +++ b/client/src/cmdhffido.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency FIDO U2F and FIDO2 contactless authenticators //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index e95e25bcc..2182fee88 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -1,14 +1,21 @@ -/** - * Matt Moran (@DarkMatterMatt), 2021 - * ----------------------------------------------------------------------------- - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * ----------------------------------------------------------------------------- - * High frequency GALLAGHER tag commands. - * MIFARE DESFire, AIDs 2081F4-2F81F4 - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// High frequency GALLAGHER tag commands. +// MIFARE DESFire, AIDs 2081F4-2F81F4 +//----------------------------------------------------------------------------- #include "cmdhfgallagher.h" #include "generator.h" diff --git a/client/src/cmdhfgallagher.h b/client/src/cmdhfgallagher.h index c4ed31784..867c14c2f 100644 --- a/client/src/cmdhfgallagher.h +++ b/client/src/cmdhfgallagher.h @@ -1,14 +1,22 @@ -/** - * Matt Moran (@DarkMatterMatt), 2021 - * ----------------------------------------------------------------------------- - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * ----------------------------------------------------------------------------- - * High frequency GALLAGHER tag commands. - * MIFARE DESFire, AIDs 2081F4-2F81F4 - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// High frequency GALLAGHER tag commands. +// MIFARE DESFire, AIDs 2081F4-2F81F4 +//----------------------------------------------------------------------------- + #ifndef CMDHFGALLAGHER_H__ #define CMDHFGALLAGHER_H__ diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 3880361dc..15e04a270 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -1,13 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh , Hagen Fritsch -// Copyright (C) 2011 Gerhard de Koning Gans -// Copyright (C) 2014 Midnitesnake & Andy Davies & Martin Holst Swende -// Copyright (C) 2019 piwi -// Copyright (C) 2020 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency iClass commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhficlass.h b/client/src/cmdhficlass.h index 9474dde45..f66a09a5e 100644 --- a/client/src/cmdhficlass.h +++ b/client/src/cmdhficlass.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// Copyright (C) 2011 Gerhard de Koning Gans +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency iClass support //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfjooki.c b/client/src/cmdhfjooki.c index 0c89406ba..bc0cdf89a 100644 --- a/client/src/cmdhfjooki.c +++ b/client/src/cmdhfjooki.c @@ -1,10 +1,19 @@ //----------------------------------------------------------------------------- -// Ultralight Code (c) 2021 Iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// High frequency MIFARE ULTRALIGHT / Jooki commands +// High frequency Jooki commands //----------------------------------------------------------------------------- #include "cmdhfjooki.h" #include diff --git a/client/src/cmdhfjooki.h b/client/src/cmdhfjooki.h index ac3ecc3af..23f48b70e 100644 --- a/client/src/cmdhfjooki.h +++ b/client/src/cmdhfjooki.h @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 iceman1001 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// High frequency ISO14443A / MFU / Jooki commands +// High frequency Jooki commands //----------------------------------------------------------------------------- #ifndef CMDHFJOOKI_H__ diff --git a/client/src/cmdhfksx6924.c b/client/src/cmdhfksx6924.c index 9014ca519..8a9ec747a 100644 --- a/client/src/cmdhfksx6924.c +++ b/client/src/cmdhfksx6924.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 micolous+git@gmail.com +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Commands for KS X 6924 transit cards (T-Money, Snapper+) //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfksx6924.h b/client/src/cmdhfksx6924.h index 3917479f8..4dc2082dd 100644 --- a/client/src/cmdhfksx6924.h +++ b/client/src/cmdhfksx6924.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 micolous+git@gmail.com +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Commands for KS X 6924 transit cards (T-Money, Snapper+) //----------------------------------------------------------------------------- diff --git a/client/src/cmdhflegic.c b/client/src/cmdhflegic.c index d96fa320f..16f5656a7 100644 --- a/client/src/cmdhflegic.c +++ b/client/src/cmdhflegic.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Legic commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhflegic.h b/client/src/cmdhflegic.h index 379ae13c7..9f5681845 100644 --- a/client/src/cmdhflegic.h +++ b/client/src/cmdhflegic.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Legic commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index ea22f4f31..1d7bda5b7 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) Merlok - 2017 -// iceman 2018 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Command: hf mf list. It shows data from arm buffer. //----------------------------------------------------------------------------- diff --git a/client/src/cmdhflist.h b/client/src/cmdhflist.h index 06a6d3abe..d42cdeba9 100644 --- a/client/src/cmdhflist.h +++ b/client/src/cmdhflist.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) Merlok - 2017 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Command: hf mf list. It shows data from arm buffer. //----------------------------------------------------------------------------- diff --git a/client/src/cmdhflto.c b/client/src/cmdhflto.c index 71eea185b..136895c19 100644 --- a/client/src/cmdhflto.c +++ b/client/src/cmdhflto.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // LTO-CM commands // LTO Cartridge memory diff --git a/client/src/cmdhflto.h b/client/src/cmdhflto.h index 67179c2ae..beade8fa9 100644 --- a/client/src/cmdhflto.h +++ b/client/src/cmdhflto.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // LTO-CM commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index eb4097ee7..13cbc248d 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2011,2012 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmf.h b/client/src/cmdhfmf.h index e887efa38..32b6a909a 100644 --- a/client/src/cmdhfmf.h +++ b/client/src/cmdhfmf.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2011 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 65989045c..e0cf6b400 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2014 Iceman -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE Desfire commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfdes.h b/client/src/cmdhfmfdes.h index 60ef9c35f..88d2cdb32 100644 --- a/client/src/cmdhfmfdes.h +++ b/client/src/cmdhfmfdes.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) Iceman, 2014 -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE Desfire commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfhard.c b/client/src/cmdhfmfhard.c index d26a4a51f..21de93499 100644 --- a/client/src/cmdhfmfhard.c +++ b/client/src/cmdhfmfhard.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2015, 2016 by piwi -// fiddled with 2016 Azcid (hardnested bitsliced Bruteforce imp) -// fiddled with 2016 Matrix ( sub testing of nonces while collecting ) -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Implements a card only attack based on crypto text (encrypted nonces // received during a nested authentication) only. Unlike other card only diff --git a/client/src/cmdhfmfhard.h b/client/src/cmdhfmfhard.h index 6761626b2..2132ea5c5 100644 --- a/client/src/cmdhfmfhard.h +++ b/client/src/cmdhfmfhard.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2015 piwi +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // hf mf hardnested command //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfp.c b/client/src/cmdhfmfp.c index d422a2c2b..279d6e270 100644 --- a/client/src/cmdhfmfp.c +++ b/client/src/cmdhfmfp.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok -// Copyright (C) 2018 drHatson +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE Plus commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfp.h b/client/src/cmdhfmfp.h index 14c1e65c7..7381f87a2 100644 --- a/client/src/cmdhfmfp.h +++ b/client/src/cmdhfmfp.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE Plus commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 311b02b17..df8715e72 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Ultralight Code (c) 2013,2014 Midnitesnake & Andy Davies of Pentura -// 2015,2016,2017 Iceman, Marshmellow -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency MIFARE ULTRALIGHT (C) commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfmfu.h b/client/src/cmdhfmfu.h index 9a220e6ec..b6387f191 100644 --- a/client/src/cmdhfmfu.h +++ b/client/src/cmdhfmfu.h @@ -1,3 +1,20 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// High frequency MIFARE ULTRALIGHT (C) commands +//----------------------------------------------------------------------------- #ifndef CMDHFMFU_H__ #define CMDHFMFU_H__ diff --git a/client/src/cmdhfseos.c b/client/src/cmdhfseos.c index a27bad605..350df87f5 100644 --- a/client/src/cmdhfseos.c +++ b/client/src/cmdhfseos.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // SEOS commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfseos.h b/client/src/cmdhfseos.h index 8f77d3610..32ffb6510 100644 --- a/client/src/cmdhfseos.h +++ b/client/src/cmdhfseos.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // SEOS commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index 28af644c4..28cfce0d4 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman1001 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A / ST commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfst.h b/client/src/cmdhfst.h index 828a4a286..4cf250076 100644 --- a/client/src/cmdhfst.h +++ b/client/src/cmdhfst.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman1001 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A / ST commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfst25ta.c b/client/src/cmdhfst25ta.c index 111ea4b5f..54c432ab9 100644 --- a/client/src/cmdhfst25ta.c +++ b/client/src/cmdhfst25ta.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman1001 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A / ST25TA commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfst25ta.h b/client/src/cmdhfst25ta.h index 3c0ed9a2f..0b1a9c992 100644 --- a/client/src/cmdhfst25ta.h +++ b/client/src/cmdhfst25ta.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman1001 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A / ST25TA commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfthinfilm.c b/client/src/cmdhfthinfilm.c index 0630fe620..320bacf4a 100644 --- a/client/src/cmdhfthinfilm.c +++ b/client/src/cmdhfthinfilm.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Thinfilm commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfthinfilm.h b/client/src/cmdhfthinfilm.h index 48130f962..def77824c 100644 --- a/client/src/cmdhfthinfilm.h +++ b/client/src/cmdhfthinfilm.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Thinfilm commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhftopaz.c b/client/src/cmdhftopaz.c index 6523cb356..42351ed50 100644 --- a/client/src/cmdhftopaz.c +++ b/client/src/cmdhftopaz.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2015 Piwi +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Topaz (NFC Type 1) commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhftopaz.h b/client/src/cmdhftopaz.h index c76d1a366..499436107 100644 --- a/client/src/cmdhftopaz.h +++ b/client/src/cmdhftopaz.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2015 Piwi +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Topaz (NFC Type 1) commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index dd62633c2..67709035c 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -1,4 +1,18 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- // Waveshare commands //----------------------------------------------------------------------------- // from ST25R3911B-NFC-Demo source code by Waveshare team diff --git a/client/src/cmdhfwaveshare.h b/client/src/cmdhfwaveshare.h index da15c9166..d42e2b587 100644 --- a/client/src/cmdhfwaveshare.h +++ b/client/src/cmdhfwaveshare.h @@ -1,4 +1,18 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- // Waveshare commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index ed2528a95..55ad35917 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Hardware commands // low-level hardware control diff --git a/client/src/cmdhw.h b/client/src/cmdhw.h index 4b48eb840..bda323dfc 100644 --- a/client/src/cmdhw.h +++ b/client/src/cmdhw.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Hardware commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index eb7190c7b..3001bfe05 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -1,13 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// Modified by -// Marshellow -// Iceman -// Doegox +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlf.h b/client/src/cmdlf.h index 4129f526e..3bcd3ecf2 100644 --- a/client/src/cmdlf.h +++ b/client/src/cmdlf.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfawid.c b/client/src/cmdlfawid.c index 598e2aa54..efec2815d 100644 --- a/client/src/cmdlfawid.c +++ b/client/src/cmdlfawid.c @@ -1,11 +1,17 @@ //----------------------------------------------------------------------------- -// Authored by Craig Young based on cmdlfhid.c structure +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// cmdlfhid.c is Copyright (C) 2010 iZsh +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency AWID26/50 commands // FSK2a, RF/50, 96 bits (complete) diff --git a/client/src/cmdlfawid.h b/client/src/cmdlfawid.h index 11a235aea..9d8450104 100644 --- a/client/src/cmdlfawid.h +++ b/client/src/cmdlfawid.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency AWID commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfcotag.c b/client/src/cmdlfcotag.c index ab964e450..f5be08ee5 100644 --- a/client/src/cmdlfcotag.c +++ b/client/src/cmdlfcotag.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency COTAG commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfcotag.h b/client/src/cmdlfcotag.h index 4ebacc37e..9577dabdb 100644 --- a/client/src/cmdlfcotag.h +++ b/client/src/cmdlfcotag.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency COTAG commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfdestron.c b/client/src/cmdlfdestron.c index a510089aa..8fe5aac3a 100644 --- a/client/src/cmdlfdestron.c +++ b/client/src/cmdlfdestron.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency FDX-A FECAVA Destron tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfdestron.h b/client/src/cmdlfdestron.h index d154e36b6..a81112cc4 100644 --- a/client/src/cmdlfdestron.h +++ b/client/src/cmdlfdestron.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency FDX-A FECAVA Destron tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem.c b/client/src/cmdlfem.c index 378bf6729..8b6c5cabb 100644 --- a/client/src/cmdlfem.c +++ b/client/src/cmdlfem.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem.h b/client/src/cmdlfem.h index c4f987b0e..0259fab54 100644 --- a/client/src/cmdlfem.h +++ b/client/src/cmdlfem.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem410x.c b/client/src/cmdlfem410x.c index 8db391a4b..3b183f2d8 100644 --- a/client/src/cmdlfem410x.c +++ b/client/src/cmdlfem410x.c @@ -1,14 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh - -// modified marshmellow -// modified Iceman, 2020 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Low frequency EM4x commands +// Low frequency EM410x commands //----------------------------------------------------------------------------- #include "cmdlfem410x.h" diff --git a/client/src/cmdlfem410x.h b/client/src/cmdlfem410x.h index 92f2f3fcf..4c3886a24 100644 --- a/client/src/cmdlfem410x.h +++ b/client/src/cmdlfem410x.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// 2016, 2017 marshmellow, iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM 410x commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem4x05.c b/client/src/cmdlfem4x05.c index 35f3af226..e86e7f28d 100644 --- a/client/src/cmdlfem4x05.c +++ b/client/src/cmdlfem4x05.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Low frequency EM4x commands +// Low frequency EM4x05 commands //----------------------------------------------------------------------------- #include "cmdlfem4x05.h" diff --git a/client/src/cmdlfem4x05.h b/client/src/cmdlfem4x05.h index 1254c341b..19c3dd4f2 100644 --- a/client/src/cmdlfem4x05.h +++ b/client/src/cmdlfem4x05.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// 2016, 2017 marshmellow, iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x05 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem4x50.c b/client/src/cmdlfem4x50.c index f70dc1de0..15c6bf783 100644 --- a/client/src/cmdlfem4x50.c +++ b/client/src/cmdlfem4x50.c @@ -1,11 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 tharexde +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// modified iceman, 2020 +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x50 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem4x50.h b/client/src/cmdlfem4x50.h index 0d5c04bc6..3c0c83002 100644 --- a/client/src/cmdlfem4x50.h +++ b/client/src/cmdlfem4x50.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 tharexde +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x50 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem4x70.c b/client/src/cmdlfem4x70.c index 5c7d0d06a..e0087e230 100644 --- a/client/src/cmdlfem4x70.c +++ b/client/src/cmdlfem4x70.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 sirloins +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x70 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfem4x70.h b/client/src/cmdlfem4x70.h index 75e3e27fc..5d46af3ca 100644 --- a/client/src/cmdlfem4x70.h +++ b/client/src/cmdlfem4x70.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 sirloins +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x70 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlffdxb.c b/client/src/cmdlffdxb.c index 098817d6d..495c867a3 100644 --- a/client/src/cmdlffdxb.c +++ b/client/src/cmdlffdxb.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency fdx-b tag commands // Differential Biphase, rf/32, 128 bits (known) diff --git a/client/src/cmdlffdxb.h b/client/src/cmdlffdxb.h index 34c474a08..8db3eaa47 100644 --- a/client/src/cmdlffdxb.h +++ b/client/src/cmdlffdxb.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency fdx-b tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfgallagher.c b/client/src/cmdlfgallagher.c index 35e38d735..394669890 100644 --- a/client/src/cmdlfgallagher.c +++ b/client/src/cmdlfgallagher.c @@ -1,15 +1,22 @@ //----------------------------------------------------------------------------- -// Iceman, 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency GALLAGHER tag commands // ASK/MAN, RF/32, 96 bits long (unknown cs) (0x00088060) // sample Q5 , ASK RF/32, STT, 96 bits (3blocks) ( 0x9000F006) //----------------------------------------------------------------------------- -// Modified by: Matt Moran (@DarkMatterMatt), 2021 #include "cmdlfgallagher.h" #include "mifare/gallaghercore.h" diff --git a/client/src/cmdlfgallagher.h b/client/src/cmdlfgallagher.h index e3e7a8caa..d12b96f31 100644 --- a/client/src/cmdlfgallagher.h +++ b/client/src/cmdlfgallagher.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman, 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency GALLAGHER tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfguard.c b/client/src/cmdlfguard.c index 231b0f6f2..768407cbe 100644 --- a/client/src/cmdlfguard.c +++ b/client/src/cmdlfguard.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Marshmellow +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Farpoint G Prox II / Pyramid tag commands // Biphase, rf/ , 96 bits (unknown key calc + some bits) diff --git a/client/src/cmdlfguard.h b/client/src/cmdlfguard.h index 132b45853..c68c0d477 100644 --- a/client/src/cmdlfguard.h +++ b/client/src/cmdlfguard.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency G Prox II tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfhid.c b/client/src/cmdlfhid.c index 103dd9f87..dbb8c3d12 100644 --- a/client/src/cmdlfhid.c +++ b/client/src/cmdlfhid.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh -// 2016,2017, marshmellow, iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency HID commands (known) // diff --git a/client/src/cmdlfhid.h b/client/src/cmdlfhid.h index 3c4b6e1f1..54745c49b 100644 --- a/client/src/cmdlfhid.h +++ b/client/src/cmdlfhid.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency HID commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfhitag.c b/client/src/cmdlfhitag.c index 4723ef39e..33a49a406 100644 --- a/client/src/cmdlfhitag.c +++ b/client/src/cmdlfhitag.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2012 Roel Verdult +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Hitag support //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfhitag.h b/client/src/cmdlfhitag.h index 5059557de..cb5b1ce0b 100644 --- a/client/src/cmdlfhitag.h +++ b/client/src/cmdlfhitag.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2012 Roel Verdult -// 2017 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Hitag support //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfidteck.c b/client/src/cmdlfidteck.c index d9830c282..b8cc30020 100644 --- a/client/src/cmdlfidteck.c +++ b/client/src/cmdlfidteck.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman, +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Idteck tag commands // PSK1, clk 32, 2 data blocks diff --git a/client/src/cmdlfidteck.h b/client/src/cmdlfidteck.h index aefa9f5d4..817314ef4 100644 --- a/client/src/cmdlfidteck.h +++ b/client/src/cmdlfidteck.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Idteck tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfindala.c b/client/src/cmdlfindala.c index 3ffed0453..e059c3db3 100644 --- a/client/src/cmdlfindala.c +++ b/client/src/cmdlfindala.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Indala commands // PSK1, rf/32, 64 or 224 bits (known) diff --git a/client/src/cmdlfindala.h b/client/src/cmdlfindala.h index c5f54e396..814d10000 100644 --- a/client/src/cmdlfindala.h +++ b/client/src/cmdlfindala.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Indala commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfio.c b/client/src/cmdlfio.c index d325130ed..924608dcb 100644 --- a/client/src/cmdlfio.c +++ b/client/src/cmdlfio.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// marshmellow +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Kantech ioProx commands // FSK2a, rf/64, 64 bits (complete) diff --git a/client/src/cmdlfio.h b/client/src/cmdlfio.h index 4b3085c4f..220c51106 100644 --- a/client/src/cmdlfio.h +++ b/client/src/cmdlfio.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- // Low frequency Kantech IOProx commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfjablotron.c b/client/src/cmdlfjablotron.c index fb80d6e3d..0e886cf53 100644 --- a/client/src/cmdlfjablotron.c +++ b/client/src/cmdlfjablotron.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Jablotron tag commands // Differential Biphase, RF/64, 64 bits long (complete) diff --git a/client/src/cmdlfjablotron.h b/client/src/cmdlfjablotron.h index bdfe99982..11e5affe8 100644 --- a/client/src/cmdlfjablotron.h +++ b/client/src/cmdlfjablotron.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Jablotron tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfkeri.c b/client/src/cmdlfkeri.c index f1ebc0efd..a2144e1dd 100644 --- a/client/src/cmdlfkeri.c +++ b/client/src/cmdlfkeri.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency KERI tag commands // PSK1, RF/128, RF/2, 64 bits long diff --git a/client/src/cmdlfkeri.h b/client/src/cmdlfkeri.h index 210eb23f2..84b07ad49 100644 --- a/client/src/cmdlfkeri.h +++ b/client/src/cmdlfkeri.h @@ -1,10 +1,19 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Low frequency Stanley/PAC tag commands +// Low frequency Keri tag commands //----------------------------------------------------------------------------- #ifndef CMDLFKERI_H__ #define CMDLFKERI_H__ diff --git a/client/src/cmdlfmotorola.c b/client/src/cmdlfmotorola.c index b4d8fa1d2..8897eff16 100644 --- a/client/src/cmdlfmotorola.c +++ b/client/src/cmdlfmotorola.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman, 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Motorola tag commands // PSK1, RF/32, 64 bits long, at 74 kHz diff --git a/client/src/cmdlfmotorola.h b/client/src/cmdlfmotorola.h index f74741bf2..db232d225 100644 --- a/client/src/cmdlfmotorola.h +++ b/client/src/cmdlfmotorola.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman, 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency MOTOROLA tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfnedap.c b/client/src/cmdlfnedap.c index 26bf6f9ac..fb990be72 100644 --- a/client/src/cmdlfnedap.c +++ b/client/src/cmdlfnedap.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency NEDAP tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfnedap.h b/client/src/cmdlfnedap.h index 58e90954f..fc1dc866a 100644 --- a/client/src/cmdlfnedap.h +++ b/client/src/cmdlfnedap.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency NEDAP tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfnexwatch.c b/client/src/cmdlfnexwatch.c index d69449c46..ccf98961b 100644 --- a/client/src/cmdlfnexwatch.c +++ b/client/src/cmdlfnexwatch.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Honeywell NexWatch tag commands // PSK1 RF/16, RF/2, 128 bits long (known) diff --git a/client/src/cmdlfnexwatch.h b/client/src/cmdlfnexwatch.h index 2144db9b1..a0286b1dd 100644 --- a/client/src/cmdlfnexwatch.h +++ b/client/src/cmdlfnexwatch.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Honeywell NexWatch tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfnoralsy.c b/client/src/cmdlfnoralsy.c index 66d5c4b14..cb7284351 100644 --- a/client/src/cmdlfnoralsy.c +++ b/client/src/cmdlfnoralsy.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Noralsy tag commands // ASK/Manchester, STT, RF/32, 96 bits long (some bits unknown) diff --git a/client/src/cmdlfnoralsy.h b/client/src/cmdlfnoralsy.h index 6dec5005b..42c250f3f 100644 --- a/client/src/cmdlfnoralsy.h +++ b/client/src/cmdlfnoralsy.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Noralsy tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfpac.c b/client/src/cmdlfpac.c index f1891cfc1..c06ce3631 100644 --- a/client/src/cmdlfpac.c +++ b/client/src/cmdlfpac.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// by marshmellow -// by danshuk +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency PAC/Stanley tag commands // NRZ, RF/32, 128 bits long diff --git a/client/src/cmdlfpac.h b/client/src/cmdlfpac.h index 107280cdf..2056e05a3 100644 --- a/client/src/cmdlfpac.h +++ b/client/src/cmdlfpac.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Stanley/PAC tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfparadox.c b/client/src/cmdlfparadox.c index bff6449bd..986ed64cd 100644 --- a/client/src/cmdlfparadox.c +++ b/client/src/cmdlfparadox.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Marshmellow +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Paradox tag commands // FSK2a, rf/50, 96 bits (completely known) diff --git a/client/src/cmdlfparadox.h b/client/src/cmdlfparadox.h index 6e6d3a242..010f08301 100644 --- a/client/src/cmdlfparadox.h +++ b/client/src/cmdlfparadox.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Paradox tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfpcf7931.c b/client/src/cmdlfpcf7931.c index ec3775202..067fecde2 100644 --- a/client/src/cmdlfpcf7931.c +++ b/client/src/cmdlfpcf7931.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2012 Chalk -// 2015 Dake - -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency PCF7931 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfpcf7931.h b/client/src/cmdlfpcf7931.h index 4f84085b2..0f7140d96 100644 --- a/client/src/cmdlfpcf7931.h +++ b/client/src/cmdlfpcf7931.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2012 Chalk -// 2015 Dake - -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency PCF7931 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfpresco.c b/client/src/cmdlfpresco.c index 8ecb72550..cfda28498 100644 --- a/client/src/cmdlfpresco.c +++ b/client/src/cmdlfpresco.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Presco tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfpresco.h b/client/src/cmdlfpresco.h index 961830ab2..a8b09001d 100644 --- a/client/src/cmdlfpresco.h +++ b/client/src/cmdlfpresco.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Presco tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfpyramid.c b/client/src/cmdlfpyramid.c index 4afce3df4..cb9477251 100644 --- a/client/src/cmdlfpyramid.c +++ b/client/src/cmdlfpyramid.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// by marshmellow +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Farpoint / Pyramid tag commands // FSK2a, rf/50, 128 bits (complete) diff --git a/client/src/cmdlfpyramid.h b/client/src/cmdlfpyramid.h index b11c7da44..f5c4065d1 100644 --- a/client/src/cmdlfpyramid.h +++ b/client/src/cmdlfpyramid.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Farpoint / Pyramid commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfsecurakey.c b/client/src/cmdlfsecurakey.c index 0b5e2a7eb..aae0a7f73 100644 --- a/client/src/cmdlfsecurakey.c +++ b/client/src/cmdlfsecurakey.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Securakey tag commands // ASK/Manchester, RF/40, 96 bits long (unknown cs) diff --git a/client/src/cmdlfsecurakey.h b/client/src/cmdlfsecurakey.h index 48db37714..cc029c839 100644 --- a/client/src/cmdlfsecurakey.h +++ b/client/src/cmdlfsecurakey.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Securakey tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlft55xx.c b/client/src/cmdlft55xx.c index 289105d5c..3dd1be167 100644 --- a/client/src/cmdlft55xx.c +++ b/client/src/cmdlft55xx.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency T55xx commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlft55xx.h b/client/src/cmdlft55xx.h index d384e2d13..def6a5be6 100644 --- a/client/src/cmdlft55xx.h +++ b/client/src/cmdlft55xx.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency T55xx commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfti.c b/client/src/cmdlfti.c index 0172f88b8..20efd5472 100644 --- a/client/src/cmdlfti.c +++ b/client/src/cmdlfti.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency TI commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfti.h b/client/src/cmdlfti.h index 10865cb5f..7bfb8d2e3 100644 --- a/client/src/cmdlfti.h +++ b/client/src/cmdlfti.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency TI commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfverichip_disabled.c b/client/src/cmdlfverichip_disabled.c index e052edf90..3a69b3a92 100644 --- a/client/src/cmdlfverichip_disabled.c +++ b/client/src/cmdlfverichip_disabled.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Verichip tag commands //NRZ, RF/32, 128 bits long diff --git a/client/src/cmdlfverichip_disabled.h b/client/src/cmdlfverichip_disabled.h index 875ae355c..5b05c1e07 100644 --- a/client/src/cmdlfverichip_disabled.h +++ b/client/src/cmdlfverichip_disabled.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Verichip tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfviking.c b/client/src/cmdlfviking.c index 206e65c67..f48f97430 100644 --- a/client/src/cmdlfviking.c +++ b/client/src/cmdlfviking.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Marshmellow, +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency Viking tag commands (AKA FDI Matalec Transit) // ASK/Manchester, RF/32, 64 bits (complete) diff --git a/client/src/cmdlfviking.h b/client/src/cmdlfviking.h index 48d087256..cb9876cb8 100644 --- a/client/src/cmdlfviking.h +++ b/client/src/cmdlfviking.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency viking tag commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfvisa2000.c b/client/src/cmdlfvisa2000.c index 2a829f2af..c44d15aa0 100644 --- a/client/src/cmdlfvisa2000.c +++ b/client/src/cmdlfvisa2000.c @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency visa 2000 tag commands // by iceman diff --git a/client/src/cmdlfvisa2000.h b/client/src/cmdlfvisa2000.h index 85e721357..3d798fada 100644 --- a/client/src/cmdlfvisa2000.h +++ b/client/src/cmdlfvisa2000.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency visa 2000 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdlfzx8211.c b/client/src/cmdlfzx8211.c index 893875e50..ec98745b3 100644 --- a/client/src/cmdlfzx8211.c +++ b/client/src/cmdlfzx8211.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency ZX8211 tag commands -// by iceman, doegox //----------------------------------------------------------------------------- #include "cmdlfzx8211.h" diff --git a/client/src/cmdlfzx8211.h b/client/src/cmdlfzx8211.h index 4160de267..0701dd465 100644 --- a/client/src/cmdlfzx8211.h +++ b/client/src/cmdlfzx8211.h @@ -1,8 +1,17 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency ZX8211 commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdmain.c b/client/src/cmdmain.c index 4ecf10590..b314f25fd 100644 --- a/client/src/cmdmain.c +++ b/client/src/cmdmain.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// Modified 2018 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Main command parser entry point //----------------------------------------------------------------------------- diff --git a/client/src/cmdmain.h b/client/src/cmdmain.h index 68984efab..7a834d3c5 100644 --- a/client/src/cmdmain.h +++ b/client/src/cmdmain.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Main command parser entry point //----------------------------------------------------------------------------- diff --git a/client/src/cmdnfc.c b/client/src/cmdnfc.c index 3606eb5b4..683c4b2a2 100644 --- a/client/src/cmdnfc.c +++ b/client/src/cmdnfc.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // NFC commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdnfc.h b/client/src/cmdnfc.h index 26ab36441..264fb4b40 100644 --- a/client/src/cmdnfc.h +++ b/client/src/cmdnfc.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // NFC commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdparser.c b/client/src/cmdparser.c index 91a67009a..1f3bd11e0 100644 --- a/client/src/cmdparser.c +++ b/client/src/cmdparser.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Command parser //----------------------------------------------------------------------------- diff --git a/client/src/cmdparser.h b/client/src/cmdparser.h index 8f2dfa697..8ccd8d7ab 100644 --- a/client/src/cmdparser.h +++ b/client/src/cmdparser.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Command parser //----------------------------------------------------------------------------- diff --git a/client/src/cmdscript.c b/client/src/cmdscript.c index a6e9e1bd5..3206d281d 100644 --- a/client/src/cmdscript.c +++ b/client/src/cmdscript.c @@ -1,13 +1,20 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2013 m h swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Some lua scripting glue to proxmark core. +// Some Lua and Python scripting glue to proxmark core. //----------------------------------------------------------------------------- -// 2020, added Python support (@iceman1001) #include #include diff --git a/client/src/cmdscript.h b/client/src/cmdscript.h index 37384db20..27b674e49 100644 --- a/client/src/cmdscript.h +++ b/client/src/cmdscript.h @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2013 m h swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Some lua scripting glue to proxmark core. +// Some Lua and Python scripting glue to proxmark core. //----------------------------------------------------------------------------- #ifndef CMDSCRIPT_H__ diff --git a/client/src/cmdsmartcard.c b/client/src/cmdsmartcard.c index 8039f44d2..3e273fc07 100644 --- a/client/src/cmdsmartcard.c +++ b/client/src/cmdsmartcard.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 Smartcard module commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdsmartcard.h b/client/src/cmdsmartcard.h index 8bd70b2bd..65e6ba1c1 100644 --- a/client/src/cmdsmartcard.h +++ b/client/src/cmdsmartcard.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Proxmark3 RDV40 Smartcard module commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdtrace.c b/client/src/cmdtrace.c index 068588d99..c06d0cfe6 100644 --- a/client/src/cmdtrace.c +++ b/client/src/cmdtrace.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Trace commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdtrace.h b/client/src/cmdtrace.h index 7444fe62e..6f2967d44 100644 --- a/client/src/cmdtrace.h +++ b/client/src/cmdtrace.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Trace commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdusart.c b/client/src/cmdusart.c index 92991be4c..f4b712475 100644 --- a/client/src/cmdusart.c +++ b/client/src/cmdusart.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2016 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Analyse bytes commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdusart.h b/client/src/cmdusart.h index 1ee21e060..62479a129 100644 --- a/client/src/cmdusart.h +++ b/client/src/cmdusart.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2016 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Data and Graph commands //----------------------------------------------------------------------------- diff --git a/client/src/cmdwiegand.c b/client/src/cmdwiegand.c index 3873a500a..fe6148f4e 100644 --- a/client/src/cmdwiegand.c +++ b/client/src/cmdwiegand.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Trace commands +// Wiegand commands //----------------------------------------------------------------------------- #include "cmdwiegand.h" diff --git a/client/src/cmdwiegand.h b/client/src/cmdwiegand.h index 2c6e8fb40..ceb29b246 100644 --- a/client/src/cmdwiegand.h +++ b/client/src/cmdwiegand.h @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Trace commands +// Wiegand commands //----------------------------------------------------------------------------- #ifndef CMDWIEGAND_H__ diff --git a/client/src/comms.c b/client/src/comms.c index fc3df32f6..feea9523a 100644 --- a/client/src/comms.c +++ b/client/src/comms.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Code for communicating with the proxmark3 hardware. //----------------------------------------------------------------------------- diff --git a/client/src/comms.h b/client/src/comms.h index ce0ef1d76..e400789d4 100644 --- a/client/src/comms.h +++ b/client/src/comms.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Code for communicating with the Proxmark3 hardware. //----------------------------------------------------------------------------- diff --git a/client/src/crypto/asn1dump.c b/client/src/crypto/asn1dump.c index fa5216825..4bab148be 100644 --- a/client/src/crypto/asn1dump.c +++ b/client/src/crypto/asn1dump.c @@ -1,9 +1,17 @@ -// //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // asn.1 dumping //----------------------------------------------------------------------------- diff --git a/client/src/crypto/asn1dump.h b/client/src/crypto/asn1dump.h index 21caae36d..a3596fd05 100644 --- a/client/src/crypto/asn1dump.h +++ b/client/src/crypto/asn1dump.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // asn.1 dumping //----------------------------------------------------------------------------- diff --git a/client/src/crypto/asn1utils.c b/client/src/crypto/asn1utils.c index 1d89009e9..f54a6b451 100644 --- a/client/src/crypto/asn1utils.c +++ b/client/src/crypto/asn1utils.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // asn.1 utils //----------------------------------------------------------------------------- diff --git a/client/src/crypto/asn1utils.h b/client/src/crypto/asn1utils.h index 029741bc6..691e574b2 100644 --- a/client/src/crypto/asn1utils.h +++ b/client/src/crypto/asn1utils.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // asn.1 utils //----------------------------------------------------------------------------- diff --git a/client/src/crypto/libpcrypto.c b/client/src/crypto/libpcrypto.c index 6039aa55c..0d641d22a 100644 --- a/client/src/crypto/libpcrypto.c +++ b/client/src/crypto/libpcrypto.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018, 2021 Merlok -// Copyright (C) 2018 drHatson +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // crypto commands //----------------------------------------------------------------------------- diff --git a/client/src/crypto/libpcrypto.h b/client/src/crypto/libpcrypto.h index f35cdf2d7..121b666d4 100644 --- a/client/src/crypto/libpcrypto.h +++ b/client/src/crypto/libpcrypto.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018, 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // crypto commands //----------------------------------------------------------------------------- diff --git a/client/src/elf.h b/client/src/elf.h index 3c5d2031d..c05a48018 100644 --- a/client/src/elf.h +++ b/client/src/elf.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ELF header //----------------------------------------------------------------------------- diff --git a/client/src/emojis.h b/client/src/emojis.h index 58202899b..5f8dde675 100644 --- a/client/src/emojis.h +++ b/client/src/emojis.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef EMOJIS_H__ #define EMOJIS_H__ diff --git a/client/src/emojis_alt.h b/client/src/emojis_alt.h index 9d11f73b9..4bc1209ca 100644 --- a/client/src/emojis_alt.h +++ b/client/src/emojis_alt.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef EMOJIS_ALT_H__ #define EMOJIS_ALT_H__ diff --git a/client/src/emv/cmdemv.c b/client/src/emv/cmdemv.c index 45d534981..10aa7e5a0 100644 --- a/client/src/emv/cmdemv.c +++ b/client/src/emv/cmdemv.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok -// modified 2017 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // EMV commands //----------------------------------------------------------------------------- diff --git a/client/src/emv/cmdemv.h b/client/src/emv/cmdemv.h index ca1f9fc5a..06790b3f4 100644 --- a/client/src/emv/cmdemv.h +++ b/client/src/emv/cmdemv.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok -// modified 2017 iceman -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // EMV commands //----------------------------------------------------------------------------- diff --git a/client/src/emv/crypto.c b/client/src/emv/crypto.c index f7fc60c80..e35afb262 100644 --- a/client/src/emv/crypto.c +++ b/client/src/emv/crypto.c @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/crypto.h b/client/src/emv/crypto.h index 32252b4cc..21a089d17 100644 --- a/client/src/emv/crypto.h +++ b/client/src/emv/crypto.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef CRYPTO_H #define CRYPTO_H diff --git a/client/src/emv/crypto_backend.h b/client/src/emv/crypto_backend.h index 3a38cc772..87c6e4d0f 100644 --- a/client/src/emv/crypto_backend.h +++ b/client/src/emv/crypto_backend.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef CRYPTO_BACKEND_H #define CRYPTO_BACKEND_H diff --git a/client/src/emv/crypto_polarssl.c b/client/src/emv/crypto_polarssl.c index f9603ead5..a6509ca0a 100644 --- a/client/src/emv/crypto_polarssl.c +++ b/client/src/emv/crypto_polarssl.c @@ -1,18 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * Copyright (C) 2017 Merlok - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/dol.c b/client/src/emv/dol.c index 973349e56..5eb1c0351 100644 --- a/client/src/emv/dol.c +++ b/client/src/emv/dol.c @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/dol.h b/client/src/emv/dol.h index 8e65f679d..1bf258517 100644 --- a/client/src/emv/dol.h +++ b/client/src/emv/dol.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef DOL_H #define DOL_H diff --git a/client/src/emv/emv_pk.c b/client/src/emv/emv_pk.c index 1a783ef12..ab700310c 100644 --- a/client/src/emv/emv_pk.c +++ b/client/src/emv/emv_pk.c @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/emv_pk.h b/client/src/emv/emv_pk.h index eda5883a8..83628bbc2 100644 --- a/client/src/emv/emv_pk.h +++ b/client/src/emv/emv_pk.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef EMV_PK_H #define EMV_PK_H diff --git a/client/src/emv/emv_pki.c b/client/src/emv/emv_pki.c index 365e2ca63..c3f016003 100644 --- a/client/src/emv/emv_pki.c +++ b/client/src/emv/emv_pki.c @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/emv_pki.h b/client/src/emv/emv_pki.h index 05506f02c..311a83e3c 100644 --- a/client/src/emv/emv_pki.h +++ b/client/src/emv/emv_pki.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef EMV_PKI_H #define EMV_PKI_H diff --git a/client/src/emv/emv_pki_priv.c b/client/src/emv/emv_pki_priv.c index c288c4342..c559bd6c1 100644 --- a/client/src/emv/emv_pki_priv.c +++ b/client/src/emv/emv_pki_priv.c @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/emv_pki_priv.h b/client/src/emv/emv_pki_priv.h index b85b1176b..faf1af042 100644 --- a/client/src/emv/emv_pki_priv.h +++ b/client/src/emv/emv_pki_priv.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef EMV_PKI_PRIV_H #define EMV_PKI_PRIV_H diff --git a/client/src/emv/emv_roca.c b/client/src/emv/emv_roca.c index bf155754e..496220d7b 100644 --- a/client/src/emv/emv_roca.c +++ b/client/src/emv/emv_roca.c @@ -1,24 +1,22 @@ -/* roca.c - ROCA (CVE-2017-15361) fingerprint checker. - * Written by Rob Stradling (based on https://github.com/crocs-muni/roca/blob/master/roca/detect.py) - * Copyright (C) 2017-2018 Sectigo Limited - * modified 2018 iceman (dropped openssl bignum, now use mbedtls lib) - * modified 2018 merlok - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ //----------------------------------------------------------------------------- -// EMV roca commands +// Borrowed initially from https://gist.github.com/robstradling/f525d423c79690b72e650e2ad38a161d +// Copyright (C) 2017-2018 Rob Stradling +// Copyright (C) 2017-2018 Sectigo Limited +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// roca.c - ROCA (CVE-2017-15361) fingerprint checker. //----------------------------------------------------------------------------- #include "emv_roca.h" diff --git a/client/src/emv/emv_roca.h b/client/src/emv/emv_roca.h index 8c8ea86e4..a159e641b 100644 --- a/client/src/emv/emv_roca.h +++ b/client/src/emv/emv_roca.h @@ -1,24 +1,22 @@ -/* roca.c - ROCA (CVE-2017-15361) fingerprint checker. - * Written by Rob Stradling (based on https://github.com/crocs-muni/roca/blob/master/roca/detect.py) - * Copyright (C) 2017-2018 Sectigo Limited - * modified 2018 iceman (dropped openssl bignum, now use mbedtls lib) - * modified 2018 merlok - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ //----------------------------------------------------------------------------- -// EMV roca commands +// Borrowed initially from https://gist.github.com/robstradling/f525d423c79690b72e650e2ad38a161d +// Copyright (C) 2017-2018 Rob Stradling +// Copyright (C) 2017-2018 Sectigo Limited +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// roca.c - ROCA (CVE-2017-15361) fingerprint checker. //----------------------------------------------------------------------------- #ifndef EMV_ROCA_H__ diff --git a/client/src/emv/emv_tags.c b/client/src/emv/emv_tags.c index acafa18d3..ce2872254 100644 --- a/client/src/emv/emv_tags.c +++ b/client/src/emv/emv_tags.c @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/emv_tags.h b/client/src/emv/emv_tags.h index 2da2cd2ef..a84574663 100644 --- a/client/src/emv/emv_tags.h +++ b/client/src/emv/emv_tags.h @@ -1,17 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef TAGS_H #define TAGS_H diff --git a/client/src/emv/emvcore.c b/client/src/emv/emvcore.c index 5f154815c..6cb6107d0 100644 --- a/client/src/emv/emvcore.c +++ b/client/src/emv/emvcore.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // EMV core functions //----------------------------------------------------------------------------- diff --git a/client/src/emv/emvcore.h b/client/src/emv/emvcore.h index 87aeec585..bb76aeb2f 100644 --- a/client/src/emv/emvcore.h +++ b/client/src/emv/emvcore.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // EMV core functionality //----------------------------------------------------------------------------- diff --git a/client/src/emv/emvjson.c b/client/src/emv/emvjson.c index c0fd1c468..072473a31 100644 --- a/client/src/emv/emvjson.c +++ b/client/src/emv/emvjson.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // EMV json logic //----------------------------------------------------------------------------- diff --git a/client/src/emv/emvjson.h b/client/src/emv/emvjson.h index 9905736ef..630a659f2 100644 --- a/client/src/emv/emvjson.h +++ b/client/src/emv/emvjson.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // EMV json logic //----------------------------------------------------------------------------- diff --git a/client/src/emv/test/cda_test.c b/client/src/emv/test/cda_test.c index b5a87952c..c9a8323b6 100644 --- a/client/src/emv/test/cda_test.c +++ b/client/src/emv/test/cda_test.c @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/test/cda_test.h b/client/src/emv/test/cda_test.h index 1c326e908..1a33deb74 100644 --- a/client/src/emv/test/cda_test.h +++ b/client/src/emv/test/cda_test.h @@ -1,18 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ - +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef __CDA_TEST_H #define __CDA_TEST_H #include diff --git a/client/src/emv/test/crypto_test.c b/client/src/emv/test/crypto_test.c index 987a672da..5e6bcaac4 100644 --- a/client/src/emv/test/crypto_test.c +++ b/client/src/emv/test/crypto_test.c @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/test/crypto_test.h b/client/src/emv/test/crypto_test.h index 4b8fcf074..e1e41c18c 100644 --- a/client/src/emv/test/crypto_test.h +++ b/client/src/emv/test/crypto_test.h @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef __CRYPTO_TEST_H #define __CRYPTO_TEST_H diff --git a/client/src/emv/test/cryptotest.c b/client/src/emv/test/cryptotest.c index cf84ef00e..bf4ad900f 100644 --- a/client/src/emv/test/cryptotest.c +++ b/client/src/emv/test/cryptotest.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Crypto algorithms testing //----------------------------------------------------------------------------- diff --git a/client/src/emv/test/cryptotest.h b/client/src/emv/test/cryptotest.h index 579a5a66d..4fbca0d6a 100644 --- a/client/src/emv/test/cryptotest.h +++ b/client/src/emv/test/cryptotest.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Crypto algorithms testing //----------------------------------------------------------------------------- diff --git a/client/src/emv/test/dda_test.c b/client/src/emv/test/dda_test.c index c36af108d..6a6b91bab 100644 --- a/client/src/emv/test/dda_test.c +++ b/client/src/emv/test/dda_test.c @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/test/dda_test.h b/client/src/emv/test/dda_test.h index a5c1999a1..c2fe1fc84 100644 --- a/client/src/emv/test/dda_test.h +++ b/client/src/emv/test/dda_test.h @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef __DDA_TEST_H #define __DDA_TEST_H diff --git a/client/src/emv/test/sda_test.c b/client/src/emv/test/sda_test.c index 731adb563..bf64e6cb4 100644 --- a/client/src/emv/test/sda_test.c +++ b/client/src/emv/test/sda_test.c @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/test/sda_test.h b/client/src/emv/test/sda_test.h index a7b45fbf0..a3aede8f1 100644 --- a/client/src/emv/test/sda_test.h +++ b/client/src/emv/test/sda_test.h @@ -1,17 +1,22 @@ -/* - * emv-tools - a set of tools to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// emv-tools - a set of tools to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef __SDA_TEST_H #define __SDA_TEST_H diff --git a/client/src/emv/tlv.c b/client/src/emv/tlv.c index 49a4038b5..884e340b3 100644 --- a/client/src/emv/tlv.c +++ b/client/src/emv/tlv.c @@ -1,19 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * https://github.com/lumag/emv-tools/blob/master/lib/tlv.c - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifdef HAVE_CONFIG_H #include diff --git a/client/src/emv/tlv.h b/client/src/emv/tlv.h index 41c28c3ef..50d046659 100644 --- a/client/src/emv/tlv.h +++ b/client/src/emv/tlv.h @@ -1,19 +1,22 @@ -/* - * libopenemv - a library to work with EMV family of smart cards - * Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * https://github.com/lumag/emv-tools/blob/master/lib/include/openemv/tlv.h - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/lumag/emv-tools/ +// Copyright (C) 2012, 2015 Dmitry Eremin-Solenikov +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// libopenemv - a library to work with EMV family of smart cards +//----------------------------------------------------------------------------- #ifndef TLV_H #define TLV_H diff --git a/client/src/fido/additional_ca.c b/client/src/fido/additional_ca.c index 1f383c741..02163698e 100644 --- a/client/src/fido/additional_ca.c +++ b/client/src/fido/additional_ca.c @@ -1,13 +1,20 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CA PEM certificates //----------------------------------------------------------------------------- -// #include "additional_ca.h" diff --git a/client/src/fido/additional_ca.h b/client/src/fido/additional_ca.h index 689e5f059..bfec0d897 100644 --- a/client/src/fido/additional_ca.h +++ b/client/src/fido/additional_ca.h @@ -1,13 +1,20 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CA PEM certificates //----------------------------------------------------------------------------- -// #ifndef __ADDITIONAL_CA_H__ #define __ADDITIONAL_CA_H__ diff --git a/client/src/fido/cbortools.c b/client/src/fido/cbortools.c index 7a7a1d25e..fec6cca38 100644 --- a/client/src/fido/cbortools.c +++ b/client/src/fido/cbortools.c @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Tools for work with CBOR format http://cbor.io/spec.html // via Intel tinycbor (https://github.com/intel/tinycbor) library //----------------------------------------------------------------------------- -// #include "cbortools.h" #include diff --git a/client/src/fido/cbortools.h b/client/src/fido/cbortools.h index 86f8387cd..5fc10584b 100644 --- a/client/src/fido/cbortools.h +++ b/client/src/fido/cbortools.h @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Tools for work with CBOR format http://cbor.io/spec.html // via Intel tinycbor (https://github.com/intel/tinycbor) library //----------------------------------------------------------------------------- -// #ifndef __CBORTOOLS_H__ #define __CBORTOOLS_H__ diff --git a/client/src/fido/cose.c b/client/src/fido/cose.c index 9caa0f4cc..d9c13177c 100644 --- a/client/src/fido/cose.c +++ b/client/src/fido/cose.c @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Tools for work with COSE (CBOR Object Signing and Encryption) rfc8152 // https://tools.ietf.org/html/rfc8152 //----------------------------------------------------------------------------- -// #include "cose.h" diff --git a/client/src/fido/cose.h b/client/src/fido/cose.h index b78f27421..448463689 100644 --- a/client/src/fido/cose.h +++ b/client/src/fido/cose.h @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Tools for work with COSE (CBOR Object Signing and Encryption) rfc8152 // https://tools.ietf.org/html/rfc8152 //----------------------------------------------------------------------------- -// #ifndef __COSE_H__ #define __COSE_H__ diff --git a/client/src/fido/fidocore.c b/client/src/fido/fidocore.c index a81baec2b..2790ccd9c 100644 --- a/client/src/fido/fidocore.c +++ b/client/src/fido/fidocore.c @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // FIDO2 authenticators core data and commands // https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html //----------------------------------------------------------------------------- -// #include "fidocore.h" diff --git a/client/src/fido/fidocore.h b/client/src/fido/fidocore.h index 5e6b69129..c9bc68ce1 100644 --- a/client/src/fido/fidocore.h +++ b/client/src/fido/fidocore.h @@ -1,14 +1,21 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // FIDO2 authenticators core data and commands // https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html //----------------------------------------------------------------------------- -// #ifndef __FIDOCORE_H__ #define __FIDOCORE_H__ diff --git a/client/src/fileutils.c b/client/src/fileutils.c index 9b285e257..e061cbf53 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -1,32 +1,18 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- // this define is needed for scandir/alphasort to work #define _GNU_SOURCE diff --git a/client/src/fileutils.h b/client/src/fileutils.h index 5e0e3a971..e0db4ffa1 100644 --- a/client/src/fileutils.h +++ b/client/src/fileutils.h @@ -1,32 +1,18 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef FILEUTILS_H #define FILEUTILS_H diff --git a/client/src/flash.c b/client/src/flash.c index c0ef1d25b..5bc6fbcab 100644 --- a/client/src/flash.c +++ b/client/src/flash.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 Hector Martin "marcan" +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ELF file flasher //----------------------------------------------------------------------------- diff --git a/client/src/flash.h b/client/src/flash.h index 23dd28079..518027b4f 100644 --- a/client/src/flash.h +++ b/client/src/flash.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Flashing utility functions //----------------------------------------------------------------------------- diff --git a/client/src/graph.c b/client/src/graph.c index 5f0f5ef94..9f87271fc 100644 --- a/client/src/graph.c +++ b/client/src/graph.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Graph utilities //----------------------------------------------------------------------------- diff --git a/client/src/graph.h b/client/src/graph.h index 5649371a8..3be6c9852 100644 --- a/client/src/graph.h +++ b/client/src/graph.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Graph utilities //----------------------------------------------------------------------------- diff --git a/client/src/guidummy.cpp b/client/src/guidummy.cpp index 886bc1516..962a9c00d 100644 --- a/client/src/guidummy.cpp +++ b/client/src/guidummy.cpp @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // GUI dummy file //----------------------------------------------------------------------------- diff --git a/client/src/iso7816/apduinfo.c b/client/src/iso7816/apduinfo.c index bd88f41ed..5c9a36f76 100644 --- a/client/src/iso7816/apduinfo.c +++ b/client/src/iso7816/apduinfo.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // APDU status bytes information //----------------------------------------------------------------------------- diff --git a/client/src/iso7816/apduinfo.h b/client/src/iso7816/apduinfo.h index 55ff7dd5c..d07d5f36e 100644 --- a/client/src/iso7816/apduinfo.h +++ b/client/src/iso7816/apduinfo.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // APDU status bytes information //----------------------------------------------------------------------------- diff --git a/client/src/iso7816/iso7816core.c b/client/src/iso7816/iso7816core.c index b24a090bc..5db7d32aa 100644 --- a/client/src/iso7816/iso7816core.c +++ b/client/src/iso7816/iso7816core.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO7816 core functions //----------------------------------------------------------------------------- diff --git a/client/src/iso7816/iso7816core.h b/client/src/iso7816/iso7816core.h index 708a49764..eb49a58bb 100644 --- a/client/src/iso7816/iso7816core.h +++ b/client/src/iso7816/iso7816core.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO7816 core functionality //----------------------------------------------------------------------------- diff --git a/client/src/jansson_path.c b/client/src/jansson_path.c index 8bc224fcd..1f21cb343 100644 --- a/client/src/jansson_path.c +++ b/client/src/jansson_path.c @@ -1,11 +1,21 @@ -/* - * Copyright (c) 2012 Rogerz Zhang - * - * Jansson is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See LICENSE for details. - * - * source here https://github.com/rogerz/jansson/blob/json_path/src/path.c - */ +//----------------------------------------------------------------------------- +// Borrowed initially from +// https://github.com/rogerz/jansson/blob/json_path/src/path.c +// Copyright (c) 2012 Rogerz Zhang +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include #include diff --git a/client/src/jansson_path.h b/client/src/jansson_path.h index 7737c1634..88c0ad626 100644 --- a/client/src/jansson_path.h +++ b/client/src/jansson_path.h @@ -1,9 +1,21 @@ -/* - * Copyright (c) 2009-2016 Petri Lehtinen - * - * Jansson is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See LICENSE for details. - */ +//----------------------------------------------------------------------------- +// Borrowed initially from +// https://github.com/rogerz/jansson/blob/json_path/src/path.c +// Copyright (c) 2012 Rogerz Zhang +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef JANSSON_PATH_H #define JANSSON_PATH_H diff --git a/client/src/ksx6924/ksx6924core.c b/client/src/ksx6924/ksx6924core.c index 2b4040fa7..02ca39549 100644 --- a/client/src/ksx6924/ksx6924core.c +++ b/client/src/ksx6924/ksx6924core.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 micolous+git@gmail.com +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // KS X 6924 (T-Money, Snapper+) protocol implementation //----------------------------------------------------------------------------- diff --git a/client/src/ksx6924/ksx6924core.h b/client/src/ksx6924/ksx6924core.h index 10ffbd217..c207628c8 100644 --- a/client/src/ksx6924/ksx6924core.h +++ b/client/src/ksx6924/ksx6924core.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 micolous+git@gmail.com +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // KS X 6924 (T-Money, Snapper+) protocol implementation //----------------------------------------------------------------------------- diff --git a/client/src/loclass/cipher.c b/client/src/loclass/cipher.c index 943a616fb..b69230667 100644 --- a/client/src/loclass/cipher.c +++ b/client/src/loclass/cipher.c @@ -1,40 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ - +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #include "cipher.h" #include "cipherutils.h" diff --git a/client/src/loclass/cipher.h b/client/src/loclass/cipher.h index ffd422874..dd60d8eb5 100644 --- a/client/src/loclass/cipher.h +++ b/client/src/loclass/cipher.h @@ -1,40 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ - +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #ifndef CIPHER_H #define CIPHER_H diff --git a/client/src/loclass/cipherutils.c b/client/src/loclass/cipherutils.c index 61f2ac313..bcfcbb7b7 100644 --- a/client/src/loclass/cipherutils.c +++ b/client/src/loclass/cipherutils.c @@ -1,39 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #include "cipherutils.h" #include diff --git a/client/src/loclass/cipherutils.h b/client/src/loclass/cipherutils.h index 844e3af7a..aeba9f33d 100644 --- a/client/src/loclass/cipherutils.h +++ b/client/src/loclass/cipherutils.h @@ -1,39 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #ifndef CIPHERUTILS_H diff --git a/client/src/loclass/elite_crack.c b/client/src/loclass/elite_crack.c index 89d4cfdf7..4741e52ac 100644 --- a/client/src/loclass/elite_crack.c +++ b/client/src/loclass/elite_crack.c @@ -1,40 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - * - ****************************************************************************/ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #include #include #include diff --git a/client/src/loclass/elite_crack.h b/client/src/loclass/elite_crack.h index 213ceb373..6e90b4c07 100644 --- a/client/src/loclass/elite_crack.h +++ b/client/src/loclass/elite_crack.h @@ -1,40 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ - +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #ifndef ELITE_CRACK_H #define ELITE_CRACK_H diff --git a/client/src/loclass/hash1_brute.c b/client/src/loclass/hash1_brute.c index 2f2842b2f..52ff3b582 100644 --- a/client/src/loclass/hash1_brute.c +++ b/client/src/loclass/hash1_brute.c @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "hash1_brute.h" #include #include "cipherutils.h" diff --git a/client/src/loclass/hash1_brute.h b/client/src/loclass/hash1_brute.h index 685a2c479..d741044fe 100644 --- a/client/src/loclass/hash1_brute.h +++ b/client/src/loclass/hash1_brute.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef HASH1_BRUTE_H #define HASH1_BRUTE_H void brute_hash1(void); diff --git a/client/src/loclass/ikeys.c b/client/src/loclass/ikeys.c index 67dcc3071..7918d91f2 100644 --- a/client/src/loclass/ikeys.c +++ b/client/src/loclass/ikeys.c @@ -1,40 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ - +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- /** diff --git a/client/src/loclass/ikeys.h b/client/src/loclass/ikeys.h index 2e14ba127..f23e87ccf 100644 --- a/client/src/loclass/ikeys.h +++ b/client/src/loclass/ikeys.h @@ -1,39 +1,36 @@ -/***************************************************************************** - * WARNING - * - * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. - * - * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL - * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, - * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. - * - * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. - * - ***************************************************************************** - * - * This file is part of loclass. It is a reconstruction of the cipher engine - * used in iClass, and RFID techology. - * - * The implementation is based on the work performed by - * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and - * Milosch Meriac in the paper "Dismantling IClass". - * - * Copyright (C) 2014 Martin Holst Swende - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation, or, at your option, any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with loclass. If not, see . - * - * - ****************************************************************************/ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/holiman/loclass +// Copyright (C) 2014 Martin Holst Swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// WARNING +// +// THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. +// +// USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL +// PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, +// AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. +// +// THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. +//----------------------------------------------------------------------------- +// It is a reconstruction of the cipher engine used in iClass, and RFID techology. +// +// The implementation is based on the work performed by +// Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and +// Milosch Meriac in the paper "Dismantling IClass". +//----------------------------------------------------------------------------- #ifndef IKEYS_H #define IKEYS_H diff --git a/client/src/mifare/aiddesfire.c b/client/src/mifare/aiddesfire.c index 0957fe6b3..f40ca5ff3 100644 --- a/client/src/mifare/aiddesfire.c +++ b/client/src/mifare/aiddesfire.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // AID DESFire functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/aiddesfire.h b/client/src/mifare/aiddesfire.h index c09f6e971..6dfd22674 100644 --- a/client/src/mifare/aiddesfire.h +++ b/client/src/mifare/aiddesfire.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // AID DESFire functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 06e4077d9..6132dfa7f 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 Romain Tartiere. -// Copyright (C) 2014 Iceman -// Copyright (C) 2021 Merlok +// Borrowed initially from https://github.com/nfc-tools/libfreefare +// Copyright (C) 2010, Romain Tartiere. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Desfire core functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/desfirecore.h b/client/src/mifare/desfirecore.h index 3b1fe4d72..929bd0197 100644 --- a/client/src/mifare/desfirecore.h +++ b/client/src/mifare/desfirecore.h @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 Romain Tartiere. -// Copyright (C) 2014 Iceman -// Copyright (C) 2021 Merlok +// Borrowed initially from https://github.com/nfc-tools/libfreefare +// Copyright (C) 2010, Romain Tartiere. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Desfire core functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/desfirecrypto.c b/client/src/mifare/desfirecrypto.c index 8ee68c29e..185c176f3 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -1,22 +1,20 @@ -/*- - * Copyright (C) 2010, Romain Tartiere. - * Copyright (C) 2021 Merlok - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see - * - * $Id$ - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/nfc-tools/libfreefare +// Copyright (C) 2010, Romain Tartiere. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "desfirecrypto.h" diff --git a/client/src/mifare/desfirecrypto.h b/client/src/mifare/desfirecrypto.h index 7147eb981..43f9cd386 100644 --- a/client/src/mifare/desfirecrypto.h +++ b/client/src/mifare/desfirecrypto.h @@ -1,22 +1,20 @@ -/*- - * Copyright (C) 2010, Romain Tartiere. - * Copyright (C) 2021 Merlok - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see - * - * $Id$ - */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/nfc-tools/libfreefare +// Copyright (C) 2010, Romain Tartiere. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef __DESFIRECRYPTO_H #define __DESFIRECRYPTO_H diff --git a/client/src/mifare/desfiresecurechan.c b/client/src/mifare/desfiresecurechan.c index 78bb6ebee..beb41f3d5 100644 --- a/client/src/mifare/desfiresecurechan.c +++ b/client/src/mifare/desfiresecurechan.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 Romain Tartiere. -// Copyright (C) 2014 Iceman -// Copyright (C) 2021 Merlok +// Borrowed initially from https://github.com/nfc-tools/libfreefare +// Copyright (C) 2010, Romain Tartiere. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Desfire secure channel functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/desfiresecurechan.h b/client/src/mifare/desfiresecurechan.h index 92f9a65f3..f3f232032 100644 --- a/client/src/mifare/desfiresecurechan.h +++ b/client/src/mifare/desfiresecurechan.h @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 Romain Tartiere. -// Copyright (C) 2014 Iceman -// Copyright (C) 2021 Merlok +// Borrowed initially from https://github.com/nfc-tools/libfreefare +// Copyright (C) 2010, Romain Tartiere. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency Desfire secure channel functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/desfiretest.c b/client/src/mifare/desfiretest.c index 0e42b09aa..b37fd7fd8 100644 --- a/client/src/mifare/desfiretest.c +++ b/client/src/mifare/desfiretest.c @@ -1,14 +1,20 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // tests for desfire -// // tests for LRP here: Leakage Resilient Primitive (LRP) Specification, https://www.nxp.com/docs/en/application-note/AN12304.pdf -// //----------------------------------------------------------------------------- #include "desfiretest.h" diff --git a/client/src/mifare/desfiretest.h b/client/src/mifare/desfiretest.h index e89330899..6d9bf2738 100644 --- a/client/src/mifare/desfiretest.h +++ b/client/src/mifare/desfiretest.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // tests for desfire //----------------------------------------------------------------------------- diff --git a/client/src/mifare/gallaghercore.c b/client/src/mifare/gallaghercore.c index e9ae26364..e7f3ba54b 100644 --- a/client/src/mifare/gallaghercore.c +++ b/client/src/mifare/gallaghercore.c @@ -1,13 +1,20 @@ -/** - * Matt Moran (@DarkMatterMatt), 2021 - * ----------------------------------------------------------------------------- - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * ----------------------------------------------------------------------------- - * Common functionality for low/high-frequency GALLAGHER tag encoding & decoding. - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// Common functionality for low/high-frequency GALLAGHER tag encoding & decoding. +//----------------------------------------------------------------------------- #include "gallaghercore.h" #include "common.h" #include "ui.h" diff --git a/client/src/mifare/gallaghercore.h b/client/src/mifare/gallaghercore.h index 9137073bb..378ea7423 100644 --- a/client/src/mifare/gallaghercore.h +++ b/client/src/mifare/gallaghercore.h @@ -1,13 +1,18 @@ -/** - * Matt Moran (@DarkMatterMatt), 2021 - * ----------------------------------------------------------------------------- - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * ----------------------------------------------------------------------------- - * Common functionality for low/high-frequency GALLAGHER tag encoding & decoding. - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef MIFARE_GALLAGHERCORE_H__ #define MIFARE_GALLAGHERCORE_H__ diff --git a/client/src/mifare/lrpcrypto.c b/client/src/mifare/lrpcrypto.c index 8016293f8..678bc8711 100644 --- a/client/src/mifare/lrpcrypto.c +++ b/client/src/mifare/lrpcrypto.c @@ -1,24 +1,20 @@ -/*- - * Copyright (C) 2021 Merlok - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see - * - * $Id$ - * - * description here: Leakage Resilient Primitive (LRP) Specification, https://www.nxp.com/docs/en/application-note/AN12304.pdf - * - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// description here: Leakage Resilient Primitive (LRP) Specification, https://www.nxp.com/docs/en/application-note/AN12304.pdf +//----------------------------------------------------------------------------- #include "lrpcrypto.h" diff --git a/client/src/mifare/lrpcrypto.h b/client/src/mifare/lrpcrypto.h index 1b6622ed9..e88780681 100644 --- a/client/src/mifare/lrpcrypto.h +++ b/client/src/mifare/lrpcrypto.h @@ -1,24 +1,20 @@ -/*- - * Copyright (C) 2021 Merlok - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see - * - * $Id$ - * - * description here: Leakage Resilient Primitive (LRP) Specification, https://www.nxp.com/docs/en/application-note/AN12304.pdf - * - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// description here: Leakage Resilient Primitive (LRP) Specification, https://www.nxp.com/docs/en/application-note/AN12304.pdf +//----------------------------------------------------------------------------- #ifndef __LRPCRYPTO_H #define __LRPCRYPTO_H diff --git a/client/src/mifare/mad.c b/client/src/mifare/mad.c index ca5be1e01..256a9bf90 100644 --- a/client/src/mifare/mad.c +++ b/client/src/mifare/mad.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // MIFARE Application Directory (MAD) functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mad.h b/client/src/mifare/mad.h index 822314281..d56de9530 100644 --- a/client/src/mifare/mad.h +++ b/client/src/mifare/mad.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // MIFARE Application Directory (MAD) functions //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mfkey.c b/client/src/mifare/mfkey.c index 710bba449..0d905a65e 100644 --- a/client/src/mifare/mfkey.c +++ b/client/src/mifare/mfkey.c @@ -1,11 +1,18 @@ //----------------------------------------------------------------------------- -// Merlok - June 2011 -// Roel - Dec 2009 -// Unknown author +// Copyright (C) Roel Verdult 2009 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // MIFARE Darkside hack //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mfkey.h b/client/src/mifare/mfkey.h index e108d5fa7..22ee47836 100644 --- a/client/src/mifare/mfkey.h +++ b/client/src/mifare/mfkey.h @@ -1,11 +1,18 @@ //----------------------------------------------------------------------------- -// Merlok - June 2011 -// Roel - Dec 2009 -// Unknown author +// Copyright (C) Roel Verdult 2009 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // MIFARE Darkside hack //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mifare4.c b/client/src/mifare/mifare4.c index 8b262ec40..c580b9a57 100644 --- a/client/src/mifare/mifare4.c +++ b/client/src/mifare/mifare4.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok -// Copyright (C) 2018 drHatson +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // iso14443-4 mifare commands //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mifare4.h b/client/src/mifare/mifare4.h index 0cc716d58..0b582ca99 100644 --- a/client/src/mifare/mifare4.h +++ b/client/src/mifare/mifare4.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 Merlok -// Copyright (C) 2018 drHatson +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // iso14443-4 mifare commands //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mifaredefault.c b/client/src/mifare/mifaredefault.c index f1a507536..9552badb7 100644 --- a/client/src/mifare/mifaredefault.c +++ b/client/src/mifare/mifaredefault.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Mifare default constants //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mifaredefault.h b/client/src/mifare/mifaredefault.h index cdc103676..ac78aedfa 100644 --- a/client/src/mifare/mifaredefault.h +++ b/client/src/mifare/mifaredefault.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Mifare default constants //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 31eee3ef0..860d19f0e 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -1,9 +1,19 @@ -// Merlok, 2011, 2012, 2019 -// people from mifare@nethemba.com, 2010 +//----------------------------------------------------------------------------- +// Borrowed initially from https://nethemba.com/tag/darkside-attack/ +// Copyright (C) mifare@nethemba.com, 2010 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // mifare commands //----------------------------------------------------------------------------- diff --git a/client/src/mifare/mifarehost.h b/client/src/mifare/mifarehost.h index c12113c45..8db9f36bb 100644 --- a/client/src/mifare/mifarehost.h +++ b/client/src/mifare/mifarehost.h @@ -1,9 +1,19 @@ -// Merlok, 2011, 2019 -// people from mifare@nethemba.com, 2010 +//----------------------------------------------------------------------------- +// Borrowed initially from https://nethemba.com/tag/darkside-attack/ +// Copyright (C) mifare@nethemba.com, 2010 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // High frequency ISO14443A commands //----------------------------------------------------------------------------- diff --git a/client/src/nfc/ndef.c b/client/src/nfc/ndef.c index c0d0e0c4d..cfb05cfb0 100644 --- a/client/src/nfc/ndef.c +++ b/client/src/nfc/ndef.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // NFC Data Exchange Format (NDEF) functions //----------------------------------------------------------------------------- diff --git a/client/src/nfc/ndef.h b/client/src/nfc/ndef.h index dc2f2aa87..b69384443 100644 --- a/client/src/nfc/ndef.h +++ b/client/src/nfc/ndef.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 Merlok +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // NFC Data Exchange Format (NDEF) functions //----------------------------------------------------------------------------- diff --git a/client/src/pm3.c b/client/src/pm3.c index 056fd8963..c10738803 100644 --- a/client/src/pm3.c +++ b/client/src/pm3.c @@ -1,4 +1,18 @@ //----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- // User API //----------------------------------------------------------------------------- diff --git a/client/src/pm3_binlib.c b/client/src/pm3_binlib.c index 56d281636..8ca6c8943 100644 --- a/client/src/pm3_binlib.c +++ b/client/src/pm3_binlib.c @@ -1,12 +1,24 @@ -/* -* lpack.c -* a Lua library for packing and unpacking binary data -* Luiz Henrique de Figueiredo -* 29 Jun 2007 19:27:20 -* This code is hereby placed in the public domain. -* with contributions from Ignacio Castao and -* Roberto Ierusalimschy . -*/ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/LuaDist/lpack/blob/master/lpack.c +// Copyright (C) 2007 Luiz Henrique de Figueiredo +// Copyright (C) Ignacio Castao +// Copyright (C) Roberto Ierusalimschy +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// a Lua library for packing and unpacking binary data +//----------------------------------------------------------------------------- #define OP_ZSTRING 'z' /* zero-terminated string */ #define OP_BSTRING 'p' /* string preceded by length byte */ diff --git a/client/src/pm3_binlib.h b/client/src/pm3_binlib.h index 3d4f0993d..bbf12e28a 100644 --- a/client/src/pm3_binlib.h +++ b/client/src/pm3_binlib.h @@ -1,3 +1,24 @@ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/LuaDist/lpack/blob/master/lpack.c +// Copyright (C) 2007 Luiz Henrique de Figueiredo +// Copyright (C) Ignacio Castao +// Copyright (C) Roberto Ierusalimschy +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// a Lua library for packing and unpacking binary data +//----------------------------------------------------------------------------- #ifndef PM3_BINLIB #define PM3_BINLIB diff --git a/client/src/pm3_bit_limits.h b/client/src/pm3_bit_limits.h index a2deda4c8..2505adcf7 100644 --- a/client/src/pm3_bit_limits.h +++ b/client/src/pm3_bit_limits.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef __BITLIB_LIMITS_H #define __BITLIB_LIMITS_H diff --git a/client/src/pm3_bitlib.c b/client/src/pm3_bitlib.c index 064c0f3c9..e6d0022f7 100644 --- a/client/src/pm3_bitlib.c +++ b/client/src/pm3_bitlib.c @@ -1,6 +1,22 @@ -/* Bitwise operations library */ -/* (c) Reuben Thomas 2000-2008 */ -/* See README for license */ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/LuaDist/bitlib +// Copyright (C) Reuben Thomas 2000-2008 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// Bitwise operations library +//----------------------------------------------------------------------------- #include #include diff --git a/client/src/pm3_bitlib.h b/client/src/pm3_bitlib.h index 4e4ccfa98..3456d72d3 100644 --- a/client/src/pm3_bitlib.h +++ b/client/src/pm3_bitlib.h @@ -1,3 +1,22 @@ +//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/LuaDist/bitlib +// Copyright (C) Reuben Thomas 2000-2008 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// Bitwise operations library +//----------------------------------------------------------------------------- #ifndef PM3_BITLIB #define PM3_BITLIB diff --git a/client/src/preferences.c b/client/src/preferences.c index 4228bc6ae..7195b2393 100644 --- a/client/src/preferences.c +++ b/client/src/preferences.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Preferences Functions //----------------------------------------------------------------------------- diff --git a/client/src/preferences.h b/client/src/preferences.h index 0d7705027..56ba72fa3 100644 --- a/client/src/preferences.h +++ b/client/src/preferences.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Settings Functions //----------------------------------------------------------------------------- diff --git a/client/src/prng.c b/client/src/prng.c index 81ca3e1ad..bfea60504 100644 --- a/client/src/prng.c +++ b/client/src/prng.c @@ -1,7 +1,21 @@ //----------------------------------------------------------------------------- +// Borrowed initially from http://burtleburtle.net/bob/rand/smallprng.html +// Copyright (C) Bob Jenkins +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Burtle Prng - Modified. 42iterations instead of 20. -// ref: http://burtleburtle.net/bob/rand/smallprng.html //----------------------------------------------------------------------------- #include "prng.h" diff --git a/client/src/prng.h b/client/src/prng.h index a72079fd2..97bd83ac7 100644 --- a/client/src/prng.h +++ b/client/src/prng.h @@ -1,7 +1,21 @@ //----------------------------------------------------------------------------- +// Borrowed initially from http://burtleburtle.net/bob/rand/smallprng.html +// Copyright (C) Bob Jenkins +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Burtle Prng - Modified. 42iterations instead of 20. -// ref: http://burtleburtle.net/bob/rand/smallprng.html //----------------------------------------------------------------------------- #ifndef __PRNG_H diff --git a/client/src/proxendian.h b/client/src/proxendian.h index 8501858e0..17003e75e 100644 --- a/client/src/proxendian.h +++ b/client/src/proxendian.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 Hector Martin "marcan" +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Endianness convenience functions //----------------------------------------------------------------------------- diff --git a/client/src/proxgui.cpp b/client/src/proxgui.cpp index b8d19b10a..ce7e4ccb6 100644 --- a/client/src/proxgui.cpp +++ b/client/src/proxgui.cpp @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // GUI functions //----------------------------------------------------------------------------- diff --git a/client/src/proxgui.h b/client/src/proxgui.h index 7db6c3e90..31d57822b 100644 --- a/client/src/proxgui.h +++ b/client/src/proxgui.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // GUI functions //----------------------------------------------------------------------------- diff --git a/client/src/proxguiqt.cpp b/client/src/proxguiqt.cpp index d8181bb3d..2d1c2a8be 100644 --- a/client/src/proxguiqt.cpp +++ b/client/src/proxguiqt.cpp @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // GUI (QT) //----------------------------------------------------------------------------- diff --git a/client/src/proxguiqt.h b/client/src/proxguiqt.h index 582727cab..218e86820 100644 --- a/client/src/proxguiqt.h +++ b/client/src/proxguiqt.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // GUI (QT) //----------------------------------------------------------------------------- diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 286463845..67d1c6528 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Main binary //----------------------------------------------------------------------------- diff --git a/client/src/proxmark3.h b/client/src/proxmark3.h index dc5bab2b9..a9f80ae91 100644 --- a/client/src/proxmark3.h +++ b/client/src/proxmark3.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Main binary //----------------------------------------------------------------------------- diff --git a/client/src/rl_vocabulory.h b/client/src/rl_vocabulory.h index 87dcf1b6d..1e372bc34 100644 --- a/client/src/rl_vocabulory.h +++ b/client/src/rl_vocabulory.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // readline auto complete utilities //----------------------------------------------------------------------------- diff --git a/client/src/scandir.c b/client/src/scandir.c index b06befe8e..8c7764730 100644 --- a/client/src/scandir.c +++ b/client/src/scandir.c @@ -1,14 +1,21 @@ -/* scandir.cc - - Copyright 1998, 1999, 2000, 2001 Red Hat, Inc. - - Written by Corinna Vinschen - - This file is part of Cygwin. - - This software is a copyrighted work licensed under the terms of the - Cygwin license. Please consult the file "CYGWIN_LICENSE" for - details. */ +//----------------------------------------------------------------------------- +// Borrowed initially from +// https://github.com/msysgit/msys/blob/master/winsup/cygwin/scandir.cc +// Copyright (C) 1998-2001 Red Hat, Inc. Corinna Vinschen +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "scandir.h" diff --git a/client/src/scandir.h b/client/src/scandir.h index 905431cbe..46951fb54 100644 --- a/client/src/scandir.h +++ b/client/src/scandir.h @@ -1,11 +1,20 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2017 iceman +// Borrowed initially from +// https://github.com/msysgit/msys/blob/master/winsup/cygwin/scandir.cc +// Copyright (C) 1998-2001 Red Hat, Inc. Corinna Vinschen +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. -//----------------------------------------------------------------------------- -// platform-independant sleep macros +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- #ifndef SCANDIR_H__ diff --git a/client/src/scripting.c b/client/src/scripting.c index 4b3ccd2f9..e93e223d1 100644 --- a/client/src/scripting.c +++ b/client/src/scripting.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2013 m h swende -// Modified 2015,2016, iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Some lua scripting glue to proxmark core. //----------------------------------------------------------------------------- diff --git a/client/src/scripting.h b/client/src/scripting.h index b23ce3a9a..330ea3d22 100644 --- a/client/src/scripting.h +++ b/client/src/scripting.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2013 m h swende +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Some lua scripting glue to proxmark core. //----------------------------------------------------------------------------- diff --git a/client/src/tea.c b/client/src/tea.c index b2a425e11..ae5aa366d 100644 --- a/client/src/tea.c +++ b/client/src/tea.c @@ -1,10 +1,22 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Borrowed initially from +// https://web.archive.org/web/20070920142755/http://www.simonshepherd.supanet.com:80/source.htm#ansi +// Copyright (C) Simon Shepherd 2003 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Generic TEA crypto code. -// ref: http://143.53.36.235:8080/source.htm#ansi //----------------------------------------------------------------------------- #include "tea.h" diff --git a/client/src/tea.h b/client/src/tea.h index 3390b9d92..1dda24a1f 100644 --- a/client/src/tea.h +++ b/client/src/tea.h @@ -1,10 +1,22 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Borrowed initially from +// https://web.archive.org/web/20070920142755/http://www.simonshepherd.supanet.com:80/source.htm#ansi +// Copyright (C) Simon Shepherd 2003 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Generic TEA crypto code. -// ref: http://143.53.36.235:8080/source.htm#ansi //----------------------------------------------------------------------------- #ifndef __TEA_H diff --git a/client/src/uart/uart.h b/client/src/uart/uart.h index 172e7db0d..ba4537769 100644 --- a/client/src/uart/uart.h +++ b/client/src/uart/uart.h @@ -1,33 +1,20 @@ -/* - * Generic uart / rs232/ serial port library - * - * Copyright (c) 2013, Roel Verdult - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @file uart.h - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// Generic uart / rs232/ serial port library +//----------------------------------------------------------------------------- #ifndef _UART_H_ #define _UART_H_ diff --git a/client/src/uart/uart_posix.c b/client/src/uart/uart_posix.c index 8d1547913..b49458cb7 100644 --- a/client/src/uart/uart_posix.c +++ b/client/src/uart/uart_posix.c @@ -1,37 +1,20 @@ -/* - * Generic uart / rs232/ serial port library - * - * Copyright (c) 2013, Roel Verdult - * Copyright (c) 2018 Google - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @file uart_posix.c - * - * This version of the library has functionality removed which was not used by - * proxmark3 project. - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// Generic uart / rs232/ serial port library +//----------------------------------------------------------------------------- // Test if we are dealing with posix operating systems #ifndef _WIN32 diff --git a/client/src/uart/uart_win32.c b/client/src/uart/uart_win32.c index ef35694c7..bf292685a 100644 --- a/client/src/uart/uart_win32.c +++ b/client/src/uart/uart_win32.c @@ -1,40 +1,20 @@ -/* - * Generic uart / rs232/ serial port library - * - * Copyright (c) 2013, Roel Verdult - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @file uart_win32.c - * - * Note: the win32 version of this library has also been seen under the GPLv3+ - * license as part of the libnfc project, which appears to have additional - * contributors. - * - * This version of the library has functionality removed which was not used by - * proxmark3 project. - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// Generic uart / rs232/ serial port library +//----------------------------------------------------------------------------- #include "uart.h" diff --git a/client/src/ui.c b/client/src/ui.c index 250b1cb0e..746ac7396 100644 --- a/client/src/ui.c +++ b/client/src/ui.c @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // UI utilities //----------------------------------------------------------------------------- diff --git a/client/src/ui.h b/client/src/ui.h index 115234ee9..ec496fd80 100644 --- a/client/src/ui.h +++ b/client/src/ui.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // UI utilities //----------------------------------------------------------------------------- diff --git a/client/src/util.c b/client/src/util.c index 867c1fc15..59c80b29b 100644 --- a/client/src/util.c +++ b/client/src/util.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // utilities //----------------------------------------------------------------------------- diff --git a/client/src/util.h b/client/src/util.h index df9149829..b760d2278 100644 --- a/client/src/util.h +++ b/client/src/util.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // utilities //----------------------------------------------------------------------------- diff --git a/client/src/util_darwin.h b/client/src/util_darwin.h index 001282578..5c80033bb 100644 --- a/client/src/util_darwin.h +++ b/client/src/util_darwin.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2018 AntiCat +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // macOS framework bindings //----------------------------------------------------------------------------- diff --git a/client/src/util_darwin.m b/client/src/util_darwin.m index a22ac54f6..f2d45fe56 100644 --- a/client/src/util_darwin.m +++ b/client/src/util_darwin.m @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2018 AntiCat +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // macOS framework bindings //----------------------------------------------------------------------------- diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index 7f507d982..bcedea90d 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1,11 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 grauerfuchs +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// HID card format packing/unpacking routines +// Wiegand format packing/unpacking routines //----------------------------------------------------------------------------- #include "wiegand_formats.h" #include diff --git a/client/src/wiegand_formats.h b/client/src/wiegand_formats.h index 313681bab..671795c9a 100644 --- a/client/src/wiegand_formats.h +++ b/client/src/wiegand_formats.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 grauerfuchs +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Wiegand format packing/unpacking routines //----------------------------------------------------------------------------- diff --git a/client/src/wiegand_formatutils.c b/client/src/wiegand_formatutils.c index 878734149..5f7dae901 100644 --- a/client/src/wiegand_formatutils.c +++ b/client/src/wiegand_formatutils.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 grauerfuchs +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Wiegand card format packing/unpacking support functions //----------------------------------------------------------------------------- diff --git a/client/src/wiegand_formatutils.h b/client/src/wiegand_formatutils.h index 3709f2e00..01a413032 100644 --- a/client/src/wiegand_formatutils.h +++ b/client/src/wiegand_formatutils.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2018 grauerfuchs +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Weigand card format packing/unpacking support functions //----------------------------------------------------------------------------- diff --git a/common/bucketsort.c b/common/bucketsort.c index 9ede6ee6e..9563b0e9a 100644 --- a/common/bucketsort.c +++ b/common/bucketsort.c @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "bucketsort.h" extern void bucket_sort_intersect(uint32_t *const estart, uint32_t *const estop, diff --git a/common/bucketsort.h b/common/bucketsort.h index 9e5123e1a..e4db1977b 100644 --- a/common/bucketsort.h +++ b/common/bucketsort.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef BUCKETSORT_H__ #define BUCKETSORT_H__ diff --git a/common/cardhelper.c b/common/cardhelper.c index 7d312e869..c8c8b6bd8 100644 --- a/common/cardhelper.c +++ b/common/cardhelper.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman, February 2020 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Support functions for smart card //----------------------------------------------------------------------------- diff --git a/common/cardhelper.h b/common/cardhelper.h index 1ef5b646e..9574397a1 100644 --- a/common/cardhelper.h +++ b/common/cardhelper.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Iceman, February 2020 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Utility functions used in many places, not specific to any piece of code. //----------------------------------------------------------------------------- diff --git a/common/commonutil.c b/common/commonutil.c index 1eee0ff23..3002953d5 100644 --- a/common/commonutil.c +++ b/common/commonutil.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Jonathan Westhues, Sept 2005 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Utility functions used in many places, not specific to any piece of code. //----------------------------------------------------------------------------- diff --git a/common/commonutil.h b/common/commonutil.h index 8646de3ba..01abdd0cb 100644 --- a/common/commonutil.h +++ b/common/commonutil.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Jonathan Westhues, Aug 2005 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Utility functions used in many places, not specific to any piece of code. //----------------------------------------------------------------------------- diff --git a/common/crapto1/crapto1.c b/common/crapto1/crapto1.c index b70cfa159..7d06fee39 100644 --- a/common/crapto1/crapto1.c +++ b/common/crapto1/crapto1.c @@ -1,22 +1,19 @@ -/* crapto1.c - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, US$ - - Copyright (C) 2008-2014 bla -*/ +//----------------------------------------------------------------------------- +// Copyright (C) 2008-2014 bla +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "crapto1.h" #include "bucketsort.h" diff --git a/common/crapto1/crapto1.h b/common/crapto1/crapto1.h index 105b3ab06..fbb9bcd43 100644 --- a/common/crapto1/crapto1.h +++ b/common/crapto1/crapto1.h @@ -1,22 +1,19 @@ -/* crapto1.h - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301, US$ - - Copyright (C) 2008-2014 bla -*/ +//----------------------------------------------------------------------------- +// Copyright (C) 2008-2014 bla +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef CRAPTO1_INCLUDED #define CRAPTO1_INCLUDED diff --git a/common/crapto1/crypto1.c b/common/crapto1/crypto1.c index 2aebc2e83..78d42cec4 100644 --- a/common/crapto1/crypto1.c +++ b/common/crapto1/crypto1.c @@ -1,22 +1,19 @@ -/* crypto1.c - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301, US - - Copyright (C) 2008-2008 bla -*/ +//----------------------------------------------------------------------------- +// Copyright (C) 2008-2014 bla +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include #include "crapto1.h" #include "parity.h" diff --git a/common/crc.c b/common/crc.c index f4cf3834f..876c00951 100644 --- a/common/crc.c +++ b/common/crc.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Generic CRC calculation code. //----------------------------------------------------------------------------- diff --git a/common/crc.h b/common/crc.h index f06ceddf0..1715ef1dc 100644 --- a/common/crc.h +++ b/common/crc.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Generic CRC calculation code. //----------------------------------------------------------------------------- diff --git a/common/crc16.c b/common/crc16.c index e61cf1d58..f78fab5b4 100644 --- a/common/crc16.c +++ b/common/crc16.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CRC16 //----------------------------------------------------------------------------- diff --git a/common/crc16.h b/common/crc16.h index abf403629..d9631c43c 100644 --- a/common/crc16.h +++ b/common/crc16.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CRC16 //----------------------------------------------------------------------------- diff --git a/common/crc32.c b/common/crc32.c index 574d499b2..17b126409 100644 --- a/common/crc32.c +++ b/common/crc32.c @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "crc32.h" #define htole32(x) (x) diff --git a/common/crc32.h b/common/crc32.h index 2cbe45e6c..405f19b05 100644 --- a/common/crc32.h +++ b/common/crc32.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CRC32 //----------------------------------------------------------------------------- diff --git a/common/crc64.c b/common/crc64.c index eaa5249ab..842a1a44c 100644 --- a/common/crc64.c +++ b/common/crc64.c @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "crc64.h" #define CRC64_ISO_PRESET 0xFFFFFFFFFFFFFFFF diff --git a/common/crc64.h b/common/crc64.h index af6417cb3..dbd2b84ae 100644 --- a/common/crc64.h +++ b/common/crc64.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // CRC64 ECMA //----------------------------------------------------------------------------- diff --git a/common/cryptorf/cryptolib.c b/common/cryptorf/cryptolib.c index 4e2acf929..eded5315c 100644 --- a/common/cryptorf/cryptolib.c +++ b/common/cryptorf/cryptolib.c @@ -1,24 +1,22 @@ -/* - * - * SecureMemory, CryptoMemory and CryptoRF library - * - * Copyright (C) 2010, Flavio D. Garcia, Peter van Rossum, Roel Verdult - * and Ronny Wichers Schreur. Radboud University Nijmegen - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ +//----------------------------------------------------------------------------- +// Copyright (C) 2010, Flavio D. Garcia, Peter van Rossum, Roel Verdult +// and Ronny Wichers Schreur. Radboud University Nijmegen +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// SecureMemory, CryptoMemory and CryptoRF library +//----------------------------------------------------------------------------- #include "cryptolib.h" #include diff --git a/common/cryptorf/cryptolib.h b/common/cryptorf/cryptolib.h index 978afd27b..9760acdc8 100644 --- a/common/cryptorf/cryptolib.h +++ b/common/cryptorf/cryptolib.h @@ -1,24 +1,22 @@ -/* - * - * SecureMemory, CryptoMemory and CryptoRF library - * - * Copyright (C) 2010, Flavio D. Garcia, Peter van Rossum, Roel Verdult - * and Ronny Wichers Schreur. Radboud University Nijmegen - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ +//----------------------------------------------------------------------------- +// Copyright (C) 2010, Flavio D. Garcia, Peter van Rossum, Roel Verdult +// and Ronny Wichers Schreur. Radboud University Nijmegen +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// SecureMemory, CryptoMemory and CryptoRF library +//----------------------------------------------------------------------------- #ifndef _CRYPTOLIB_H_ #define _CRYPTOLIB_H_ diff --git a/common/default_version_pm3.c b/common/default_version_pm3.c index 1f3f32415..d2a1deb83 100644 --- a/common/default_version_pm3.c +++ b/common/default_version_pm3.c @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "common.h" /* This is the default version_pm3.c file that Makefile.common falls back to if neither sh nor perl are available */ #ifndef ON_DEVICE diff --git a/common/generator.c b/common/generator.c index 8b259a79c..c3b1c4c5e 100644 --- a/common/generator.c +++ b/common/generator.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Generator commands //----------------------------------------------------------------------------- diff --git a/common/generator.h b/common/generator.h index c25655a76..12c63412e 100644 --- a/common/generator.h +++ b/common/generator.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2019 iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Generator commands //----------------------------------------------------------------------------- diff --git a/common/get_lz4.sh b/common/get_lz4.sh index 6c2dcf3cb..5b6729110 100755 --- a/common/get_lz4.sh +++ b/common/get_lz4.sh @@ -1,3 +1,19 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- + version=1.9.2 mkdir -p lz4 wget https://github.com/lz4/lz4/archive/v$version.zip diff --git a/common/iso15693tools.c b/common/iso15693tools.c index 494242135..214a66ccb 100644 --- a/common/iso15693tools.c +++ b/common/iso15693tools.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO15693 other commons //----------------------------------------------------------------------------- diff --git a/common/iso15693tools.h b/common/iso15693tools.h index 211927077..a18498a8d 100644 --- a/common/iso15693tools.h +++ b/common/iso15693tools.h @@ -1,12 +1,20 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO15693 other commons //----------------------------------------------------------------------------- -// Adrian Dabrowski 2010 and otherss -// Christian Herrmann 2018 #ifndef ISO15693_H__ #define ISO15693_H__ diff --git a/common/legic_prng.c b/common/legic_prng.c index 35ca4c6de..fa1298b07 100644 --- a/common/legic_prng.c +++ b/common/legic_prng.c @@ -1,9 +1,19 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// LEFIC's obfuscation function +// LEGIC's obfuscation function //----------------------------------------------------------------------------- #include "legic_prng.h" diff --git a/common/legic_prng.h b/common/legic_prng.h index b72c6d8ed..1b02518f4 100644 --- a/common/legic_prng.h +++ b/common/legic_prng.h @@ -1,9 +1,19 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// LEFIC's obfuscation function +// LEGIC's obfuscation function //----------------------------------------------------------------------------- #ifndef __LEGIC_PRNG_H diff --git a/common/lfdemod.c b/common/lfdemod.c index 2e244a340..8314206d0 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -1,12 +1,19 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2014 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- -// Low frequency demod/decode commands - by marshmellow, holiman, iceman and -// many others who came before +// Low frequency demod/decode commands // // NOTES: // LF Demod functions are placed here to allow the flexibility to use client or diff --git a/common/lfdemod.h b/common/lfdemod.h index 52766cd2f..c8ca0cfea 100644 --- a/common/lfdemod.h +++ b/common/lfdemod.h @@ -1,14 +1,21 @@ -// Copyright (C) 2014 +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency demod related commands -// marshmellow // note that many of these demods are not the slickest code and they often rely // on peaks and clock instead of converting to clean signal. -// //----------------------------------------------------------------------------- #ifndef LFDEMOD_H__ diff --git a/common/parity.c b/common/parity.c index 1651b3aa6..cae62914b 100644 --- a/common/parity.c +++ b/common/parity.c @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // parity functions (all defined in parity.h) //----------------------------------------------------------------------------- diff --git a/common/parity.h b/common/parity.h index 414286bc5..82ca85c9f 100644 --- a/common/parity.h +++ b/common/parity.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Parity functions //----------------------------------------------------------------------------- diff --git a/common/util_posix.c b/common/util_posix.c index 050040a32..f1764533d 100644 --- a/common/util_posix.c +++ b/common/util_posix.c @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // utilities requiring Posix library functions //----------------------------------------------------------------------------- diff --git a/common/util_posix.h b/common/util_posix.h index 546b4ea35..08c4b3193 100644 --- a/common/util_posix.h +++ b/common/util_posix.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2010 iZsh +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // utilities requiring Posix library functions //----------------------------------------------------------------------------- diff --git a/common_arm/Makefile.common b/common_arm/Makefile.common index 50b1eaac5..99f4d9ecd 100644 --- a/common_arm/Makefile.common +++ b/common_arm/Makefile.common @@ -1,7 +1,17 @@ #----------------------------------------------------------------------------- -# This code is licensed to you under the terms of the GNU GPL, version 2 or, -# at your option, any later version. See the LICENSE.txt file for the text of -# the license. +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. #----------------------------------------------------------------------------- # Common makefile functions for all platforms #----------------------------------------------------------------------------- diff --git a/common_arm/Makefile.hal b/common_arm/Makefile.hal index e3d219348..62b99020d 100644 --- a/common_arm/Makefile.hal +++ b/common_arm/Makefile.hal @@ -1,3 +1,18 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # Default platform if no platform specified PLATFORM?=PM3RDV4 diff --git a/common_arm/clocks.c b/common_arm/clocks.c index c6fa874d3..6e39eef87 100644 --- a/common_arm/clocks.c +++ b/common_arm/clocks.c @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "clocks.h" #include "proxmark3_arm.h" diff --git a/common_arm/clocks.h b/common_arm/clocks.h index 1752ba4fd..47dcb0a9b 100644 --- a/common_arm/clocks.h +++ b/common_arm/clocks.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef _CLOCKS_H_ #define _CLOCKS_H_ diff --git a/common_arm/ldscript.common b/common_arm/ldscript.common index 610e5c0b4..0d896f6ff 100644 --- a/common_arm/ldscript.common +++ b/common_arm/ldscript.common @@ -1,13 +1,21 @@ -/* ------------------------------------------------------------------------------ - This code is licensed to you under the ter -ms of the GNU GPL, version 2 or, - at your option, any later version. See the LICENSE.txt file for the text of - the license. ------------------------------------------------------------------------------ - Common linker script ------------------------------------------------------------------------------ -*/ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Common linker script +//----------------------------------------------------------------------------- stacksize = DEFINED(stacksize) ? stacksize : 8488; commonareasize = 0x20; diff --git a/common_arm/usb_cdc.c b/common_arm/usb_cdc.c index 260cdcb50..0ccf25aef 100644 --- a/common_arm/usb_cdc.c +++ b/common_arm/usb_cdc.c @@ -1,36 +1,21 @@ -/* - * at91sam7s USB CDC device implementation - * - * Copyright (c) 2012, Roel Verdult - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * based on the "Basic USB Example" from ATMEL (doc6123.pdf) - * - * @file usb_cdc.c - * @brief - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// at91sam7s USB CDC device implementation +// based on the "Basic USB Example" from ATMEL (doc6123.pdf) +//----------------------------------------------------------------------------- #include "usb_cdc.h" #include "proxmark3_arm.h" diff --git a/common_arm/usb_cdc.h b/common_arm/usb_cdc.h index 2f6c5b15d..a09d3fc33 100644 --- a/common_arm/usb_cdc.h +++ b/common_arm/usb_cdc.h @@ -1,36 +1,21 @@ -/* - * at91sam7s USB CDC device implementation - * - * Copyright (c) 2012, Roel Verdult - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * based on the "Basic USB Example" from ATMEL (doc6123.pdf) - * - * @file usb_cdc.c - * @brief - */ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// at91sam7s USB CDC device implementation +// based on the "Basic USB Example" from ATMEL (doc6123.pdf) +//----------------------------------------------------------------------------- #ifndef _USB_CDC_H_ #define _USB_CDC_H_ diff --git a/common_fpga/fpga.h b/common_fpga/fpga.h index 1679f0a80..293a7963a 100644 --- a/common_fpga/fpga.h +++ b/common_fpga/fpga.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- #ifndef __FPGA_H diff --git a/include/ansi.h b/include/ansi.h index 27d0dc2e7..47ce9a5be 100644 --- a/include/ansi.h +++ b/include/ansi.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef __ANSI_H #define __ANSI_H diff --git a/include/common.h b/include/common.h index 2e88078e3..314b67b57 100644 --- a/include/common.h +++ b/include/common.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Hagen Fritsch - June 2010 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Interlib Definitions //----------------------------------------------------------------------------- diff --git a/include/config_gpio.h b/include/config_gpio.h index bc792049a..bc1f18a9d 100644 --- a/include/config_gpio.h +++ b/include/config_gpio.h @@ -1,7 +1,17 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // GPIO pin mapping for the Proxmark3 //----------------------------------------------------------------------------- diff --git a/include/desfire.h b/include/desfire.h index b421ad564..37716f11d 100644 --- a/include/desfire.h +++ b/include/desfire.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef __DESFIRE_H #define __DESFIRE_H diff --git a/include/em4x50.h b/include/em4x50.h index d27926463..bed01901c 100644 --- a/include/em4x50.h +++ b/include/em4x50.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 tharexde +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x50 structs //----------------------------------------------------------------------------- diff --git a/include/em4x70.h b/include/em4x70.h index 183e7398d..bce860bb1 100644 --- a/include/em4x70.h +++ b/include/em4x70.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2020 sirloins +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency EM4x70 structs //----------------------------------------------------------------------------- diff --git a/include/hitag.h b/include/hitag.h index 6a42d976c..fd0b2ddac 100644 --- a/include/hitag.h +++ b/include/hitag.h @@ -1,13 +1,19 @@ //----------------------------------------------------------------------------- -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Hitag2, HitagS -// -// (c) 2012 Roel Verdult -// (c) 2016 Oguzhan Cicek, Hendrik Schwartke, Ralf Spenneberg -// //----------------------------------------------------------------------------- diff --git a/include/iclass_cmd.h b/include/iclass_cmd.h index db9c43903..e78531868 100644 --- a/include/iclass_cmd.h +++ b/include/iclass_cmd.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2021 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // iCLASS type prototyping //----------------------------------------------------------------------------- diff --git a/include/iso14b.h b/include/iso14b.h index 766ca851c..90e521b23 100644 --- a/include/iso14b.h +++ b/include/iso14b.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2020 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO 14443B type prototyping //----------------------------------------------------------------------------- diff --git a/include/iso15.h b/include/iso15.h index a84dc91cd..d66a93d2b 100644 --- a/include/iso15.h +++ b/include/iso15.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2020 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO 15693 type prototyping //----------------------------------------------------------------------------- diff --git a/include/iso18.h b/include/iso18.h index 27f8078a0..377f864d0 100644 --- a/include/iso18.h +++ b/include/iso18.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2020 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // ISO 18002 / FeliCa type prototyping //----------------------------------------------------------------------------- diff --git a/include/legic.h b/include/legic.h index 17d2ebc26..7fb3ff19b 100644 --- a/include/legic.h +++ b/include/legic.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2016 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // LEGIC type prototyping //----------------------------------------------------------------------------- diff --git a/include/mifare.h b/include/mifare.h index 3500c8b8f..e66df50aa 100644 --- a/include/mifare.h +++ b/include/mifare.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// (c) 2012 Roel Verdult +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // MIFARE type prototyping //----------------------------------------------------------------------------- diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index fe3a55862..3505c9ae7 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// Jonathan Westhues, Mar 2006 -// Edits by Gerhard de Koning Gans, Sep 2007 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Definitions for all the types of commands that may be sent over USB; our // own protocol. diff --git a/include/pmflash.h b/include/pmflash.h index c2f90bfc1..58bf2eb46 100644 --- a/include/pmflash.h +++ b/include/pmflash.h @@ -1,10 +1,17 @@ //----------------------------------------------------------------------------- -// (c) RFID Research Group - 2019 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // RDV4 flash constants //----------------------------------------------------------------------------- diff --git a/include/protocols.h b/include/protocols.h index da67d42f0..d2aa4c628 100644 --- a/include/protocols.h +++ b/include/protocols.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef PROTOCOLS_H #define PROTOCOLS_H diff --git a/include/proxmark3_arm.h b/include/proxmark3_arm.h index 54c0695ea..742a115f5 100644 --- a/include/proxmark3_arm.h +++ b/include/proxmark3_arm.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Jonathan Westhues, Mar 2006 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Hardware and interface definitions //----------------------------------------------------------------------------- diff --git a/include/usart_defs.h b/include/usart_defs.h index cf6630e83..501f66464 100644 --- a/include/usart_defs.h +++ b/include/usart_defs.h @@ -1,3 +1,18 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #ifndef __USART_DEFS_H #define __USART_DEFS_H diff --git a/include/zx8211.h b/include/zx8211.h index 918f8c30f..ed0b71c7c 100644 --- a/include/zx8211.h +++ b/include/zx8211.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 Iceman +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // Low frequency ZX8211 structs //----------------------------------------------------------------------------- diff --git a/tools/build_all_firmwares.sh b/tools/build_all_firmwares.sh index 648bd211b..019586c65 100755 --- a/tools/build_all_firmwares.sh +++ b/tools/build_all_firmwares.sh @@ -1,5 +1,20 @@ #!/bin/bash # (Need bash because of Bash Arrays) +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # These vars can be overridden by env variables echo "Makefile flags: ${MKFLAGS:=-j8}" From 0579b8f63cbb92e28353713d583120d92cc707cc Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 19:07:29 -0500 Subject: [PATCH 11/73] Made requested changes -- I think --- armsrc/Standalone/Makefile.hal | 17 +++++++++++++- armsrc/Standalone/Makefile.inc | 22 ++++++++++++++++--- .../{hf_15693sniff.c => hf_15sniff.c} | 17 ++++++++++---- .../4_Advanced-compilation-parameters.md | 2 +- 4 files changed, 49 insertions(+), 9 deletions(-) rename armsrc/Standalone/{hf_15693sniff.c => hf_15sniff.c} (86%) diff --git a/armsrc/Standalone/Makefile.hal b/armsrc/Standalone/Makefile.hal index b7fc6e11b..c18bef124 100644 --- a/armsrc/Standalone/Makefile.hal +++ b/armsrc/Standalone/Makefile.hal @@ -1,3 +1,18 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # Default standalone if no standalone specified DEFAULT_STANDALONE=LF_SAMYRUN HELP_EXAMPLE_STANDALONE=LF_SAMYRUN @@ -47,7 +62,7 @@ define KNOWN_STANDALONE_DEFINITIONS | HF_14ASNIFF | 14a sniff to flashmem | | (RDV4 only) | | +----------------------------------------------------------+ -| HF_15693SNIFF | 15693 sniff to flashmem | +| HF_15SNIFF | 15693 sniff to flashmem | | (RDV4 only) | | +----------------------------------------------------------+ | HF_AVEFUL | Mifare ultralight read/simulation | diff --git a/armsrc/Standalone/Makefile.inc b/armsrc/Standalone/Makefile.inc index c65533a57..6f8e3c994 100644 --- a/armsrc/Standalone/Makefile.inc +++ b/armsrc/Standalone/Makefile.inc @@ -1,4 +1,20 @@ +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # Generic standalone Mode injection of source code +#----------------------------------------------------------------------------- SRC_STANDALONE = placeholder.c # WITH_STANDALONE_LF_SKELETON @@ -41,9 +57,9 @@ endif ifneq (,$(findstring WITH_STANDALONE_HF_14ASNIFF,$(APP_CFLAGS))) SRC_STANDALONE = hf_14asniff.c endif -# WITH_STANDALONE_HF_15693SNIFF -ifneq (,$(findstring WITH_STANDALONE_HF_15693SNIFF,$(APP_CFLAGS))) - SRC_STANDALONE = hf_15693sniff.c +# WITH_STANDALONE_HF_15SNIFF +ifneq (,$(findstring WITH_STANDALONE_HF_15SNIFF,$(APP_CFLAGS))) + SRC_STANDALONE = hf_15sniff.c endif # WITH_STANDALONE_HF_AVEFUL ifneq (,$(findstring WITH_STANDALONE_HF_AVEFUL,$(APP_CFLAGS))) diff --git a/armsrc/Standalone/hf_15693sniff.c b/armsrc/Standalone/hf_15sniff.c similarity index 86% rename from armsrc/Standalone/hf_15693sniff.c rename to armsrc/Standalone/hf_15sniff.c index 35e22c966..45d837859 100644 --- a/armsrc/Standalone/hf_15693sniff.c +++ b/armsrc/Standalone/hf_15sniff.c @@ -1,9 +1,18 @@ //----------------------------------------------------------------------------- -// Copyright 2021 Nathan Glaser +// Copyright (C) Nathan Glaser, 2021 +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // main code for standalone HF/iso15693 Sniff to flash //----------------------------------------------------------------------------- diff --git a/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md b/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md index 1d2127926..5813caf48 100644 --- a/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md +++ b/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md @@ -113,7 +113,7 @@ Here are the supported values you can assign to `STANDALONE` in `Makefile.platfo | LF_SKELETON | standalone mode skeleton - Iceman1001 | LF_THAREXDE | LF EM4x50 simulator/read standalone mode - tharexde | HF_14ASNIFF | 14a sniff storing to flashmem - Micolous -| HF_15693SNIFF | 15693 sniff storing to flashmem - Glaser +| HF_15SNIFF | 15693 sniff storing to flashmem - Glaser | HF_AVEFUL | MIFARE Ultralight read/simulation - Ave Ozkal | HF_BOG | 14a sniff with ULC/ULEV1/NTAG auth storing in flashmem - Bogito | HF_CRAFTBYTE | UID stealer - Emulates scanned 14a UID - Anze Jensterle From 169f7dfc47ed62d7186e914add02e71662c1a7ce Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 19:12:13 -0500 Subject: [PATCH 12/73] added build_all_firmware changes --- tools/build_all_firmwares.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/build_all_firmwares.sh b/tools/build_all_firmwares.sh index 648bd211b..7514a9757 100755 --- a/tools/build_all_firmwares.sh +++ b/tools/build_all_firmwares.sh @@ -1,5 +1,20 @@ #!/bin/bash # (Need bash because of Bash Arrays) +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- # These vars can be overridden by env variables echo "Makefile flags: ${MKFLAGS:=-j8}" @@ -16,10 +31,10 @@ mv bootrom/obj/bootrom.elf "$DEST/PM3BOOTROM.elf" # cf armsrc/Standalone/Makefile.hal STANDALONE_MODES=(LF_SKELETON LF_EM4100EMUL LF_EM4100RSWB LF_EM4100RWC LF_HIDBRUTE LF_HIDFCBRUTE LF_ICEHID LF_PROXBRUTE LF_SAMYRUN LF_THAREXDE LF_NEXID) -STANDALONE_MODES+=(HF_14ASNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MFCSIM HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG HF_REBLAY DANKARMULTI) +STANDALONE_MODES+=(HF_14ASNIFF HF_15SNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MFCSIM HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG HF_REBLAY DANKARMULTI) STANDALONE_MODES_REQ_BT=(HF_REBLAY) STANDALONE_MODES_REQ_SMARTCARD=() -STANDALONE_MODES_REQ_FLASH=(LF_HIDFCBRUTE LF_ICEHID LF_NEXID LF_THAREXDE HF_14ASNIFF HF_BOG HF_COLIN HF_ICECLASS HF_MFCSIM) +STANDALONE_MODES_REQ_FLASH=(LF_HIDFCBRUTE LF_ICEHID LF_NEXID LF_THAREXDE HF_14ASNIFF HF_15SNIFF HF_BOG HF_COLIN HF_ICECLASS HF_MFCSIM) # PM3GENERIC 256kb, no flash, need to skip some parts to reduce size From be18b9478d932c971855c7d8d270a6db9375357c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 01:12:37 +0100 Subject: [PATCH 13/73] fix ldscript --- common_arm/ldscript.common | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/common_arm/ldscript.common b/common_arm/ldscript.common index 0d896f6ff..640ccee52 100644 --- a/common_arm/ldscript.common +++ b/common_arm/ldscript.common @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -// Common linker script -//----------------------------------------------------------------------------- - +/*----------------------------------------------------------------------------- + * Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * See LICENSE.txt for the text of the license. + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + * Common linker script + *----------------------------------------------------------------------------- + */ stacksize = DEFINED(stacksize) ? stacksize : 8488; commonareasize = 0x20; From a06c88e728c6a8e88350ca190449633d8bea5515 Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 19:18:41 -0500 Subject: [PATCH 14/73] Makefile.hal change to remove 693 --- armsrc/Standalone/Makefile.hal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armsrc/Standalone/Makefile.hal b/armsrc/Standalone/Makefile.hal index c18bef124..0d6b0527a 100644 --- a/armsrc/Standalone/Makefile.hal +++ b/armsrc/Standalone/Makefile.hal @@ -110,10 +110,10 @@ define KNOWN_STANDALONE_DEFINITIONS endef STANDALONE_MODES := LF_SKELETON LF_EM4100EMUL LF_EM4100RSWB LF_EM4100RWC LF_HIDBRUTE LF_HIDFCBRUTE LF_ICEHID LF_PROXBRUTE LF_SAMYRUN LF_THAREXDE LF_NEXID -STANDALONE_MODES += HF_14ASNIFF HF_15693SNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MFCSIM HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG HF_REBLAY DANKARMULTI +STANDALONE_MODES += HF_14ASNIFF HF_15SNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MFCSIM HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG HF_REBLAY DANKARMULTI STANDALONE_MODES_REQ_BT := HF_REBLAY STANDALONE_MODES_REQ_SMARTCARD := -STANDALONE_MODES_REQ_FLASH := LF_HIDFCBRUTE LF_ICEHID LF_NEXID LF_THAREXDE HF_14ASNIFF HF_15693SNIFF HF_BOG HF_COLIN HF_ICECLASS HF_MFCSIM +STANDALONE_MODES_REQ_FLASH := LF_HIDFCBRUTE LF_ICEHID LF_NEXID LF_THAREXDE HF_14ASNIFF HF_15SNIFF HF_BOG HF_COLIN HF_ICECLASS HF_MFCSIM ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES)),) STANDALONE_PLATFORM_DEFS += -DWITH_STANDALONE_$(STANDALONE) ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES_REQ_SMARTCARD)),) From 118bc8f16db6bd88795ff7cf4e1fac4a83c892c6 Mon Sep 17 00:00:00 2001 From: Nate Glaser Date: Fri, 7 Jan 2022 19:20:46 -0500 Subject: [PATCH 15/73] Changelog.md to move 15693 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07061b864..eab266b2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + - Added new standalone mode `hf_15SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem - Added support for MIFARE DESFire application creation without authentication (@joswr1ght) - Changed drastically Hitag S ARM code to remove state machines and ease way to build new commands (@doegox) - Fixed Hitag S crypto mode with key or NrAr, fixed `lf hitag cc`, fixed pwd dump in hitagS dump with LKP (@doegox) @@ -58,7 +59,6 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac - Fixed `SimulateTagLowFrequencyEx` ignoring the `ledcontrol` argument (@zabszk) - Added ledcontrol argument to LF operations (@zabszk) - Added new standalone mode `dankarmulti` - select and run multiple standalone modes (@dankar) - - Added new standalone mode `hf_15693SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem ## [crimson.4.14434][2021-09-18] - Fixed `hf mf staticnested` - flashmem / non loop now works (@horrordash) From 8f402c58619162c95cbf02ff86b2fcd015b3602c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 01:26:51 +0100 Subject: [PATCH 16/73] text --- CHANGELOG.md | 2 +- armsrc/Standalone/readme.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eab266b2b..107228324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] - - Added new standalone mode `hf_15SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem + - Added new standalone mode `hf_15SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem (@startrk1995) - Added support for MIFARE DESFire application creation without authentication (@joswr1ght) - Changed drastically Hitag S ARM code to remove state machines and ease way to build new commands (@doegox) - Fixed Hitag S crypto mode with key or NrAr, fixed `lf hitag cc`, fixed pwd dump in hitagS dump with LKP (@doegox) diff --git a/armsrc/Standalone/readme.md b/armsrc/Standalone/readme.md index dacf5057c..d1fa6067b 100644 --- a/armsrc/Standalone/readme.md +++ b/armsrc/Standalone/readme.md @@ -173,7 +173,9 @@ Make sure it says your standalone mode name. Once you're ready to share your mode, please * add a line in CHANGELOG.md -* add your mode in the modes table in doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md +* add your mode in the modes table in `doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md` +* add your mode in `tools/build_all_firmwares.sh` + and submit your PR. From e34870a732c8bb7dd9a304ec190f2fbf3088daf7 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 01:47:30 +0100 Subject: [PATCH 17/73] text --- armsrc/Standalone/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/armsrc/Standalone/readme.md b/armsrc/Standalone/readme.md index d1fa6067b..8cca3ce03 100644 --- a/armsrc/Standalone/readme.md +++ b/armsrc/Standalone/readme.md @@ -176,7 +176,8 @@ Once you're ready to share your mode, please * add your mode in the modes table in `doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md` * add your mode in `tools/build_all_firmwares.sh` - and submit your PR. +Once approved, add also your mode in https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode + Happy hacking! From 4acbcb8b42684d5d9f52b6d184240836828fddde Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 02:03:08 +0100 Subject: [PATCH 18/73] fix mailmap --- .mailmap | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 4d7076ae1..a384f1e79 100644 --- a/.mailmap +++ b/.mailmap @@ -1,40 +1,56 @@ # https://git-scm.com/docs/gitmailmap # Reunificating commits done under various names and emails variants # Feel free to edit if you need to reunify your commits or change your display name +iceman1001 iceman1001 iceman1001 iceman1001 <40314039+RfidResearchGroup@users.noreply.github.com> iceman1001 +Philippe Teuwen Philippe Teuwen Philippe Teuwen +Oleg Moiseenko Oleg Moiseenko <807634+merlokk@users.noreply.github.com> Oleg Moiseenko Oleg Moiseenko +tharexde tharexde <61853685+tharexde@users.noreply.github.com> +marshmellow42 marshmellow42 +Martin Holst Swende Martin Holst Swende Martin Holst Swende Ave Ozkal +mwalker33 mwalker33 <51802811+mwalker33@users.noreply.github.com> +tcprst tcprst +Bjoern Kerler Bjoern Kerler <6317772+bkerler@users.noreply.github.com> +Roel Verdult Roel Verdult Brian Pow +Adam Laurie Adam Laurie Gator96100 +Henryk Plรถtz Henryk Plรถtz pwpiwi d18c7db Thomas Sutter Marlin Sรถรถse <30473690+msoose@users.noreply.github.com> +Vincent Ratiskol Vincent Ratiskol -vratiskol +Vincent Ratiskol +dn337t dn337t Hector Martin bushing Matt Moran Matthias Konrath +Slurdge Slurdge +iZsh iZsh iZsh Christian Molson @@ -46,20 +62,28 @@ Ikarus Salvador Mendoza Bogiton <34060135+bogiton@users.noreply.github.com> ฤฐlteriลŸ EroฤŸlu +Samy Kamkar Samy Kamkar Blaine Forbort Daniel Underhay <27876907+dunderhay@users.noreply.github.com> Victor +ร‰douard Lafargue ร‰douard Lafargue +Anลพe Jenลกterle Anลพe Jenลกterle DXL <64101226@qq.com> Colin J. Brigato cyberpunk-re Akif Dinc Ryan Saridar <8403417+VortixDev@users.noreply.github.com> +Gabriele Gristina Gabriele Gristina +Gerhard de Koning Gans Gerhard de Koning Gans +Sรฉbastien Dudek Sรฉbastien Dudek Sรฉbastien Dudek +Nahuel Grisolia Nahuel Grisolia +Winds Winds <60715874+Windslab@users.noreply.github.com> From 5a0dda6bb05622135e26bf445e82826d97636cd1 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 12:00:54 +0100 Subject: [PATCH 19/73] Make HFGAL_* macros available to all as PM3_* macros --- client/src/cmdhfgallagher.c | 134 ++++++++++++++++++------------------ client/src/cmdhfgallagher.h | 8 --- client/src/util.h | 8 +++ 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index 2182fee88..c9b078146 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -56,7 +56,7 @@ int hfgal_diversify_key(uint8_t *site_key, uint8_t *uid, uint8_t uid_len, // Generate diversification input uint8_t kdf_input_len = 11; int res = mfdes_kdf_input_gallagher(uid, uid_len, key_num, aid, key_output, &kdf_input_len); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed generating Gallagher key diversification input"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed generating Gallagher key diversification input"); if (site_key == NULL) { PrintAndLogEx(INFO, "hfgal_diversify_key is using default site key: %s", @@ -162,10 +162,10 @@ static int authenticate(DesfireContext_t *ctx, bool verbose) { */ static int select_aid_and_authenticate(DesfireContext_t *ctx, uint32_t aid, bool verbose) { int res = select_aid(ctx, aid, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); res = authenticate(ctx, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); return PM3_SUCCESS; } @@ -180,7 +180,7 @@ static bool aid_exists(DesfireContext_t *ctx, uint32_t aid, bool verbose) { int res = DesfireSelectAIDHex(ctx, aid, false, 0); if (res != PM3_SUCCESS && res != PM3_EAPDU_FAIL) - HFGAL_RET_ERR(false, "Select failed with error %d, assuming AID %06X " + PM3_RET_ERR(false, "Select failed with error %d, assuming AID %06X " "does not exist", res, aid); if (verbose) @@ -215,12 +215,12 @@ static int hfgal_delete_app(DesfireContext_t *ctx, uint8_t *site_key, DesfireSetKeyNoClear(ctx, 0, T_AES, site_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_GALLAGHER, NULL, 0); int res = select_aid_and_authenticate(ctx, aid, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Delete application DesfireSetCommMode(ctx, DCMMACed); res = DesfireDeleteApplication(ctx, aid); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed deleting AID %06X", aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed deleting AID %06X", aid); PrintAndLogEx(INFO, "Successfully deleted AID %06X", aid); return PM3_SUCCESS; @@ -237,32 +237,32 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si GallagherCredentials_t *creds, bool verbose) { // Check that card UID has been set if (ctx->uidlen == 0) - HFGAL_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext " + PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext " "(required for key diversification)"); // Select application & authenticate DesfireSetKeyNoClear(ctx, 2, T_AES, site_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_GALLAGHER, NULL, 0); int res = select_aid_and_authenticate(ctx, aid, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed selecting/authenticating to AID %06X", aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed selecting/authenticating to AID %06X", aid); // Read file 0 (contains credentials) uint8_t buf[16] = {0}; size_t read_len = 0; DesfireSetCommMode(ctx, DCMEncrypted); res = DesfireReadFile(ctx, 0, 0, 16, buf, &read_len); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed reading file 0 in AID %06X", aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed reading file 0 in AID %06X", aid); // Check file contained 16 bytes of data if (read_len != 16) - HFGAL_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected " + PM3_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected " "16 bytes but received %d bytes", aid, read_len); // Check second half of file is the bitwise inverse of the first half for (uint8_t i = 8; i < 16; i++) buf[i] ^= 0xFF; if (memcmp(buf, &buf[8], 8) != 0) - HFGAL_RET_ERR(PM3_EFAILED, "Invalid cardholder data in file 0 in " + PM3_RET_ERR(PM3_EFAILED, "Invalid cardholder data in file 0 in " "AID %06X. Received %s", sprint_hex_inrow(buf, 16)); gallagher_decode_creds(buf, creds); @@ -282,11 +282,11 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint32_t aid, bool verbose) { // Select application & authenticate int res = select_aid_and_authenticate(ctx, 0x000000, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // UID is required for key diversification if (ctx->uidlen == 0) - HFGAL_RET_ERR(PM3_EINVARG, "UID is required for key diversification. " + PM3_RET_ERR(PM3_EINVARG, "UID is required for key diversification. " "Please fetch it before calling `hfgal_create_creds_app`"); // Create application @@ -302,7 +302,7 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint DesfireSetCommMode(ctx, DCMMACed); res = DesfireCreateApplication(ctx, data, ARRAYLEN(data)); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating application %06X. " + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating application %06X. " "Does it already exist?", aid); if (verbose) @@ -311,14 +311,14 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint // Select the new application res = select_aid(ctx, aid, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed selecting application %06X", aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed selecting application %06X", aid); // Add key 2, then key 0 (we must authenticate with key 0 in order to make changes) for (int i = 2; i >= 0; i -= 2) { // Diversify key uint8_t buf[CRYPTO_AES128_KEY_SIZE] = {0}; res = hfgal_diversify_key(site_key, ctx->uid, ctx->uidlen, i, aid, buf); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key %d for AID %06X", i, aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key %d for AID %06X", i, aid); PrintAndLogEx(INFO, "Diversified key %d for AID %06X: " _GREEN_("%s"), i, aid, sprint_hex_inrow(buf, ARRAYLEN(buf))); @@ -328,13 +328,13 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint DesfireSetKeyNoClear(ctx, 0, T_AES, blank_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_NONE, NULL, 0); res = authenticate(ctx, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Desfire authenticate error. Result: " + PM3_RET_IF_ERR_WITH_MSG(res, "Desfire authenticate error. Result: " "[%d] %s", res, DesfireAuthErrorToStr(res)); // Change key DesfireSetCommMode(ctx, DCMEncryptedPlain); res = DesfireChangeKey(ctx, false, i, app_algo, 1, buf, app_algo, blank_key, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed setting key %d for AID %06X", i, aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed setting key %d for AID %06X", i, aid); if (verbose) PrintAndLogEx(INFO, "Successfully set key %d for AID %06X", i, aid); @@ -357,7 +357,7 @@ static int hfgal_create_creds_file(DesfireContext_t *ctx, uint8_t *site_key, uin DesfireSetKeyNoClear(ctx, 0, T_AES, site_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_GALLAGHER, NULL, 0); int res = select_aid_and_authenticate(ctx, aid, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Prepare create file command uint8_t file_type = 0; // standard data file @@ -375,7 +375,7 @@ static int hfgal_create_creds_file(DesfireContext_t *ctx, uint8_t *site_key, uin // Create file res = DesfireCreateFile(ctx, file_type, data, ARRAYLEN(data), false); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating file 0 in AID %06X", aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating file 0 in AID %06X", aid); if (verbose) PrintAndLogEx(INFO, "Created file 0 in AID %06X (currently has empty contents)", aid); @@ -389,7 +389,7 @@ static int hfgal_create_creds_file(DesfireContext_t *ctx, uint8_t *site_key, uin // Write file DesfireSetCommMode(ctx, DCMEncrypted); res = DesfireWriteFile(ctx, file_id, 0, ARRAYLEN(contents), contents); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file 0 in AID %06X"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file 0 in AID %06X"); PrintAndLogEx(INFO, "Successfully wrote cardholder credentials to " "file 0 in AID %06X", aid); @@ -413,7 +413,7 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, // Get card AIDs from Card Application Directory (which contains 1 to 3 files) int res = select_aid(ctx, CAD_AID, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed selecting Card Application " + PM3_RET_IF_ERR_WITH_MSG(res, "Failed selecting Card Application " "Directory, does AID %06X exist?", CAD_AID); // Read up to 3 files with 6x 6-byte entries each @@ -421,7 +421,7 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, size_t read_len; res = DesfireReadFile(ctx, i, 0, 36, &dest_buf[i * 36], &read_len); if (res != PM3_SUCCESS && res != PM3_EAPDU_FAIL) - HFGAL_RET_ERR(res, "Failed reading file %d in Card Application " + PM3_RET_ERR(res, "Failed reading file %d in Card Application " "Directory (AID %06X)", i, CAD_AID); // end if the last entry is NULL @@ -458,12 +458,12 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbose) { // Check that card UID has been set if (ctx->uidlen == 0) - HFGAL_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext " + PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext " "(required for key diversification)"); // Select application & authenticate int res = select_aid_and_authenticate(ctx, 0x000000, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Create application DesfireCryptoAlgorithm app_algo = T_AES; @@ -478,7 +478,7 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo DesfireSetCommMode(ctx, DCMMACed); res = DesfireCreateApplication(ctx, data, ARRAYLEN(data)); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Card Application Directory. " + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Card Application Directory. " "Does it already exist?", CAD_AID); if (verbose) @@ -490,12 +490,12 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo DesfireSetKeyNoClear(ctx, 0, T_AES, blank_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_NONE, NULL, 0); res = select_aid_and_authenticate(ctx, CAD_AID, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Diversify key uint8_t buf[CRYPTO_AES128_KEY_SIZE] = {0}; res = hfgal_diversify_key(site_key, ctx->uid, ctx->uidlen, 0, CAD_AID, buf); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key 0 for AID %06X", CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key 0 for AID %06X", CAD_AID); PrintAndLogEx(INFO, "Diversified key 0 for CAD (AID %06X): " _GREEN_("%s"), CAD_AID, sprint_hex_inrow(buf, ARRAYLEN(buf))); @@ -503,7 +503,7 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo // Change key DesfireSetCommMode(ctx, DCMEncryptedPlain); res = DesfireChangeKey(ctx, false, 0, app_algo, 1, buf, app_algo, blank_key, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed setting key 0 for CAD"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed setting key 0 for CAD"); if (verbose) PrintAndLogEx(INFO, "Successfully set key 0 for CAD"); @@ -530,18 +530,18 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 PrintAndLogEx(INFO, "Card Application Directory exists, reading entries..."); int res = hfgal_read_cad(ctx, cad, ARRAYLEN(cad), &num_entries, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Check that there is space for the new entry if (num_entries >= 18) - HFGAL_RET_ERR(PM3_EFATAL, "Card application directory is full"); + PM3_RET_ERR(PM3_EFATAL, "Card application directory is full"); } else { // CAD doesn't exist, we need to create it if (verbose) PrintAndLogEx(INFO, "Card Application Directory does not exist, creating it now..."); int res = hfgal_create_cad(ctx, site_key, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); } uint8_t file_id = num_entries / 6; // 6 entries per file @@ -550,7 +550,7 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 // Check if facility already exists in CAD. for (uint8_t i = 0; i < ARRAYLEN(cad); i += 6) { if (cad_facility_match(&cad[i], creds->region_code, creds->facility_code)) - HFGAL_RET_ERR(PM3_EFATAL, "Facility already exists in CAD, delete or " + PM3_RET_ERR(PM3_EFATAL, "Facility already exists in CAD, delete or " "update AID %06X instead", cad_aid_byte_to_uint(&cad[i + 3])); } @@ -569,7 +569,7 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 DesfireSetKeyNoClear(ctx, 0, T_AES, site_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_GALLAGHER, NULL, 0); int res = select_aid_and_authenticate(ctx, CAD_AID, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Create file if necessary if (entry_num == 0) { @@ -591,7 +591,7 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 // Create file res = DesfireCreateFile(ctx, file_type, data, ARRAYLEN(data), false); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating file %d in CAD " + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating file %d in CAD " "(AID %06X)", file_id, CAD_AID); if (verbose) @@ -603,7 +603,7 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 } else // Write file res = DesfireWriteFile(ctx, file_id, entry_num * 6, 6, entry); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD " + PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD " "(AID %06X)", file_id, CAD_AID); PrintAndLogEx(INFO, "Successfully added new entry for %06X to the Card " @@ -624,7 +624,7 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, uint8_t num_entries = 0; int res = hfgal_read_cad(ctx, cad, ARRAYLEN(cad), &num_entries, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Check if facility already exists in CAD uint8_t entry_idx; @@ -633,7 +633,7 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, break; } if (entry_idx >= num_entries) - HFGAL_RET_ERR(PM3_EINVARG, "Specified facility or AID does not exist " + PM3_RET_ERR(PM3_EINVARG, "Specified facility or AID does not exist " "in the Card Application Directory"); // Remove entry (shift all entries left, then clear the last entry) @@ -648,7 +648,7 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, DesfireSetKeyNoClear(ctx, 0, T_AES, site_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_GALLAGHER, NULL, 0); res = select_aid_and_authenticate(ctx, CAD_AID, verbose); - HFGAL_RET_IF_ERR(res); + PM3_RET_IF_ERR(res); // Determine what files we need to update uint8_t file_id_start = entry_idx / 6; @@ -658,7 +658,7 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, for (uint8_t file_id = file_id_start; file_id <= file_id_stop - delete_last_file; file_id++) { // Write file res = DesfireWriteFile(ctx, file_id, 0, 36, &cad[file_id * 36]); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD " + PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD " "(AID %06X)", file_id, CAD_AID); if (verbose) @@ -671,7 +671,7 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, DesfireSetCommMode(ctx, DCMMACed); res = DesfireDeleteFile(ctx, file_id); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed deleting file %d from CAD (AID %06X)", file_id, CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed deleting file %d from CAD (AID %06X)", file_id, CAD_AID); if (verbose) PrintAndLogEx(INFO, "Deleted unnecessary file %d from CAD (AID %06X)", file_id, CAD_AID); @@ -699,7 +699,7 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q // Get card UID (for key diversification) int res = DesfireGetCardUID(&dctx); - HFGAL_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed retrieving card UID"); + PM3_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed retrieving card UID"); // Find AIDs to process (from CLI args or the Card Application Directory) uint8_t cad[36 * 3] = {0}; @@ -709,7 +709,7 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q num_entries = 1; } else { res = hfgal_read_cad(&dctx, cad, ARRAYLEN(cad), &num_entries, verbose); - HFGAL_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading Card Application Directory"); + PM3_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading Card Application Directory"); } // Loop through each application in the CAD @@ -729,7 +729,7 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q // Read & decode credentials GallagherCredentials_t creds = {0}; res = hfgal_read_creds_app(&dctx, current_aid, site_key, &creds, verbose); - HFGAL_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading card application credentials"); + PM3_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading card application credentials"); PrintAndLogEx(SUCCESS, "GALLAGHER (AID %06X) - Region: " _GREEN_("%u") ", Facility: " _GREEN_("%u") ", Card No.: " _GREEN_("%u") ", Issue Level: " _GREEN_("%u"), current_aid, @@ -764,7 +764,7 @@ static int CmdGallagherReader(const char *cmd) { uint8_t aid_buf[3] = {0}; CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); if (aid_len > 0 && aid_len != 3) - HFGAL_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); reverse_aid(aid_buf); // PM3 displays AIDs backwards uint32_t aid = DesfireAIDByteToUint(aid_buf); @@ -774,7 +774,7 @@ static int CmdGallagherReader(const char *cmd) { memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 2, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) - HFGAL_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); bool continuous_mode = arg_get_lit(ctx, 3); SetAPDULogging(arg_get_lit(ctx, 4)); @@ -827,7 +827,7 @@ static int CmdGallagherClone(const char *cmd) { uint8_t key[DESFIRE_MAX_KEY_SIZE] = {0}; CLIGetHexWithReturn(ctx, 3, key, &key_len); if (key_len && key_len != desfire_get_key_length(key_algo)) - HFGAL_RET_ERR(PM3_EINVARG, "%s key must have %d bytes length instead of %d", CLIGetOptionListStr(DesfireAlgoOpts, key_algo), desfire_get_key_length(key_algo), key_len); + PM3_RET_ERR(PM3_EINVARG, "%s key must have %d bytes length instead of %d", CLIGetOptionListStr(DesfireAlgoOpts, key_algo), desfire_get_key_length(key_algo), key_len); if (key_len == 0) // Default to a key of all zeros key_len = desfire_get_key_length(key_algo); @@ -843,14 +843,14 @@ static int CmdGallagherClone(const char *cmd) { CLIGetHexWithReturn(ctx, 8, aid_buf, &aid_len); if (aid_len > 0) { if (aid_len != 3) - HFGAL_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range if (memcmp(aid_buf, "\xF4\x81", 2) != 0 || aid_buf[2] < 0x20 || aid_buf[2] > 0x2B) // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - HFGAL_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); } int site_key_len = 0; @@ -858,7 +858,7 @@ static int CmdGallagherClone(const char *cmd) { memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 9, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) - HFGAL_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); SetAPDULogging(arg_get_lit(ctx, 10)); bool verbose = arg_get_lit(ctx, 11); @@ -881,31 +881,31 @@ static int CmdGallagherClone(const char *cmd) { // Get card UID (for key diversification) int res = DesfireGetCardUID(&dctx); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed retrieving card UID"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed retrieving card UID"); // Find available Gallagher AID if the user did not specify one if (aid_len == 0) { aid = find_available_gallagher_aid(&dctx, verbose); if (aid == 0) - HFGAL_RET_ERR(PM3_EFATAL, "Could not find an available AID, card is full"); + PM3_RET_ERR(PM3_EFATAL, "Could not find an available AID, card is full"); } // Update Card Application Directory DesfireSetKeyNoClear(&dctx, key_num, key_algo, key); DesfireSetKdf(&dctx, MFDES_KDF_ALGO_NONE, NULL, 0); res = hfgal_add_aid_to_cad(&dctx, site_key, aid, &creds, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed updating Gallagher Card Application Directory"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed updating Gallagher Card Application Directory"); // Create application DesfireSetKeyNoClear(&dctx, key_num, key_algo, key); DesfireSetKdf(&dctx, MFDES_KDF_ALGO_NONE, NULL, 0); res = hfgal_create_creds_app(&dctx, site_key, aid, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher application"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher application"); // Create credential files // Don't need to set keys here, they're generated automatically res = hfgal_create_creds_file(&dctx, site_key, aid, &creds, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher credential file"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher credential file"); PrintAndLogEx(SUCCESS, "Done"); PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf gallagher reader`") " to verify"); @@ -936,21 +936,21 @@ static int CmdGallagherDelete(const char *cmd) { CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); if (aid_len != 3) - HFGAL_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range if (memcmp(aid_buf, "\xF4\x81", 2) != 0 || aid_buf[2] < 0x20 || aid_buf[2] > 0x2B) // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - HFGAL_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); int site_key_len = 0; uint8_t site_key[16] = {0}; memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 2, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) - HFGAL_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); SetAPDULogging(arg_get_lit(ctx, 3)); bool verbose = arg_get_lit(ctx, 4); @@ -963,15 +963,15 @@ static int CmdGallagherDelete(const char *cmd) { // Get card UID (for key diversification) int res = DesfireGetCardUID(&dctx); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed retrieving card UID"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed retrieving card UID"); // Update Card Application Directory res = hfgal_remove_aid_from_cad(&dctx, site_key, aid, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed removing %06X from the Card Application Directory"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed removing %06X from the Card Application Directory"); // Delete application res = hfgal_delete_app(&dctx, site_key, aid, verbose); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed deleting Gallagher application"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed deleting Gallagher application"); PrintAndLogEx(SUCCESS, "Done"); PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf gallagher reader`") " to verify"); @@ -1003,14 +1003,14 @@ static int CmdGallagherDiversify(const char *cmd) { CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); if (aid_len != 3) - HFGAL_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range if (memcmp(aid_buf, "\xF4\x81", 2) != 0 || aid_buf[2] < 0x20 || aid_buf[2] > 0x2B) // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - HFGAL_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); int key_num = arg_get_int_def(ctx, 2, 0); @@ -1018,14 +1018,14 @@ static int CmdGallagherDiversify(const char *cmd) { uint8_t uid[7] = {0}; CLIGetHexWithReturn(ctx, 3, uid, &uid_len); if (uid_len > 0 && uid_len != 4 && uid_len != 7) - HFGAL_RET_ERR(PM3_EINVARG, "--uid must be 4 or 7 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--uid must be 4 or 7 bytes"); int site_key_len = 0; uint8_t site_key[16] = {0}; memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 4, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) - HFGAL_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); SetAPDULogging(arg_get_lit(ctx, 5)); CLIParserFree(ctx); @@ -1038,7 +1038,7 @@ static int CmdGallagherDiversify(const char *cmd) { // Get card UID (for key diversification) int res = DesfireGetCardUID(&dctx); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed retrieving card UID"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed retrieving card UID"); uid_len = dctx.uidlen; memcpy(uid, dctx.uid, uid_len); @@ -1047,7 +1047,7 @@ static int CmdGallagherDiversify(const char *cmd) { // Diversify key uint8_t key[CRYPTO_AES128_KEY_SIZE] = {0}; int res = hfgal_diversify_key(site_key, uid, uid_len, key_num, aid, key); - HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key"); char *key_str = sprint_hex_inrow(key, ARRAYLEN(key)); PrintAndLogEx(SUCCESS, "Successfully diversified key: " _GREEN_("%s"), key_str); diff --git a/client/src/cmdhfgallagher.h b/client/src/cmdhfgallagher.h index 867c14c2f..8601e7f15 100644 --- a/client/src/cmdhfgallagher.h +++ b/client/src/cmdhfgallagher.h @@ -40,12 +40,4 @@ int CmdHFGallagher(const char *cmd); int hfgal_diversify_key(uint8_t *site_key, uint8_t *uid, uint8_t uid_len, uint8_t key_num, uint32_t aid, uint8_t *key_output); -// Return error -#define HFGAL_RET_ERR(err, ...) { PrintAndLogEx(ERR, __VA_ARGS__); return err; } - -// HF GALlagher RETurn IF ERRor -#define HFGAL_RET_IF_ERR(res) if (res != PM3_SUCCESS) { return res; } -#define HFGAL_RET_IF_ERR_WITH_MSG(res, ...) if (res != PM3_SUCCESS) { PrintAndLogEx(ERR, __VA_ARGS__); return res; } -#define HFGAL_RET_IF_ERR_MAYBE_MSG(res, verbose, ...) if (res != PM3_SUCCESS) { if (verbose) PrintAndLogEx(ERR, __VA_ARGS__); return res; } - #endif diff --git a/client/src/util.h b/client/src/util.h index b760d2278..34a67ef10 100644 --- a/client/src/util.h +++ b/client/src/util.h @@ -38,6 +38,14 @@ extern bool g_pendingPrompt; #define PRINTANDLOG_PRINT 1 #define PRINTANDLOG_LOG 2 +// Return error +#define PM3_RET_ERR(err, ...) { PrintAndLogEx(ERR, __VA_ARGS__); return err; } + +// RETurn IF ERRor +#define PM3_RET_IF_ERR(res) if (res != PM3_SUCCESS) { return res; } +#define PM3_RET_IF_ERR_WITH_MSG(res, ...) if (res != PM3_SUCCESS) { PrintAndLogEx(ERR, __VA_ARGS__); return res; } +#define PM3_RET_IF_ERR_MAYBE_MSG(res, verbose, ...) if (res != PM3_SUCCESS) { if (verbose) PrintAndLogEx(ERR, __VA_ARGS__); return res; } + int kbd_enter_pressed(void); void FillFileNameByUID(char *filenamePrefix, const uint8_t *uid, const char *ext, const int uidlen); // fill buffer from structure [{uint8_t data, size_t length},...] From 291a4a4aa2ebdd1724accb54a0c5905278e7512f Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 12:15:24 +0100 Subject: [PATCH 20/73] silent clang warning on increasing required alignment --- client/src/fileutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/fileutils.c b/client/src/fileutils.c index e061cbf53..b92c9991a 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -354,7 +354,7 @@ int saveFileJSONex(const char *preferredName, JSONFileType ftype, uint8_t *data, break; } case jsfCardMemory: { - iso14a_mf_extdump_t *xdump = (iso14a_mf_extdump_t *) data; + iso14a_mf_extdump_t *xdump = (iso14a_mf_extdump_t *)(void *) data; JsonSaveStr(root, "FileType", "mfcard"); JsonSaveBufAsHexCompact(root, "$.Card.UID", xdump->card_info.uid, xdump->card_info.uidlen); JsonSaveBufAsHexCompact(root, "$.Card.ATQA", xdump->card_info.atqa, 2); From 8cd19d7c8786a790f4c55887acd0f63d7d484961 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 13:01:10 +0100 Subject: [PATCH 21/73] textual / style --- client/src/cmdhfgallagher.c | 427 ++++++++++++++++++++++-------------- 1 file changed, 259 insertions(+), 168 deletions(-) diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index c9b078146..ec89e75c7 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -30,10 +30,12 @@ #include "cliparser.h" #include "ui.h" -/** Application ID for the Gallagher Card Application Directory */ +static int CmdHelp(const char *cmd); + +// Application ID for the Gallagher Card Application Directory static const uint32_t CAD_AID = 0x2F81F4; -/** Default MIFARE Site Key */ +// Default MIFARE site key (16 bytes) static const uint8_t DEFAULT_SITE_KEY[] = { 0x31, 0x12, 0xB7, 0x38, 0xD8, 0x86, 0x2C, 0xCD, 0x34, 0x30, 0x2E, 0xB2, 0x99, 0xAA, 0xB4, 0x56, @@ -59,9 +61,8 @@ int hfgal_diversify_key(uint8_t *site_key, uint8_t *uid, uint8_t uid_len, PM3_RET_IF_ERR_WITH_MSG(res, "Failed generating Gallagher key diversification input"); if (site_key == NULL) { - PrintAndLogEx(INFO, "hfgal_diversify_key is using default site key: %s", - sprint_hex_inrow(DEFAULT_SITE_KEY, ARRAYLEN(DEFAULT_SITE_KEY))); - site_key = (uint8_t *) &DEFAULT_SITE_KEY; + PrintAndLogEx(INFO, "hfgal_diversify_key is using default site key"); + memcpy(site_key, DEFAULT_SITE_KEY, sizeof(DEFAULT_SITE_KEY)); } // Make temporary DesfireContext @@ -79,6 +80,7 @@ int hfgal_diversify_key(uint8_t *site_key, uint8_t *uid, uint8_t uid_len, * @brief Reverses the bytes in AID. Used when parsing CLI args * (because Proxmark displays AIDs in reverse byte order). */ +// iceman todo: use commonutil.c fct static void reverse_aid(uint8_t *aid) { uint8_t tmp = aid[0]; aid[0] = aid[2]; @@ -89,6 +91,8 @@ static void reverse_aid(uint8_t *aid) { * @brief Converts a Card Application Directory format application ID to an integer. * Note: the CAD stores AIDs in reverse order, so this is different to DesfireAIDByteToUint(). */ + +// iceman todo: use commonutil.c fct static uint32_t cad_aid_byte_to_uint(const uint8_t *data) { return data[2] + (data[1] << 8) + (data[0] << 16); } @@ -97,6 +101,7 @@ static uint32_t cad_aid_byte_to_uint(const uint8_t *data) { * @brief Converts an integer application ID to Card Application Directory format. * Note: the CAD stores AIDs in reverse order, so this is different to DesfireAIDUintToByte(). */ +// iceman todo: use commonutil.c fct static void cad_aid_uint_to_byte(uint32_t aid, uint8_t *data) { data[2] = aid & 0xff; data[1] = (aid >> 8) & 0xff; @@ -108,7 +113,8 @@ static void cad_aid_uint_to_byte(uint32_t aid, uint8_t *data) { * is for the specified region & facility, false otherwise. */ static bool cad_facility_match(const uint8_t *entry, uint8_t region_code, uint16_t facility_code) { - return entry[0] == region_code && (entry[1] << 8) + entry[2] == facility_code; + return (entry[0] == region_code) && + ((entry[1] << 8) + entry[2] == facility_code); } /** @@ -142,16 +148,20 @@ static int authenticate(DesfireContext_t *ctx, bool verbose) { int res = DesfireAuthenticate(ctx, DACEV1, false); if (res != PM3_SUCCESS) { - PrintAndLogEx(ERR, "Desfire authenticate " _RED_("error") - ". Result: [%d] %s", res, DesfireAuthErrorToStr(res)); + PrintAndLogEx(ERR, "Desfire authenticate " _RED_("error") ". Result: [%d] %s", + res, + DesfireAuthErrorToStr(res) + ); return res; } if (DesfireIsAuthenticated(ctx)) { - if (verbose) - PrintAndLogEx(INFO, "Authenticated to AID %06X", ctx->selectedAID); - } else + if (verbose) { + PrintAndLogEx(INFO, "Authenticated to AID " _YELLOW_("%06X"), ctx->selectedAID); + } + } else { return 201; + } return PM3_SUCCESS; } @@ -179,15 +189,18 @@ static bool aid_exists(DesfireContext_t *ctx, uint32_t aid, bool verbose) { DesfireSetCommandSet(ctx, DCCNativeISO); int res = DesfireSelectAIDHex(ctx, aid, false, 0); - if (res != PM3_SUCCESS && res != PM3_EAPDU_FAIL) - PM3_RET_ERR(false, "Select failed with error %d, assuming AID %06X " - "does not exist", res, aid); + if (res != PM3_SUCCESS && res != PM3_EAPDU_FAIL) { + PM3_RET_ERR(false, "Select failed with error %d, assuming AID %06X does not exist", res, aid); + } - if (verbose) - PrintAndLogEx(INFO, "AID %06X %s", aid, - res == PM3_SUCCESS ? "exists" : "does not exist"); + if (verbose) { + PrintAndLogEx(INFO, "AID %06X %s", + aid, + res == PM3_SUCCESS ? "exists" : "does not exist" + ); + } - return res == PM3_SUCCESS; + return (res == PM3_SUCCESS); } /** @@ -197,8 +210,9 @@ static bool aid_exists(DesfireContext_t *ctx, uint32_t aid, bool verbose) { static uint32_t find_available_gallagher_aid(DesfireContext_t *ctx, bool verbose) { for (uint8_t i = 0x0; i <= 0xB; i++) { uint32_t aid = 0x2081F4 | (i << 16); - if (!aid_exists(ctx, aid, verbose)) + if (aid_exists(ctx, aid, verbose) == false) { return aid; + } } return 0; } @@ -222,7 +236,7 @@ static int hfgal_delete_app(DesfireContext_t *ctx, uint8_t *site_key, res = DesfireDeleteApplication(ctx, aid); PM3_RET_IF_ERR_WITH_MSG(res, "Failed deleting AID %06X", aid); - PrintAndLogEx(INFO, "Successfully deleted AID %06X", aid); + PrintAndLogEx(INFO, "Successfully deleted AID " _YELLOW_("%06X"), aid); return PM3_SUCCESS; } @@ -236,9 +250,9 @@ static int hfgal_delete_app(DesfireContext_t *ctx, uint8_t *site_key, static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *site_key, GallagherCredentials_t *creds, bool verbose) { // Check that card UID has been set - if (ctx->uidlen == 0) - PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext " - "(required for key diversification)"); + if (ctx->uidlen == 0) { + PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext (required for key diversification)"); + } // Select application & authenticate DesfireSetKeyNoClear(ctx, 2, T_AES, site_key); @@ -254,16 +268,23 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si PM3_RET_IF_ERR_WITH_MSG(res, "Failed reading file 0 in AID %06X", aid); // Check file contained 16 bytes of data - if (read_len != 16) - PM3_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected " - "16 bytes but received %d bytes", aid, read_len); + if (read_len != 16) { + PM3_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected 16 bytes, got %d bytes", + aid, + read_len + ); + } // Check second half of file is the bitwise inverse of the first half - for (uint8_t i = 8; i < 16; i++) + for (uint8_t i = 8; i < 16; i++) { buf[i] ^= 0xFF; - if (memcmp(buf, &buf[8], 8) != 0) - PM3_RET_ERR(PM3_EFAILED, "Invalid cardholder data in file 0 in " - "AID %06X. Received %s", sprint_hex_inrow(buf, 16)); + } + + if (memcmp(buf, &buf[8], 8) != 0) { + PM3_RET_ERR(PM3_EFAILED, "Invalid cardholder data in file 0 in AID %06X. Received %s", + sprint_hex_inrow(buf, 16) + ); + } gallagher_decode_creds(buf, creds); @@ -293,7 +314,7 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint DesfireCryptoAlgorithm app_algo = T_AES; uint8_t num_keys = 3; uint8_t ks1 = 0x0B; - uint8_t ks2 = (DesfireKeyAlgoToType(app_algo) << 6) | num_keys;; + uint8_t ks2 = (DesfireKeyAlgoToType(app_algo) << 6) | num_keys; uint8_t data[5] = {0}; DesfireAIDUintToByte(aid, &data[0]); @@ -302,12 +323,11 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint DesfireSetCommMode(ctx, DCMMACed); res = DesfireCreateApplication(ctx, data, ARRAYLEN(data)); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating application %06X. " - "Does it already exist?", aid); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating application %06X. Does it already exist?", aid); - if (verbose) - PrintAndLogEx(INFO, "Created application %06X (currently has empty " - "contents & blank keys)", aid); + if (verbose) { + PrintAndLogEx(INFO, "Created application " _YELLOW_("%06X") " (empty contents & blank keys)", aid); + } // Select the new application res = select_aid(ctx, aid, verbose); @@ -321,26 +341,29 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint PM3_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key %d for AID %06X", i, aid); PrintAndLogEx(INFO, "Diversified key %d for AID %06X: " _GREEN_("%s"), - i, aid, sprint_hex_inrow(buf, ARRAYLEN(buf))); + i, + aid, + sprint_hex_inrow(buf, ARRAYLEN(buf)) + ); // Authenticate uint8_t blank_key[CRYPTO_AES128_KEY_SIZE] = {0}; DesfireSetKeyNoClear(ctx, 0, T_AES, blank_key); DesfireSetKdf(ctx, MFDES_KDF_ALGO_NONE, NULL, 0); res = authenticate(ctx, verbose); - PM3_RET_IF_ERR_WITH_MSG(res, "Desfire authenticate error. Result: " - "[%d] %s", res, DesfireAuthErrorToStr(res)); + PM3_RET_IF_ERR_WITH_MSG(res, "Desfire authenticate error. Result: [%d] %s", res, DesfireAuthErrorToStr(res)); // Change key DesfireSetCommMode(ctx, DCMEncryptedPlain); res = DesfireChangeKey(ctx, false, i, app_algo, 1, buf, app_algo, blank_key, verbose); PM3_RET_IF_ERR_WITH_MSG(res, "Failed setting key %d for AID %06X", i, aid); - if (verbose) - PrintAndLogEx(INFO, "Successfully set key %d for AID %06X", i, aid); + if (verbose) { + PrintAndLogEx(INFO, "Successfully set key " _YELLOW_("%d") " for AID " _YELLOW_("%06X"), i, aid); + } } - PrintAndLogEx(INFO, "Successfully created credentials application %06X", aid); + PrintAndLogEx(INFO, "Successfully created credentials application " _YELLOW_("%06X"), aid); return PM3_SUCCESS; } @@ -377,22 +400,23 @@ static int hfgal_create_creds_file(DesfireContext_t *ctx, uint8_t *site_key, uin res = DesfireCreateFile(ctx, file_type, data, ARRAYLEN(data), false); PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating file 0 in AID %06X", aid); - if (verbose) - PrintAndLogEx(INFO, "Created file 0 in AID %06X (currently has empty contents)", aid); + if (verbose) { + PrintAndLogEx(INFO, "Created file 0 in AID " _YELLOW_("%06X") " (empty contents)", aid); + } // Create file contents (2nd half is the bitwise inverse of the encoded creds) uint8_t contents[16] = {0}; gallagher_encode_creds(contents, creds); - for (int i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { contents[i + 8] = contents[i] ^ 0xFF; + } // Write file DesfireSetCommMode(ctx, DCMEncrypted); res = DesfireWriteFile(ctx, file_id, 0, ARRAYLEN(contents), contents); PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file 0 in AID %06X"); - PrintAndLogEx(INFO, "Successfully wrote cardholder credentials to " - "file 0 in AID %06X", aid); + PrintAndLogEx(INFO, "Successfully wrote cardholder credentials to file " _YELLOW_("0") " in AID " _YELLOW_("%06X"), aid); return PM3_SUCCESS; } @@ -406,32 +430,37 @@ static int hfgal_create_creds_file(DesfireContext_t *ctx, uint8_t *site_key, uin static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, uint8_t dest_buf_len, uint8_t *num_entries_out, bool verbose) { if (dest_buf_len < 3 * 36) { - PrintAndLogEx(ERR, "hfgal_read_cad destination buffer is incorrectly sized. " - "Received length %d, must be at least %d", dest_buf_len, 3 * 36); + PrintAndLogEx(ERR, "hfgal_read_cad destination buffer is incorrectly sized. Received len %d, must be at least %d", + dest_buf_len, + 3 * 36 + ); return PM3_EINVARG; } // Get card AIDs from Card Application Directory (which contains 1 to 3 files) int res = select_aid(ctx, CAD_AID, verbose); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed selecting Card Application " - "Directory, does AID %06X exist?", CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed selecting Card Application Directory, does AID %06X exist?", CAD_AID); // Read up to 3 files with 6x 6-byte entries each for (uint8_t i = 0; i < 3; i++) { size_t read_len; res = DesfireReadFile(ctx, i, 0, 36, &dest_buf[i * 36], &read_len); - if (res != PM3_SUCCESS && res != PM3_EAPDU_FAIL) - PM3_RET_ERR(res, "Failed reading file %d in Card Application " - "Directory (AID %06X)", i, CAD_AID); + if (res != PM3_SUCCESS && res != PM3_EAPDU_FAIL) { + PM3_RET_ERR(res, "Failed reading file %d in Card Application Directory (AID %06X)", i, CAD_AID); + } // end if the last entry is NULL - if (memcmp(&dest_buf[36 * i + 30], "\0\0\0\0\0\0", 6) == 0) break; + if (memcmp(&dest_buf[36 * i + 30], "\0\0\0\0\0\0", 6) == 0) { + break; + } } // Count number of entries (i.e. count until we hit a NULL entry) uint8_t num_entries = 0; for (uint8_t i = 0; i < dest_buf_len; i += 6) { - if (memcmp(&dest_buf[i], "\0\0\0\0\0\0", 6) == 0) break; + if (memcmp(&dest_buf[i], "\0\0\0\0\0\0", 6) == 0) { + break; + } num_entries++; } *num_entries_out = num_entries; @@ -440,10 +469,14 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, PrintAndLogEx(WARNING, "Card Application Directory is empty"); } else if (verbose) { // Print what we found + // iceman maybe on seperate lines for easier reading. PrintAndLogEx(SUCCESS, "Card Application Directory contains:" NOLF); - for (int i = 0; i < num_entries; i++) - PrintAndLogEx(NORMAL, "%s %06X" NOLF, (i == 0) ? "" : ",", - cad_aid_byte_to_uint(&dest_buf[i * 6 + 3])); + for (int i = 0; i < num_entries; i++) { + PrintAndLogEx(NORMAL, "%s %06X" NOLF, + (i == 0) ? "" : ",", + cad_aid_byte_to_uint(&dest_buf[i * 6 + 3]) + ); + } PrintAndLogEx(NORMAL, ""); } @@ -458,8 +491,7 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbose) { // Check that card UID has been set if (ctx->uidlen == 0) - PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext " - "(required for key diversification)"); + PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext (required for key div)"); // Select application & authenticate int res = select_aid_and_authenticate(ctx, 0x000000, verbose); @@ -478,12 +510,13 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo DesfireSetCommMode(ctx, DCMMACed); res = DesfireCreateApplication(ctx, data, ARRAYLEN(data)); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Card Application Directory. " - "Does it already exist?", CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Card Application Directory. Does it already exist?", CAD_AID); - if (verbose) - PrintAndLogEx(INFO, "Created Card Application Directory (AID %06X, " - "currently has empty contents & blank keys)", CAD_AID); + if (verbose) { + PrintAndLogEx(INFO, "Created Card Application Directory (AID " _YELLOW_("%06X") ", empty contents & blank keys)", + CAD_AID + ); + } // Select application & authenticate uint8_t blank_key[DESFIRE_MAX_KEY_SIZE] = {0}; @@ -497,8 +530,10 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo res = hfgal_diversify_key(site_key, ctx->uid, ctx->uidlen, 0, CAD_AID, buf); PM3_RET_IF_ERR_WITH_MSG(res, "Failed diversifying key 0 for AID %06X", CAD_AID); - PrintAndLogEx(INFO, "Diversified key 0 for CAD (AID %06X): " _GREEN_("%s"), - CAD_AID, sprint_hex_inrow(buf, ARRAYLEN(buf))); + PrintAndLogEx(INFO, "Diversified key " _YELLOW_("0") " for CAD (AID " _YELLOW_("%06X") "): " _GREEN_("%s"), + CAD_AID, + sprint_hex_inrow(buf, ARRAYLEN(buf)) + ); // Change key DesfireSetCommMode(ctx, DCMEncryptedPlain); @@ -506,10 +541,9 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo PM3_RET_IF_ERR_WITH_MSG(res, "Failed setting key 0 for CAD"); if (verbose) - PrintAndLogEx(INFO, "Successfully set key 0 for CAD"); + PrintAndLogEx(INFO, "Successfully set key " _YELLOW_("0") " for CAD"); - PrintAndLogEx(INFO, "Successfully created Card Application Directory " - "(AID %06X)", CAD_AID); + PrintAndLogEx(INFO, "Successfully created Card Application Directory (AID " _YELLOW_("%06X") ")", CAD_AID); return PM3_SUCCESS; } @@ -526,32 +560,38 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 uint8_t cad[36 * 3] = {0}; uint8_t num_entries = 0; if (aid_exists(ctx, CAD_AID, false)) { - if (verbose) + if (verbose) { PrintAndLogEx(INFO, "Card Application Directory exists, reading entries..."); + } int res = hfgal_read_cad(ctx, cad, ARRAYLEN(cad), &num_entries, verbose); PM3_RET_IF_ERR(res); // Check that there is space for the new entry - if (num_entries >= 18) + if (num_entries >= 18) { PM3_RET_ERR(PM3_EFATAL, "Card application directory is full"); + } + } else { // CAD doesn't exist, we need to create it - if (verbose) + if (verbose) { PrintAndLogEx(INFO, "Card Application Directory does not exist, creating it now..."); + } int res = hfgal_create_cad(ctx, site_key, verbose); PM3_RET_IF_ERR(res); } - uint8_t file_id = num_entries / 6; // 6 entries per file + // 6 entries per file + uint8_t file_id = num_entries / 6; uint8_t entry_num = num_entries % 6; // Check if facility already exists in CAD. for (uint8_t i = 0; i < ARRAYLEN(cad); i += 6) { if (cad_facility_match(&cad[i], creds->region_code, creds->facility_code)) - PM3_RET_ERR(PM3_EFATAL, "Facility already exists in CAD, delete or " - "update AID %06X instead", cad_aid_byte_to_uint(&cad[i + 3])); + PM3_RET_ERR(PM3_EFATAL, "Facility already exists in CAD, delete or update AID %06X", + cad_aid_byte_to_uint(&cad[i + 3]) + ); } // Create entry @@ -561,9 +601,13 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 entry[2] = creds->facility_code & 0xFF; cad_aid_uint_to_byte(aid, &entry[3]); - if (verbose) - PrintAndLogEx(INFO, "Adding entry to CAD (position %d in file %d): %s", - entry_num, file_id, sprint_hex_inrow(entry, 6)); + if (verbose) { + PrintAndLogEx(INFO, "Adding entry to CAD (position " _YELLOW_("%d") " in file " _YELLOW_("%d") "): %s", + entry_num, + file_id, + sprint_hex_inrow(entry, 6) + ); + } // Select application & authenticate DesfireSetKeyNoClear(ctx, 0, T_AES, site_key); @@ -573,8 +617,9 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 // Create file if necessary if (entry_num == 0) { - if (verbose) + if (verbose) { PrintAndLogEx(INFO, "Creating new file in CAD"); + } // Prepare create file command uint8_t file_type = 0; // standard data file @@ -591,23 +636,19 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 // Create file res = DesfireCreateFile(ctx, file_type, data, ARRAYLEN(data), false); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating file %d in CAD " - "(AID %06X)", file_id, CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating file %d in CAD (AID %06X)", file_id, CAD_AID); if (verbose) - PrintAndLogEx(INFO, "Created file %d in CAD (currently has " - "empty contents)", file_id); + PrintAndLogEx(INFO, "Created file " _YELLOW_("%d") " in CAD (empty contents)", file_id); // Write file res = DesfireWriteFile(ctx, file_id, 0, 36, &cad[file_id * 36]); } else // Write file res = DesfireWriteFile(ctx, file_id, entry_num * 6, 6, entry); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD " - "(AID %06X)", file_id, CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD AID %06X)", file_id, CAD_AID); - PrintAndLogEx(INFO, "Successfully added new entry for %06X to the Card " - "Application Directory", aid); + PrintAndLogEx(INFO, "Successfully added new entry for " _YELLOW_("%06X") " to the Card Application Directory", aid); return PM3_SUCCESS; } @@ -629,12 +670,13 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, // Check if facility already exists in CAD uint8_t entry_idx; for (entry_idx = 0; entry_idx < num_entries; entry_idx++) { - if (aid > 0 && aid == cad_aid_byte_to_uint(&cad[entry_idx * 6 + 3])) + if (aid > 0 && aid == cad_aid_byte_to_uint(&cad[entry_idx * 6 + 3])) { break; + } + } + if (entry_idx >= num_entries) { + PM3_RET_ERR(PM3_EINVARG, "Specified facility or AID does not exist in the Card Application Directory"); } - if (entry_idx >= num_entries) - PM3_RET_ERR(PM3_EINVARG, "Specified facility or AID does not exist " - "in the Card Application Directory"); // Remove entry (shift all entries left, then clear the last entry) memmove( @@ -658,11 +700,11 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, for (uint8_t file_id = file_id_start; file_id <= file_id_stop - delete_last_file; file_id++) { // Write file res = DesfireWriteFile(ctx, file_id, 0, 36, &cad[file_id * 36]); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD " - "(AID %06X)", file_id, CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file %d in CAD (AID %06X)", file_id, CAD_AID); - if (verbose) - PrintAndLogEx(INFO, "Updated file %d in CAD", file_id); + if (verbose) { + PrintAndLogEx(INFO, "Updated file " _YELLOW_("%d") " in CAD", file_id); + } } // Delete empty file if necessary @@ -673,11 +715,15 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, res = DesfireDeleteFile(ctx, file_id); PM3_RET_IF_ERR_WITH_MSG(res, "Failed deleting file %d from CAD (AID %06X)", file_id, CAD_AID); - if (verbose) - PrintAndLogEx(INFO, "Deleted unnecessary file %d from CAD (AID %06X)", file_id, CAD_AID); + if (verbose) { + PrintAndLogEx(INFO, "Deleted unnecessary file " _YELLOW_("%d") " from CAD (AID " _YELLOW_("%06X")")", + file_id, + CAD_AID + ); + } } - PrintAndLogEx(INFO, "Successfully removed %06X from the Card Application Directory", aid); + PrintAndLogEx(INFO, "Successfully removed " _YELLOW_("%06X") " from the Card Application Directory", aid); return PM3_SUCCESS; } @@ -689,6 +735,7 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, * @param site_key MIFARE site key. * @param quiet Suppress error messages. Used when in continuous reader mode. */ +// iceman, verbose and quiet... one should be enough. static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool quiet) { DropField(); clearCommandBuffer(); @@ -719,11 +766,15 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q uint32_t current_aid = cad_aid_byte_to_uint(&cad[i + 3]); if (verbose) { - if (region_code > 0 || facility_code > 0) - PrintAndLogEx(INFO, "Reading AID: %06X, region: %u, facility: %u", - current_aid, region_code, facility_code); - else - PrintAndLogEx(INFO, "Reading AID: %06X", current_aid); + if (region_code > 0 || facility_code > 0) { + PrintAndLogEx(INFO, "Reading AID: " _YELLOW_("%06X") ", region: " _YELLOW_("%u") ", facility: " _YELLOW_("%u"), + current_aid, + region_code, + facility_code + ); + } else { + PrintAndLogEx(INFO, "Reading AID: " _YELLOW_("%06X"), current_aid); + } } // Read & decode credentials @@ -731,29 +782,34 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q res = hfgal_read_creds_app(&dctx, current_aid, site_key, &creds, verbose); PM3_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading card application credentials"); - PrintAndLogEx(SUCCESS, "GALLAGHER (AID %06X) - Region: " _GREEN_("%u") ", Facility: " _GREEN_("%u") - ", Card No.: " _GREEN_("%u") ", Issue Level: " _GREEN_("%u"), current_aid, - creds.region_code, creds.facility_code, creds.card_number, creds.issue_level); + PrintAndLogEx(SUCCESS, "Gallagher (AID %06X) - region: " _GREEN_("%u") + ", fc: " _GREEN_("%u") + ", cn: " _GREEN_("%u") + ", issue level: " _GREEN_("%u"), + current_aid, + creds.region_code, + creds.facility_code, + creds.card_number, + creds.issue_level + ); } - return PM3_SUCCESS; } static int CmdGallagherReader(const char *cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "hf gallagher reader", - "Read a Gallagher DESFire tag", - "hf gallagher reader --aid 2081f4 --sitekey 00112233445566778899aabbccddeeff" - " -> act as a reader that skips reading the Card Application Directory and uses a non-default site key\n" - "hf gallagher reader -@ -> continuous reader mode" + "Read a Gallagher DESFire tag from the Card Application Directory, CAD\n" + "Specify site key is required if using non-default key\n", + "hf gallagher reader -@ -> continuous reader mode\n" + "hf gallagher reader --aid 2081f4 --sitekey 00112233445566778899aabbccddeeff -> skip CAD\n" ); void *argtable[] = { arg_param_begin, - arg_str0(NULL, "aid", "", "Application ID to read (3 bytes). If specified, then the Card Application Directory is not used"), - arg_str0(NULL, "sitekey", "", "MIFARE site key to compute diversified keys (16 bytes, required if using non-default key)"), + arg_str0(NULL, "aid", "", "Application ID to read (3 bytes). If specified, the CAD is not used"), + arg_str0(NULL, "sitekey", "", "Site key to compute diversified keys (16 bytes)"), arg_lit0("@", "continuous", "Continuous reader mode"), - arg_lit0(NULL, "apdu", "Show APDU requests and responses"), arg_lit0("v", "verbose", "Verbose mode"), arg_param_end @@ -763,8 +819,9 @@ static int CmdGallagherReader(const char *cmd) { int aid_len = 0; uint8_t aid_buf[3] = {0}; CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); - if (aid_len > 0 && aid_len != 3) + if (aid_len > 0 && aid_len != 3) { PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + } reverse_aid(aid_buf); // PM3 displays AIDs backwards uint32_t aid = DesfireAIDByteToUint(aid_buf); @@ -773,47 +830,54 @@ static int CmdGallagherReader(const char *cmd) { uint8_t site_key[16] = {0}; memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 2, site_key, &site_key_len); - if (site_key_len > 0 && site_key_len != 16) + if (site_key_len > 0 && site_key_len != 16) { PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + } bool continuous_mode = arg_get_lit(ctx, 3); SetAPDULogging(arg_get_lit(ctx, 4)); bool verbose = arg_get_lit(ctx, 5); CLIParserFree(ctx); - if (!continuous_mode) + if (continuous_mode == false) { // Read single card return hfgal_read_card(aid, site_key, verbose, false); + } // Loop until is pressed PrintAndLogEx(INFO, "Press " _GREEN_("") " to exit"); - while (!kbd_enter_pressed()) + while (kbd_enter_pressed() == false) { hfgal_read_card(aid, site_key, verbose, !verbose); + } return PM3_SUCCESS; } static int CmdGallagherClone(const char *cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "hf gallagher clone", - "Clone Gallagher credentials to a writable DESFire card", + "Clone Gallagher credentials to a writable DESFire card\n" + "Specify site key is required if using non-default key\n" + "Key, lengths for the different crypto: \n" + " DES 8 bytes\n" + " 2TDEA or AES 16 bytes\n" + " 3TDEA 24 bytes\n" + "AID id, default finds lowest available in range 0x2?81F4, where 0 <= ? <= 0xB.", "hf gallagher clone --rc 1 --fc 22 --cn 3333 --il 4 --sitekey 00112233445566778899aabbccddeeff" ); void *argtable[] = { arg_param_begin, - arg_int0("n", "keynum", "", "Key number [default=0]"), - arg_str0("t", "algo", "", "Crypt algo: DES, 2TDEA, 3TDEA, AES"), - arg_str0("k", "key", "", "Key for authentication to the PICC (HEX 8(DES), 16(2TDEA or AES) or 24(3TDEA) bytes)"), - - arg_u64_1(NULL, "rc", "", "Region code. 4 bits max"), - arg_u64_1(NULL, "fc", "", "Facility code. 2 bytes max"), - arg_u64_1(NULL, "cn", "", "Card number. 3 bytes max"), - arg_u64_1(NULL, "il", "", "Issue level. 4 bits max"), - arg_str0(NULL, "aid", "", "Application ID to write (3 bytes) [default finds lowest available in range 0x2?81F4, where 0 <= ? <= 0xB]"), - arg_str0(NULL, "sitekey", "", "MIFARE site key to compute diversified keys (16 bytes, required if using non-default key)"), - - arg_lit0(NULL, "apdu", "Show APDU requests and responses"), - arg_lit0("v", "verbose", "Verbose mode"), + arg_int0("n", "keynum", "", "Key number [default = 0]"), + arg_str0("t", "algo", "", "Crypt algo: DES, 2TDEA, 3TDEA, AES"), + arg_str0("k", "key", "", "Key for authentication to the PICC"), + arg_u64_1(NULL, "rc", "", "Region code. 4 bits max"), + arg_u64_1(NULL, "fc", "", "Facility code. 2 bytes max"), + arg_u64_1(NULL, "cn", "", "Card number. 3 bytes max"), + arg_u64_1(NULL, "il", "", "Issue level. 4 bits max"), + arg_str0(NULL, "aid", "", "Application ID to write (3 bytes)"), + arg_str0(NULL, "sitekey", "", "Site key to compute diversified keys (16 bytes)"), + arg_lit0(NULL, "apdu", "Show APDU requests and responses"), + arg_lit0("v", "verbose", "Verbose mode"), arg_param_end }; CLIExecWithReturn(ctx, cmd, argtable, false); @@ -821,16 +885,24 @@ static int CmdGallagherClone(const char *cmd) { int key_num = arg_get_int_def(ctx, 1, 0); int key_algo = T_DES; - if (CLIGetOptionList(arg_get_str(ctx, 2), DesfireAlgoOpts, &key_algo)) return PM3_ESOFT; + if (CLIGetOptionList(arg_get_str(ctx, 2), DesfireAlgoOpts, &key_algo)) { + return PM3_ESOFT; + } int key_len = 0; uint8_t key[DESFIRE_MAX_KEY_SIZE] = {0}; CLIGetHexWithReturn(ctx, 3, key, &key_len); - if (key_len && key_len != desfire_get_key_length(key_algo)) - PM3_RET_ERR(PM3_EINVARG, "%s key must have %d bytes length instead of %d", CLIGetOptionListStr(DesfireAlgoOpts, key_algo), desfire_get_key_length(key_algo), key_len); - if (key_len == 0) + if (key_len && key_len != desfire_get_key_length(key_algo)) { + PM3_RET_ERR(PM3_EINVARG, "%s key must have %d bytes length instead of %d", + CLIGetOptionListStr(DesfireAlgoOpts, key_algo), + desfire_get_key_length(key_algo), + key_len + ); + } + if (key_len == 0) { // Default to a key of all zeros key_len = desfire_get_key_length(key_algo); + } uint64_t region_code = arg_get_u64(ctx, 4); // uint4, input will be validated later uint64_t facility_code = arg_get_u64(ctx, 5); // uint16 @@ -842,29 +914,34 @@ static int CmdGallagherClone(const char *cmd) { uint32_t aid = 0; CLIGetHexWithReturn(ctx, 8, aid_buf, &aid_len); if (aid_len > 0) { - if (aid_len != 3) + if (aid_len != 3) { PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + } reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range - if (memcmp(aid_buf, "\xF4\x81", 2) != 0 || aid_buf[2] < 0x20 || aid_buf[2] > 0x2B) - // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || + (aid_buf[2] < 0x20) || + (aid_buf[2] > 0x2B)) { + // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't + PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + } } int site_key_len = 0; uint8_t site_key[16] = {0}; memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 9, site_key, &site_key_len); - if (site_key_len > 0 && site_key_len != 16) + if (site_key_len > 0 && site_key_len != 16) { PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + } SetAPDULogging(arg_get_lit(ctx, 10)); bool verbose = arg_get_lit(ctx, 11); CLIParserFree(ctx); - if (!gallagher_is_valid_creds(region_code, facility_code, card_number, issue_level)) + if (gallagher_is_valid_creds(region_code, facility_code, card_number, issue_level) == false) return PM3_EINVARG; GallagherCredentials_t creds = { @@ -886,8 +963,9 @@ static int CmdGallagherClone(const char *cmd) { // Find available Gallagher AID if the user did not specify one if (aid_len == 0) { aid = find_available_gallagher_aid(&dctx, verbose); - if (aid == 0) + if (aid == 0) { PM3_RET_ERR(PM3_EFATAL, "Could not find an available AID, card is full"); + } } // Update Card Application Directory @@ -915,15 +993,15 @@ static int CmdGallagherClone(const char *cmd) { static int CmdGallagherDelete(const char *cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "hf gallagher delete", - "Delete Gallagher application from a DESFire card", + "Delete Gallagher application from a DESFire card\n" + "Specify site key is required if using non-default key", "hf gallagher delete --aid 2081f4 --sitekey 00112233445566778899aabbccddeeff" ); void *argtable[] = { arg_param_begin, arg_str1(NULL, "aid", "", "Application ID to delete (3 bytes)"), - arg_str0(NULL, "sitekey", "", "MIFARE site key to compute diversified keys (16 bytes, required if using non-default key)"), - + arg_str0(NULL, "sitekey", "", "Site key to compute diversified keys (16 bytes)"), arg_lit0(NULL, "apdu", "Show APDU requests and responses"), arg_lit0("v", "verbose", "Verbose mode"), arg_param_end @@ -935,22 +1013,27 @@ static int CmdGallagherDelete(const char *cmd) { uint32_t aid = 0; CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); - if (aid_len != 3) + if (aid_len != 3) { PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + } reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range - if (memcmp(aid_buf, "\xF4\x81", 2) != 0 || aid_buf[2] < 0x20 || aid_buf[2] > 0x2B) + if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || + (aid_buf[2] < 0x20) || + (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + } int site_key_len = 0; uint8_t site_key[16] = {0}; memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 2, site_key, &site_key_len); - if (site_key_len > 0 && site_key_len != 16) + if (site_key_len > 0 && site_key_len != 16) { PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + } SetAPDULogging(arg_get_lit(ctx, 3)); bool verbose = arg_get_lit(ctx, 4); @@ -981,18 +1064,18 @@ static int CmdGallagherDelete(const char *cmd) { static int CmdGallagherDiversify(const char *cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "hf gallagher diversify", - "Diversify Gallagher key", + "Diversify Gallagher key\n" + "Specify site key is required if using non-default key", "hf gallagher diversify --uid 11223344556677 --aid 2081f4" ); void *argtable[] = { arg_param_begin, - arg_str1(NULL, "aid", "", "Application ID for diversification (3 bytes)"), - arg_int0(NULL, "keynum", "", "Key number [default=0]"), - arg_str0(NULL, "uid", "", "Card UID to delete (4 or 7 bytes)"), - arg_str0(NULL, "sitekey", "", "MIFARE site key to compute diversified keys (16 bytes, required if using non-default key)"), - - arg_lit0(NULL, "apdu", "Show APDU requests and responses"), + arg_str1(NULL, "aid", "", "Application ID for diversification (3 bytes)"), + arg_int0(NULL, "keynum", "", "Key number [default = 0]"), + arg_str0(NULL, "uid", "", "Card UID to delete (4 or 7 bytes)"), + arg_str0(NULL, "sitekey", "", "Site key to compute diversified keys (16 bytes)"), + arg_lit0(NULL, "apdu", "Show APDU requests and responses"), arg_param_end }; CLIExecWithReturn(ctx, cmd, argtable, false); @@ -1002,30 +1085,37 @@ static int CmdGallagherDiversify(const char *cmd) { uint32_t aid = 0; CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); - if (aid_len != 3) + if (aid_len != 3) { PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + } + reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range - if (memcmp(aid_buf, "\xF4\x81", 2) != 0 || aid_buf[2] < 0x20 || aid_buf[2] > 0x2B) + if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || + (aid_buf[2] < 0x20) || + (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + } int key_num = arg_get_int_def(ctx, 2, 0); int uid_len = 0; uint8_t uid[7] = {0}; CLIGetHexWithReturn(ctx, 3, uid, &uid_len); - if (uid_len > 0 && uid_len != 4 && uid_len != 7) + if (uid_len > 0 && uid_len != 4 && uid_len != 7) { PM3_RET_ERR(PM3_EINVARG, "--uid must be 4 or 7 bytes"); + } int site_key_len = 0; uint8_t site_key[16] = {0}; memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 4, site_key, &site_key_len); - if (site_key_len > 0 && site_key_len != 16) + if (site_key_len > 0 && site_key_len != 16) { PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + } SetAPDULogging(arg_get_lit(ctx, 5)); CLIParserFree(ctx); @@ -1052,15 +1142,16 @@ static int CmdGallagherDiversify(const char *cmd) { char *key_str = sprint_hex_inrow(key, ARRAYLEN(key)); PrintAndLogEx(SUCCESS, "Successfully diversified key: " _GREEN_("%s"), key_str); - if (IfPm3Iso14443()) - PrintAndLogEx(HINT, "Hint: try " - _YELLOW_("`hf mfdes auth --aid %06X --keyno %d --algo AES --key %s`") - " to verify", aid, key_num, key_str); + if (IfPm3Iso14443()) { + PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf mfdes auth --aid %06X --keyno %d --algo AES --key %s`") " to verify", + aid, + key_num, + key_str + ); + } return PM3_SUCCESS; } -static int CmdHelp(const char *cmd); - static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "This help"}, {"reader", CmdGallagherReader, IfPm3Iso14443, "Read & decode all Gallagher credentials on a DESFire card"}, From 256565f82035f0ca51a4d1d0cd8b0ebca7fccf81 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 13:08:51 +0100 Subject: [PATCH 22/73] coverity fixes for mem leaks. added a macro for freeing cliparser context too --- client/src/cmdhfgallagher.c | 31 ++++++++++++++++--------------- client/src/util.h | 11 ++++++++++- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index ec89e75c7..5dbc3c4b8 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -820,7 +820,7 @@ static int CmdGallagherReader(const char *cmd) { uint8_t aid_buf[3] = {0}; CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); if (aid_len > 0 && aid_len != 3) { - PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--aid must be 3 bytes"); } reverse_aid(aid_buf); // PM3 displays AIDs backwards @@ -831,7 +831,7 @@ static int CmdGallagherReader(const char *cmd) { memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 2, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) { - PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--sitekey must be 16 bytes"); } bool continuous_mode = arg_get_lit(ctx, 3); @@ -886,14 +886,15 @@ static int CmdGallagherClone(const char *cmd) { int key_algo = T_DES; if (CLIGetOptionList(arg_get_str(ctx, 2), DesfireAlgoOpts, &key_algo)) { - return PM3_ESOFT; + CLIParserFree(ctx); + return PM3_EINVARG; } int key_len = 0; uint8_t key[DESFIRE_MAX_KEY_SIZE] = {0}; CLIGetHexWithReturn(ctx, 3, key, &key_len); if (key_len && key_len != desfire_get_key_length(key_algo)) { - PM3_RET_ERR(PM3_EINVARG, "%s key must have %d bytes length instead of %d", + PM3_RET_ERR_FREE(PM3_EINVARG, "%s key must have %d bytes length instead of %d", CLIGetOptionListStr(DesfireAlgoOpts, key_algo), desfire_get_key_length(key_algo), key_len @@ -915,7 +916,7 @@ static int CmdGallagherClone(const char *cmd) { CLIGetHexWithReturn(ctx, 8, aid_buf, &aid_len); if (aid_len > 0) { if (aid_len != 3) { - PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--aid must be 3 bytes"); } reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); @@ -925,7 +926,7 @@ static int CmdGallagherClone(const char *cmd) { (aid_buf[2] < 0x20) || (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); } } @@ -934,7 +935,7 @@ static int CmdGallagherClone(const char *cmd) { memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 9, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) { - PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--sitekey must be 16 bytes"); } SetAPDULogging(arg_get_lit(ctx, 10)); @@ -1014,7 +1015,7 @@ static int CmdGallagherDelete(const char *cmd) { CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); if (aid_len != 3) { - PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--aid must be 3 bytes"); } reverse_aid(aid_buf); // PM3 displays AIDs backwards aid = DesfireAIDByteToUint(aid_buf); @@ -1024,7 +1025,7 @@ static int CmdGallagherDelete(const char *cmd) { (aid_buf[2] < 0x20) || (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); } int site_key_len = 0; @@ -1032,7 +1033,7 @@ static int CmdGallagherDelete(const char *cmd) { memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 2, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) { - PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--sitekey must be 16 bytes"); } SetAPDULogging(arg_get_lit(ctx, 3)); @@ -1050,7 +1051,7 @@ static int CmdGallagherDelete(const char *cmd) { // Update Card Application Directory res = hfgal_remove_aid_from_cad(&dctx, site_key, aid, verbose); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed removing %06X from the Card Application Directory"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed removing %06X from the Card Application Directory", aid); // Delete application res = hfgal_delete_app(&dctx, site_key, aid, verbose); @@ -1086,7 +1087,7 @@ static int CmdGallagherDiversify(const char *cmd) { CLIGetHexWithReturn(ctx, 1, aid_buf, &aid_len); if (aid_len != 3) { - PM3_RET_ERR(PM3_EINVARG, "--aid must be 3 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--aid must be 3 bytes"); } reverse_aid(aid_buf); // PM3 displays AIDs backwards @@ -1097,7 +1098,7 @@ static int CmdGallagherDiversify(const char *cmd) { (aid_buf[2] < 0x20) || (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - PM3_RET_ERR(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); } int key_num = arg_get_int_def(ctx, 2, 0); @@ -1106,7 +1107,7 @@ static int CmdGallagherDiversify(const char *cmd) { uint8_t uid[7] = {0}; CLIGetHexWithReturn(ctx, 3, uid, &uid_len); if (uid_len > 0 && uid_len != 4 && uid_len != 7) { - PM3_RET_ERR(PM3_EINVARG, "--uid must be 4 or 7 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--uid must be 4 or 7 bytes"); } int site_key_len = 0; @@ -1114,7 +1115,7 @@ static int CmdGallagherDiversify(const char *cmd) { memcpy(site_key, DEFAULT_SITE_KEY, ARRAYLEN(site_key)); CLIGetHexWithReturn(ctx, 4, site_key, &site_key_len); if (site_key_len > 0 && site_key_len != 16) { - PM3_RET_ERR(PM3_EINVARG, "--sitekey must be 16 bytes"); + PM3_RET_ERR_FREE(PM3_EINVARG, "--sitekey must be 16 bytes"); } SetAPDULogging(arg_get_lit(ctx, 5)); diff --git a/client/src/util.h b/client/src/util.h index 34a67ef10..87a54739f 100644 --- a/client/src/util.h +++ b/client/src/util.h @@ -39,7 +39,16 @@ extern bool g_pendingPrompt; #define PRINTANDLOG_LOG 2 // Return error -#define PM3_RET_ERR(err, ...) { PrintAndLogEx(ERR, __VA_ARGS__); return err; } +#define PM3_RET_ERR(err, ...) { \ + PrintAndLogEx(ERR, __VA_ARGS__); \ + return err; \ +} + +#define PM3_RET_ERR_FREE(err, ...) { \ + CLIParserFree(ctx); \ + PrintAndLogEx(ERR, __VA_ARGS__); \ + return err; \ +} // RETurn IF ERRor #define PM3_RET_IF_ERR(res) if (res != PM3_SUCCESS) { return res; } From eaf968092c2008aad6a7ee3ea0c969974b77d046 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 13:14:53 +0100 Subject: [PATCH 23/73] coverity fixes --- client/src/cmdhfgallagher.c | 9 +++++---- client/src/cmdhfksx6924.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index 5dbc3c4b8..feb61ba4c 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -251,7 +251,7 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si GallagherCredentials_t *creds, bool verbose) { // Check that card UID has been set if (ctx->uidlen == 0) { - PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext (required for key diversification)"); + PM3_RET_ERR(PM3_EINVARG, "Card UID must be set in DesfireContext (required for key div)"); } // Select application & authenticate @@ -269,7 +269,7 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si // Check file contained 16 bytes of data if (read_len != 16) { - PM3_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected 16 bytes, got %d bytes", + PM3_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected 16 bytes, got %zu bytes", aid, read_len ); @@ -282,6 +282,7 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si if (memcmp(buf, &buf[8], 8) != 0) { PM3_RET_ERR(PM3_EFAILED, "Invalid cardholder data in file 0 in AID %06X. Received %s", + aid, sprint_hex_inrow(buf, 16) ); } @@ -414,7 +415,7 @@ static int hfgal_create_creds_file(DesfireContext_t *ctx, uint8_t *site_key, uin // Write file DesfireSetCommMode(ctx, DCMEncrypted); res = DesfireWriteFile(ctx, file_id, 0, ARRAYLEN(contents), contents); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file 0 in AID %06X"); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed writing data to file 0 in AID %06X", aid); PrintAndLogEx(INFO, "Successfully wrote cardholder credentials to file " _YELLOW_("0") " in AID " _YELLOW_("%06X"), aid); return PM3_SUCCESS; @@ -510,7 +511,7 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo DesfireSetCommMode(ctx, DCMMACed); res = DesfireCreateApplication(ctx, data, ARRAYLEN(data)); - PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Card Application Directory. Does it already exist?", CAD_AID); + PM3_RET_IF_ERR_WITH_MSG(res, "Failed creating Card Application Directory (AID " _YELLOW_("%06X")"). Does it already exist?", CAD_AID); if (verbose) { PrintAndLogEx(INFO, "Created Card Application Directory (AID " _YELLOW_("%06X") ", empty contents & blank keys)", diff --git a/client/src/cmdhfksx6924.c b/client/src/cmdhfksx6924.c index 8a9ec747a..d405459c9 100644 --- a/client/src/cmdhfksx6924.c +++ b/client/src/cmdhfksx6924.c @@ -56,7 +56,7 @@ static int get_and_print_balance(void) { return PM3_ESOFT; } - PrintAndLogEx(SUCCESS, "Current balance: " _YELLOW_("%ld") " won/cents", balance); + PrintAndLogEx(SUCCESS, "Current balance: " _YELLOW_("%u") " won/cents", balance); return PM3_SUCCESS; } From 0a5ae04070aac6870bba5520a63cd6c121f7aaf8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 13:27:22 +0100 Subject: [PATCH 24/73] coverity fixes --- client/src/cmdlfzx8211.c | 2 +- client/src/ksx6924/ksx6924core.c | 6 +++--- client/src/mifare/gallaghercore.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/src/cmdlfzx8211.c b/client/src/cmdlfzx8211.c index ec98745b3..92c674d06 100644 --- a/client/src/cmdlfzx8211.c +++ b/client/src/cmdlfzx8211.c @@ -77,7 +77,7 @@ int demodzx(bool verbose) { // test checksums - PrintAndLogEx(SUCCESS, "ZX8211 - Card " _GREEN_("%u") ", Raw: %08X", raw1); + PrintAndLogEx(SUCCESS, "ZX8211 - Card " _GREEN_("%u"), raw1); return PM3_SUCCESS; } diff --git a/client/src/ksx6924/ksx6924core.c b/client/src/ksx6924/ksx6924core.c index 02ca39549..2748ea044 100644 --- a/client/src/ksx6924/ksx6924core.c +++ b/client/src/ksx6924/ksx6924core.c @@ -330,7 +330,7 @@ void KSX6924PrintPurseInfo(const struct ksx6924_purse_info *purseInfo) { PrintAndLogEx(INFO, " idCenter (issuer ID) .................. %02x ( %s )", purseInfo->idCenter, KSX6924LookupTMoneyIDCenter(purseInfo->idCenter, KSX6924_UNKNOWN)); PrintAndLogEx(INFO, " CSN (card number) ..................... %s", purseInfo->csn); - PrintAndLogEx(INFO, " idtr (card usage authentication ID) ... %i", purseInfo->idtr); + PrintAndLogEx(INFO, " idtr (card usage authentication ID) ... %" PRIu64, purseInfo->idtr); PrintAndLogEx(INFO, " issue date ............................ %04i-%02i-%02i", purseInfo->issueDate.year, purseInfo->issueDate.month, @@ -343,9 +343,9 @@ void KSX6924PrintPurseInfo(const struct ksx6924_purse_info *purseInfo) { KSX6924LookupTMoneyUserCode(purseInfo->userCode, KSX6924_UNKNOWN)); PrintAndLogEx(INFO, " disRate (discount type) ............... %02x ( %s )", purseInfo->disRate, KSX6924LookupTMoneyDisRate(purseInfo->disRate, KSX6924_UNKNOWN)); - PrintAndLogEx(INFO, " balMax (in won/cents) ................. %ld", purseInfo->balMax); + PrintAndLogEx(INFO, " balMax (in won/cents) ................. %" PRIu32, purseInfo->balMax); PrintAndLogEx(INFO, " bra (branch code) ..................... %04x", purseInfo->bra); - PrintAndLogEx(INFO, " mmax (one-time transaction limit) ..... %ld", purseInfo->mmax); + PrintAndLogEx(INFO, " mmax (one-time transaction limit) ..... %" PRIu32, purseInfo->mmax); PrintAndLogEx(INFO, " tcode (telecom carrier ID) ............ %02x ( %s )", purseInfo->tcode, KSX6924LookupTMoneyTCode(purseInfo->tcode, KSX6924_UNKNOWN)); PrintAndLogEx(INFO, " ccode (credit card company ID) ........ %02x ( %s )", purseInfo->ccode, diff --git a/client/src/mifare/gallaghercore.c b/client/src/mifare/gallaghercore.c index e7f3ba54b..80a902bab 100644 --- a/client/src/mifare/gallaghercore.c +++ b/client/src/mifare/gallaghercore.c @@ -112,19 +112,19 @@ bool gallagher_is_valid_creds(uint64_t region_code, uint64_t facility_code, uint // validate input if (region_code > 0x0f) { - PrintAndLogEx(ERR, "Region code must be 0 <= rc <= 15 (4 bits), received: %d", region_code); + PrintAndLogEx(ERR, "Region code must be 0 <= rc <= 15 (4 bits), received: %"PRIu64, region_code); is_valid = false; } if (facility_code > 0xffff) { - PrintAndLogEx(ERR, "Facility code must be 0 <= fc <= 65535 (2 bytes), received: %d", facility_code); + PrintAndLogEx(ERR, "Facility code must be 0 <= fc <= 65535 (2 bytes), received: %"PRIu64, facility_code); is_valid = false; } if (card_number > 0xffffff) { - PrintAndLogEx(ERR, "Card number must be 0 <= cn <= 16777215 (3 bytes), received: %d", card_number); + PrintAndLogEx(ERR, "Card number must be 0 <= cn <= 16777215 (3 bytes), received: %"PRIu64, card_number); is_valid = false; } if (issue_level > 0x0f) { - PrintAndLogEx(ERR, "Issue level must be 0 <= il <= 15 (4 bits), received: %d", issue_level); + PrintAndLogEx(ERR, "Issue level must be 0 <= il <= 15 (4 bits), received: %"PRIu64, issue_level); is_valid = false; } return is_valid; From 3bcef75da657bca35fcbb47fb500719ae3e08cd8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 13:30:24 +0100 Subject: [PATCH 25/73] coverity fix for the return type --- include/iso14b.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/iso14b.h b/include/iso14b.h index 90e521b23..432baac0c 100644 --- a/include/iso14b.h +++ b/include/iso14b.h @@ -60,10 +60,10 @@ typedef struct { #define US_TO_SSP(x) ( (uint32_t)((x) * 3.39) ) #define SSP_TO_US(x) ( (uint32_t)((x) / 3.39) ) -#define ETU_TO_SSP(x) ((x) * 32) -#define SSP_TO_ETU(x) ((x) / 32) +#define ETU_TO_SSP(x) ((uint32_t)((x) * 32)) +#define SSP_TO_ETU(x) ((uint32_t)((x) / 32)) -#define ETU_TO_US(x) ((((x) * 9440000) / 1000000) + 0.5) -#define US_TO_ETU(x) ((((x) * 1000000 / 9440000) + 0.5)) +#define ETU_TO_US(x) ((uint32_t)((((x) * 9440000) / 1000000) + 0.5)) +#define US_TO_ETU(x) ((uint32_t)(((x) * 1000000 / 9440000) + 0.5)) #endif // _ISO14B_H_ From 12a01eb4873673fa6eab9dafa59013dd22b2148a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 8 Jan 2022 14:25:12 +0100 Subject: [PATCH 26/73] mailmap --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index a384f1e79..7283e9d51 100644 --- a/.mailmap +++ b/.mailmap @@ -36,6 +36,8 @@ Gator96100 Henryk Plรถtz Henryk Plรถtz pwpiwi +pwpiwi +pwpiwi d18c7db Thomas Sutter Marlin Sรถรถse <30473690+msoose@users.noreply.github.com> From 7b34b210b4ba6f0dd6d16f7c9fb2e278a25896aa Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 15:02:16 +0100 Subject: [PATCH 27/73] cppcheck fixes --- .../hitag2crack/crack5opencl/dolphin_macro.h | 82 +++++++++++++++++-- tools/hitag2crack/crack5opencl/hitag2.h | 4 +- .../crack5opencl/ht2crack5opencl.c | 6 +- 3 files changed, 78 insertions(+), 14 deletions(-) diff --git a/tools/hitag2crack/crack5opencl/dolphin_macro.h b/tools/hitag2crack/crack5opencl/dolphin_macro.h index ea9708bab..8fca6907c 100644 --- a/tools/hitag2crack/crack5opencl/dolphin_macro.h +++ b/tools/hitag2crack/crack5opencl/dolphin_macro.h @@ -27,12 +27,76 @@ License: GNU General Public License v3 or any later version (see LICENSE.txt) // too many allocations, too many free to manage, I need dolphin macros :) // they could be buggy, but if you know how to fix them, do it -#define MEMORY_FREE_ADD(a) { freeList[freeListIdx++] = (void *)(a); } -#define MEMORY_FREE_ALL { int t=freeListIdx; while (t-- > 0) if (freeList[t]!=NULL) { free (freeList[t]); freeList[t]=NULL; } if (freeList!=NULL) { free (freeList); freeList=NULL; } } -#define MEMORY_FREE_DEL(a) { for (int i=0;i 0) { int t=(int)i; do { if (a[t]!=NULL) { free(a[t]); a[t]=NULL; } } while (--t >= 0); MEMORY_FREE_DEL(a) } } -#define MEMORY_FREE_LIST_Z(a,i) { int t=(int)i; do { if (a[t]!=NULL) { free(a[t]); a[t]=NULL; } } while (--t >= 0); MEMORY_FREE_DEL(a) } -#define MEMORY_FREE_OPENCL(c,i) { int t=(int)i; do { if (c.contexts[t]) clReleaseContext (c.contexts[t]); if (c.keystreams[t]) clReleaseMemObject (c.keystreams[t]); \ - if (c.candidates[t]) clReleaseMemObject (c.candidates[t]); if (c.matches[t]) clReleaseMemObject (c.matches[t]); \ - if (c.matches_found[t]) clReleaseMemObject (c.matches_found[t]); if (c.commands[t]) clReleaseCommandQueue (c.commands[t]); \ - if (c.kernels[t]) clReleaseKernel (c.kernels[t]); if (c.programs[t]) clReleaseProgram (c.programs[t]); } while (--t >= 0); } +#define MEMORY_FREE_ADD(a) { \ + freeList[freeListIdx++] = (void *)(a); \ +} + +#define MEMORY_FREE_ALL { \ + int t = freeListIdx; \ + while (t-- > 0) { \ + if (freeList[t] != NULL) { \ + free (freeList[t]); \ + freeList[t] = NULL; \ + }\ + if (freeList != NULL) { \ + free (freeList); \ + freeList = NULL; \ + } \ + } \ +} + +#define MEMORY_FREE_DEL(a) { \ + for (int i = 0; i < freeListIdx; i++) { \ + if (freeList[i] && a == freeList[i]) { \ + free(freeList[i]); \ + freeList[i] = NULL; \ + break; \ + } \ + } \ +} + +#define MEMORY_FREE_LIST(a,i) { \ + if (i > 0) { \ + int t=(int)i; \ + do { \ + if (a[t] != NULL) { \ + free(a[t]); \ + a[t]=NULL; \ + } \ + } while (--t >= 0); \ + MEMORY_FREE_DEL(a) \ + } \ +} + +#define MEMORY_FREE_LIST_Z(a,i) { \ + int t = (int)i; \ + do { \ + if (a[t] != NULL) { \ + free(a[t]); \ + a[t] = NULL; \ + } \ + } while (--t >= 0); \ + MEMORY_FREE_DEL(a) \ +} + +#define MEMORY_FREE_OPENCL(c,i) { \ + int t = (int)i; \ + do { \ + if (c.contexts[t]) \ + clReleaseContext (c.contexts[t]); \ + if (c.keystreams[t]) \ + clReleaseMemObject (c.keystreams[t]); \ + if (c.candidates[t]) \ + clReleaseMemObject (c.candidates[t]); \ + if (c.matches[t]) \ + clReleaseMemObject (c.matches[t]); \ + if (c.matches_found[t]) \ + clReleaseMemObject (c.matches_found[t]); \ + if (c.commands[t]) \ + clReleaseCommandQueue (c.commands[t]); \ + if (c.kernels[t]) \ + clReleaseKernel (c.kernels[t]); \ + if (c.programs[t]) \ + clReleaseProgram (c.programs[t]); \ + } while (--t >= 0); \ + } diff --git a/tools/hitag2crack/crack5opencl/hitag2.h b/tools/hitag2crack/crack5opencl/hitag2.h index 964482c58..e53e98381 100644 --- a/tools/hitag2crack/crack5opencl/hitag2.h +++ b/tools/hitag2crack/crack5opencl/hitag2.h @@ -7,11 +7,11 @@ // as the HITAG2 original implementation, with some minor changes #define i4(x,a,b,c,d) ((uint32_t)((((x)>>(a))&1)<<3)|(((x)>>(b))&1)<<2|(((x)>>(c))&1)<<1|(((x)>>(d))&1)) -#define f(state) ((0xdd3929b >> ( (((0x3c65 >> i4(state, 2, 3, 5, 6) ) & 1) <<4) \ +#define f(state) ((uint32_t)((0xdd3929b >> ( (((0x3c65 >> i4(state, 2, 3, 5, 6) ) & 1) <<4) \ | ((( 0xee5 >> i4(state, 8,12,14,15) ) & 1) <<3) \ | ((( 0xee5 >> i4(state,17,21,23,26) ) & 1) <<2) \ | ((( 0xee5 >> i4(state,28,29,31,33) ) & 1) <<1) \ - | (((0x3c65 >> i4(state,34,43,44,46) ) & 1) ))) & 1) + | (((0x3c65 >> i4(state,34,43,44,46) ) & 1) ))) & 1)) #define get_bit(n, word) ((word >> (n)) & 1) diff --git a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c index 9afeeddfe..74fbd3764 100644 --- a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c +++ b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c @@ -53,7 +53,7 @@ typedef unsigned int __attribute__((aligned(VECTOR_SIZE))) __attribute__((vector_size(VECTOR_SIZE))) bitslice_value_t; typedef union { bitslice_value_t value; - uint8_t bytes[MAX_BITSLICES / 8]; + uint8_t bytes[VECTOR_SIZE]; } bitslice_t; static bitslice_t keystream[32]; @@ -94,8 +94,8 @@ static uint64_t expand(uint64_t mask, uint64_t value) { static void bitslice(const uint64_t value, bitslice_t *restrict bitsliced_value) { // set constants bitslice_t bs_zeroes, bs_ones; - memset(bs_ones.bytes, 0xff, VECTOR_SIZE); - memset(bs_zeroes.bytes, 0x00, VECTOR_SIZE); + memset((uint8_t*)&bs_ones, 0xff, VECTOR_SIZE); + memset((uint8_t*)&bs_zeroes, 0x00, VECTOR_SIZE); for (size_t bit_idx = 0; bit_idx < 32; bit_idx++) { const bool bit = get_bit(32 - 1 - bit_idx, value); From 7c7dfa7d392fde020cebd2380eb3961f62f6a794 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 15:05:03 +0100 Subject: [PATCH 28/73] cppcheck fix --- tools/fpga_compress/fpga_compress.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/fpga_compress/fpga_compress.c b/tools/fpga_compress/fpga_compress.c index 1726117fd..04e0dbc9f 100644 --- a/tools/fpga_compress/fpga_compress.c +++ b/tools/fpga_compress/fpga_compress.c @@ -250,9 +250,8 @@ static int zlib_decompress(FILE *infile, FILE *outfiles[], uint8_t num_outfiles, fclose(outfiles[j]); } } - if (outbufall) { - free(outbufall); - } + + free(outbufall); return (EXIT_SUCCESS); } From 5ff043e5abc779b52931fa117c78465a68dbe4f6 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 15:28:36 +0100 Subject: [PATCH 29/73] null key fix --- client/src/cmdhfgallagher.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index feb61ba4c..fb7e6e46a 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -60,14 +60,17 @@ int hfgal_diversify_key(uint8_t *site_key, uint8_t *uid, uint8_t uid_len, int res = mfdes_kdf_input_gallagher(uid, uid_len, key_num, aid, key_output, &kdf_input_len); PM3_RET_IF_ERR_WITH_MSG(res, "Failed generating Gallagher key diversification input"); + uint8_t key[sizeof(DEFAULT_SITE_KEY)]; if (site_key == NULL) { PrintAndLogEx(INFO, "hfgal_diversify_key is using default site key"); - memcpy(site_key, DEFAULT_SITE_KEY, sizeof(DEFAULT_SITE_KEY)); + memcpy(key, DEFAULT_SITE_KEY, sizeof(key)); + } else { + memcpy(key, site_key, sizeof(key)); } // Make temporary DesfireContext DesfireContext_t dctx = {0}; - DesfireSetKey(&dctx, 0, T_AES, site_key); + DesfireSetKey(&dctx, 0, T_AES, key); // Diversify input & copy to output buffer MifareKdfAn10922(&dctx, DCOMasterKey, key_output, kdf_input_len); From 0254b2a63ad4a9f2855f0d85aa7bedfe72582b38 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 8 Jan 2022 15:29:11 +0100 Subject: [PATCH 30/73] cppcheck fixes --- client/src/mifare/desfirecrypto.c | 10 +++++++++- client/src/ui.c | 6 ++++-- client/src/wiegand_formats.c | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/client/src/mifare/desfirecrypto.c b/client/src/mifare/desfirecrypto.c index 185c176f3..96a7caa79 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -72,10 +72,17 @@ void DesfireClearIV(DesfireContext_t *ctx) { void DesfireSetKey(DesfireContext_t *ctx, uint8_t keyNum, DesfireCryptoAlgorithm keyType, uint8_t *key) { DesfireClearContext(ctx); + if (key == NULL) + return; + DesfireSetKeyNoClear(ctx, keyNum, keyType, key); } void DesfireSetKeyNoClear(DesfireContext_t *ctx, uint8_t keyNum, DesfireCryptoAlgorithm keyType, uint8_t *key) { + + if (key == NULL) + return; + ctx->keyNum = keyNum; ctx->keyType = keyType; memcpy(ctx->key, key, desfire_get_key_length(keyType)); @@ -93,8 +100,9 @@ void DesfireSetCommMode(DesfireContext_t *ctx, DesfireCommunicationMode commMode void DesfireSetKdf(DesfireContext_t *ctx, uint8_t kdfAlgo, uint8_t *kdfInput, uint8_t kdfInputLen) { ctx->kdfAlgo = kdfAlgo; ctx->kdfInputLen = kdfInputLen; - if (kdfInputLen) + if (kdfInputLen) { memcpy(ctx->kdfInput, kdfInput, kdfInputLen); + } } bool DesfireIsAuthenticated(DesfireContext_t *dctx) { diff --git a/client/src/ui.c b/client/src/ui.c index 746ac7396..5dab29d1f 100644 --- a/client/src/ui.c +++ b/client/src/ui.c @@ -648,6 +648,10 @@ void print_progress(size_t count, uint64_t max, barMode_t style) { int rows; rl_reset_screen_size(); // refresh Readline idea of the actual screen width rl_get_screen_size(&rows, &cols); + + if (cols < 36) + return; + (void) rows; if (prev_cols > cols) { PrintAndLogEx(NORMAL, _CLEAR_ _TOP_ ""); @@ -655,8 +659,6 @@ void print_progress(size_t count, uint64_t max, barMode_t style) { prev_cols = cols; #endif int width = cols - 35; - if (width < 1) - return; #define PERCENTAGE(V, T) ((V * width) / T) // x/8 fractional part of the percentage diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index bcedea90d..db2223a0b 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1422,7 +1422,7 @@ int HIDFindCardFormat(const char *format) { bool HIDPack(int format_idx, wiegand_card_t *card, wiegand_message_t *packed, bool preamble) { memset(packed, 0, sizeof(wiegand_message_t)); - if (format_idx < 0 || format_idx >= ARRAYLEN(FormatTable) - 1) + if ((format_idx < 0) || (format_idx >= ARRAYLEN(FormatTable) - 1) ) return false; return FormatTable[format_idx].Pack(card, packed, preamble); From fe9348768dad8ba851c0461bced031a716fe5860 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 00:33:33 +0100 Subject: [PATCH 31/73] use calloc instead --- client/src/emv/crypto_polarssl.c | 16 ++++++++-------- client/src/emv/dol.c | 4 ++-- client/src/emv/emv_pk.c | 6 +++--- client/src/emv/emv_pki.c | 6 +++--- client/src/emv/emv_pki_priv.c | 12 ++++++------ client/src/emv/test/cda_test.c | 6 +++--- client/src/emv/test/crypto_test.c | 2 +- client/src/emv/test/dda_test.c | 6 +++--- client/src/emv/test/sda_test.c | 2 +- client/src/emv/tlv.c | 15 ++++++++------- client/src/pm3_pywrap.c | 2 +- client/src/uart/uart_posix.c | 6 +++--- common/crapto1/crapto1.c | 12 ++++++------ common/lfdemod.c | 2 +- tools/hitag2crack/crack2/ht2crack2buildtable.c | 8 ++++---- tools/hitag2crack/crack2/ht2crack2search.c | 4 ++-- tools/hitag2crack/crack3/ht2crack3.c | 8 ++++---- tools/hitag2crack/crack4/ht2crack4.c | 8 ++++---- tools/hitag2crack/crack5gpu/ht2crack5gpu.c | 4 ++-- tools/hitag2crack/crack5opencl/ht2crack5opencl.c | 4 ++-- tools/hitag2crack/crack5opencl/queue.c | 4 ++-- tools/mf_nonce_brute/mf_nonce_brute.c | 2 +- 22 files changed, 70 insertions(+), 69 deletions(-) diff --git a/client/src/emv/crypto_polarssl.c b/client/src/emv/crypto_polarssl.c index a6509ca0a..00e484bf7 100644 --- a/client/src/emv/crypto_polarssl.c +++ b/client/src/emv/crypto_polarssl.c @@ -63,7 +63,7 @@ static struct crypto_hash *crypto_hash_polarssl_open(enum crypto_algo_hash hash) if (hash != HASH_SHA_1) return NULL; - struct crypto_hash_polarssl *ch = malloc(sizeof(*ch)); + struct crypto_hash_polarssl *ch = calloc(1, sizeof(*ch)); mbedtls_sha1_starts(&(ch->ctx)); @@ -81,7 +81,7 @@ struct crypto_pk_polarssl { }; static struct crypto_pk *crypto_pk_polarssl_open_rsa(va_list vl) { - struct crypto_pk_polarssl *cp = malloc(sizeof(*cp)); + struct crypto_pk_polarssl *cp = calloc(1, sizeof(*cp)); memset(cp, 0x00, sizeof(*cp)); char *mod = va_arg(vl, char *); // N @@ -106,7 +106,7 @@ static struct crypto_pk *crypto_pk_polarssl_open_rsa(va_list vl) { } static struct crypto_pk *crypto_pk_polarssl_open_priv_rsa(va_list vl) { - struct crypto_pk_polarssl *cp = malloc(sizeof(*cp)); + struct crypto_pk_polarssl *cp = calloc(1, sizeof(*cp)); memset(cp, 0x00, sizeof(*cp)); char *mod = va_arg(vl, char *); int modlen = va_arg(vl, size_t); @@ -166,7 +166,7 @@ static int myrand(void *rng_state, unsigned char *output, size_t len) { } static struct crypto_pk *crypto_pk_polarssl_genkey_rsa(va_list vl) { - struct crypto_pk_polarssl *cp = malloc(sizeof(*cp)); + struct crypto_pk_polarssl *cp = calloc(1, sizeof(*cp)); memset(cp, 0x00, sizeof(*cp)); int transient = va_arg(vl, int); @@ -198,7 +198,7 @@ static unsigned char *crypto_pk_polarssl_encrypt(const struct crypto_pk *_cp, co *clen = 0; size_t keylen = mbedtls_mpi_size(&cp->ctx.N); - unsigned char *result = malloc(keylen); + unsigned char *result = calloc(1, keylen); if (!result) { PrintAndLogEx(WARNING, "RSA encrypt failed. Can't allocate result memory"); return NULL; @@ -220,7 +220,7 @@ static unsigned char *crypto_pk_polarssl_decrypt(const struct crypto_pk *_cp, co *clen = 0; size_t keylen = mbedtls_mpi_size(&cp->ctx.N); - unsigned char *result = malloc(keylen); + unsigned char *result = calloc(1, keylen); if (!result) { PrintAndLogEx(WARNING, "RSA encrypt failed. Can't allocate result memory"); return NULL; @@ -250,7 +250,7 @@ static unsigned char *crypto_pk_polarssl_get_parameter(const struct crypto_pk *_ // mod case 0: *plen = mbedtls_mpi_size(&cp->ctx.N); - result = malloc(*plen); + result = calloc(1, *plen); memset(result, 0x00, *plen); res = mbedtls_mpi_write_binary(&cp->ctx.N, result, *plen); if (res < 0) { @@ -262,7 +262,7 @@ static unsigned char *crypto_pk_polarssl_get_parameter(const struct crypto_pk *_ // exp case 1: *plen = mbedtls_mpi_size(&cp->ctx.E); - result = malloc(*plen); + result = calloc(1, *plen); memset(result, 0x00, *plen); res = mbedtls_mpi_write_binary(&cp->ctx.E, result, *plen); if (res < 0) { diff --git a/client/src/emv/dol.c b/client/src/emv/dol.c index 5eb1c0351..dddefaf4a 100644 --- a/client/src/emv/dol.c +++ b/client/src/emv/dol.c @@ -54,7 +54,7 @@ static size_t dol_calculate_len(const struct tlv *tlv, size_t data_len) { struct tlv *dol_process(const struct tlv *tlv, const struct tlvdb *tlvdb, tlv_tag_t tag) { size_t res_len; if (!tlv || !(res_len = dol_calculate_len(tlv, 0))) { - struct tlv *res_tlv = malloc(sizeof(*res_tlv)); + struct tlv *res_tlv = calloc(1, sizeof(*res_tlv)); res_tlv->tag = tag; res_tlv->len = 0; @@ -63,7 +63,7 @@ struct tlv *dol_process(const struct tlv *tlv, const struct tlvdb *tlvdb, tlv_ta return res_tlv; } - struct tlv *res_tlv = malloc(sizeof(*res_tlv) + res_len); + struct tlv *res_tlv = calloc(1, sizeof(*res_tlv) + res_len); if (!res_tlv) return NULL; diff --git a/client/src/emv/emv_pk.c b/client/src/emv/emv_pk.c index ab700310c..e3f871fd7 100644 --- a/client/src/emv/emv_pk.c +++ b/client/src/emv/emv_pk.c @@ -202,7 +202,7 @@ struct emv_pk *emv_pk_parse_pk(char *buf, size_t buflen) { goto out; buf += l; - r->modulus = malloc(2048 / 8); + r->modulus = calloc(1, (2048 / 8)); l = emv_pk_read_bin(buf, buflen, r->modulus, 2048 / 8, &r->mlen); if (l <= 0) goto out2; @@ -267,8 +267,8 @@ static size_t emv_pk_write_str(char *out, size_t outlen, const char *str) { char *emv_pk_dump_pk(const struct emv_pk *pk) { size_t outpos = 0; - size_t outsize = 1024; /* should be enough */ - char *out = malloc(outsize); /* should be enough */ + size_t outsize = 1024; // should be enough + char *out = calloc(1, outsize); // should be enough if (!out) return NULL; diff --git a/client/src/emv/emv_pki.c b/client/src/emv/emv_pki.c index c3f016003..17eb7e0ea 100644 --- a/client/src/emv/emv_pki.c +++ b/client/src/emv/emv_pki.c @@ -310,7 +310,7 @@ struct emv_pk *emv_pki_recover_icc_cert(const struct emv_pk *pk, struct tlvdb *d sda_tlv, &sda_tdata); - free(sdatl); // malloc here: emv_pki_sdatl_fill + free(sdatl); // calloc here: emv_pki_sdatl_fill return res; } @@ -345,7 +345,7 @@ unsigned char *emv_pki_sdatl_fill(const struct tlvdb *db, size_t *sdatl_len) { if (len) { *sdatl_len = len; - unsigned char *value = malloc(len); + unsigned char *value = calloc(1, len); memcpy(value, buf, len); return value; } @@ -372,7 +372,7 @@ struct tlvdb *emv_pki_recover_dac_ex(const struct emv_pk *enc_pk, const struct t &sda_tdata, (uint8_t *)NULL); - free(sdatl); // malloc here: emv_pki_sdatl_fill + free(sdatl); // calloc here: emv_pki_sdatl_fill if (!data || data_len < 5) return NULL; diff --git a/client/src/emv/emv_pki_priv.c b/client/src/emv/emv_pki_priv.c index c559bd6c1..5fb3ed620 100644 --- a/client/src/emv/emv_pki_priv.c +++ b/client/src/emv/emv_pki_priv.c @@ -90,15 +90,15 @@ static struct tlvdb *emv_pki_sign_message(const struct crypto_pk *cp, ... /* A list of tlv pointers, end with NULL */ ) { size_t tmp_len = (crypto_pk_get_nbits(cp) + 7) / 8; - unsigned char *tmp = malloc(tmp_len); - if (!tmp) + unsigned char *tmp = calloc(1, tmp_len); + if (!tmp) { return NULL; + } // XXX struct crypto_hash *ch = crypto_hash_open(HASH_SHA_1); if (!ch) { free(tmp); - return NULL; } @@ -179,7 +179,7 @@ static struct tlvdb *emv_pki_sign_key(const struct crypto_pk *cp, const struct tlv *add_tlv ) { unsigned pos = 0; - unsigned char *msg = malloc(1 + pan_len + 2 + 3 + 1 + 1 + 1 + 1 + ipk->mlen); + unsigned char *msg = calloc(1, 1 + pan_len + 2 + 3 + 1 + 1 + 1 + 1 + ipk->mlen); if (!msg) return NULL; @@ -235,7 +235,7 @@ struct tlvdb *emv_pki_sign_icc_pe_cert(const struct crypto_pk *cp, struct emv_pk struct tlvdb *emv_pki_sign_dac(const struct crypto_pk *cp, const struct tlv *dac_tlv, const struct tlv *sda_tlv) { unsigned pos = 0; - unsigned char *msg = malloc(1 + 1 + dac_tlv->len); + unsigned char *msg = calloc(1, 1 + 1 + dac_tlv->len); if (!msg) return NULL; @@ -258,7 +258,7 @@ struct tlvdb *emv_pki_sign_dac(const struct crypto_pk *cp, const struct tlv *dac struct tlvdb *emv_pki_sign_idn(const struct crypto_pk *cp, const struct tlv *idn_tlv, const struct tlv *dyn_tlv) { unsigned pos = 0; - unsigned char *msg = malloc(1 + 1 + 1 + 1 + idn_tlv->len); + unsigned char *msg = calloc(1, 1 + 1 + 1 + 1 + idn_tlv->len); if (!msg) return NULL; diff --git a/client/src/emv/test/cda_test.c b/client/src/emv/test/cda_test.c index c9a8323b6..0ab49f3ca 100644 --- a/client/src/emv/test/cda_test.c +++ b/client/src/emv/test/cda_test.c @@ -23,7 +23,7 @@ #endif #include // memcpy -#include // malloc +#include // calloc #include "cda_test.h" #include "../emv_pk.h" @@ -181,7 +181,7 @@ static int cda_test_raw(bool verbose) { } size_t ipk_pk_len = ipk_data[13]; - unsigned char *ipk_pk = malloc(ipk_pk_len); + unsigned char *ipk_pk = calloc(1, ipk_pk_len); memcpy(ipk_pk, ipk_data + 15, ipk_data_len - 36); memcpy(ipk_pk + ipk_data_len - 36, c_issuer_rem, sizeof(c_issuer_rem)); @@ -240,7 +240,7 @@ static int cda_test_raw(bool verbose) { } size_t iccpk_pk_len = iccpk_data[19]; - unsigned char *iccpk_pk = malloc(iccpk_pk_len); + unsigned char *iccpk_pk = calloc(1, iccpk_pk_len); memcpy(iccpk_pk, iccpk_data + 21, /*iccpk_data_len - 36*/iccpk_pk_len); /*memcpy(iccpk_pk + iccpk_data_len - 36, icc_rem, sizeof(icc_rem));*/ diff --git a/client/src/emv/test/crypto_test.c b/client/src/emv/test/crypto_test.c index 5e6bcaac4..332203ad1 100644 --- a/client/src/emv/test/crypto_test.c +++ b/client/src/emv/test/crypto_test.c @@ -23,7 +23,7 @@ #endif #include // memcpy -#include // malloc +#include // calloc #include #include "crypto_test.h" diff --git a/client/src/emv/test/dda_test.c b/client/src/emv/test/dda_test.c index 6a6b91bab..9b56a4096 100644 --- a/client/src/emv/test/dda_test.c +++ b/client/src/emv/test/dda_test.c @@ -23,7 +23,7 @@ #endif #include // memcpy -#include // malloc +#include // calloc #include "dda_test.h" #include "../emv_pk.h" @@ -169,7 +169,7 @@ static int dda_test_raw(bool verbose) { } size_t ipk_pk_len = ipk_data[13]; - unsigned char *ipk_pk = malloc(ipk_pk_len); + unsigned char *ipk_pk = calloc(1, ipk_pk_len); memcpy(ipk_pk, ipk_data + 15, ipk_data_len - 36); memcpy(ipk_pk + ipk_data_len - 36, d_issuer_rem, sizeof(d_issuer_rem)); @@ -228,7 +228,7 @@ static int dda_test_raw(bool verbose) { } size_t iccpk_pk_len = iccpk_data[19]; - unsigned char *iccpk_pk = malloc(iccpk_pk_len); + unsigned char *iccpk_pk = calloc(1, iccpk_pk_len); memcpy(iccpk_pk, iccpk_data + 21, /*iccpk_data_len - 36*/iccpk_pk_len); /*memcpy(iccpk_pk + iccpk_data_len - 36, icc_rem, sizeof(icc_rem));*/ diff --git a/client/src/emv/test/sda_test.c b/client/src/emv/test/sda_test.c index bf64e6cb4..ebf5f1015 100644 --- a/client/src/emv/test/sda_test.c +++ b/client/src/emv/test/sda_test.c @@ -131,7 +131,7 @@ static int sda_test_raw(bool verbose) { } size_t ipk_pk_len = ipk_data[13]; - unsigned char *ipk_pk = malloc(ipk_pk_len); + unsigned char *ipk_pk = calloc(1, ipk_pk_len); memcpy(ipk_pk, ipk_data + 15, ipk_data_len - 36); memcpy(ipk_pk + ipk_data_len - 36, issuer_rem, sizeof(issuer_rem)); diff --git a/client/src/emv/tlv.c b/client/src/emv/tlv.c index 884e340b3..64a3c0a1b 100644 --- a/client/src/emv/tlv.c +++ b/client/src/emv/tlv.c @@ -26,6 +26,7 @@ #include #include +#include #define TLV_TAG_CLASS_MASK 0xc0 #define TLV_TAG_COMPLEX 0x20 @@ -163,7 +164,7 @@ static struct tlvdb *tlvdb_parse_children(struct tlvdb *parent) { struct tlvdb *tlvdb, *first = NULL, *prev = NULL; while (left != 0) { - tlvdb = malloc(sizeof(*tlvdb)); + tlvdb = calloc(1, sizeof(*tlvdb)); if (prev) prev->next = tlvdb; else @@ -192,7 +193,7 @@ struct tlvdb *tlvdb_parse(const unsigned char *buf, size_t len) { if (!len || !buf) return NULL; - root = malloc(sizeof(*root) + len); + root = calloc(1, sizeof(*root) + len); root->len = len; memcpy(root->buf, buf, len); @@ -221,7 +222,7 @@ struct tlvdb *tlvdb_parse_multi(const unsigned char *buf, size_t len) { if (!len || !buf) return NULL; - root = malloc(sizeof(*root) + len); + root = calloc(1, sizeof(*root) + len); root->len = len; memcpy(root->buf, buf, len); @@ -232,7 +233,7 @@ struct tlvdb *tlvdb_parse_multi(const unsigned char *buf, size_t len) { goto err; while (left != 0) { - struct tlvdb *db = malloc(sizeof(*db)); + struct tlvdb *db = calloc(1, sizeof(*db)); if (!tlvdb_parse_one(db, NULL, &tmp, &left)) { free(db); goto err; @@ -250,7 +251,7 @@ err: } struct tlvdb *tlvdb_fixed(tlv_tag_t tag, size_t len, const unsigned char *value) { - struct tlvdb_root *root = malloc(sizeof(*root) + len); + struct tlvdb_root *root = calloc(1, sizeof(*root) + len); root->len = len; memcpy(root->buf, value, len); @@ -264,7 +265,7 @@ struct tlvdb *tlvdb_fixed(tlv_tag_t tag, size_t len, const unsigned char *value) } struct tlvdb *tlvdb_external(tlv_tag_t tag, size_t len, const unsigned char *value) { - struct tlvdb_root *root = malloc(sizeof(*root)); + struct tlvdb_root *root = calloc(1, sizeof(*root)); root->len = 0; @@ -489,7 +490,7 @@ unsigned char *tlv_encode(const struct tlv *tlv, size_t *len) { else size += 1; - data = malloc(size); + data = calloc(1, size); if (!data) { *len = 0; return NULL; diff --git a/client/src/pm3_pywrap.c b/client/src/pm3_pywrap.c index a289475a3..7837fb5e2 100644 --- a/client/src/pm3_pywrap.c +++ b/client/src/pm3_pywrap.c @@ -1912,7 +1912,7 @@ SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { - void *pack = malloc(size); + void *pack = calloc(1, size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; diff --git a/client/src/uart/uart_posix.c b/client/src/uart/uart_posix.c index b49458cb7..b2a858e09 100644 --- a/client/src/uart/uart_posix.c +++ b/client/src/uart/uart_posix.c @@ -82,7 +82,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) { char *prefix = strdup(pcPortName); if (prefix == NULL) { - PrintAndLogEx(ERR, "error: malloc"); + PrintAndLogEx(ERR, "error: string duplication"); free(sp); return INVALID_SERIAL_PORT; } @@ -100,7 +100,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) { char *addrstr = strdup(pcPortName + 4); if (addrstr == NULL) { - PrintAndLogEx(ERR, "error: malloc"); + PrintAndLogEx(ERR, "error: string duplication"); free(sp); return INVALID_SERIAL_PORT; } @@ -175,7 +175,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) { char *addrstr = strndup(pcPortName + 3, 17); if (addrstr == NULL) { - PrintAndLogEx(ERR, "error: malloc"); + PrintAndLogEx(ERR, "error: string duplication"); free(sp); return INVALID_SERIAL_PORT; } diff --git a/common/crapto1/crapto1.c b/common/crapto1/crapto1.c index 7d06fee39..6715b12ed 100644 --- a/common/crapto1/crapto1.c +++ b/common/crapto1/crapto1.c @@ -141,9 +141,9 @@ struct Crypto1State *lfsr_recovery32(uint32_t ks2, uint32_t in) { for (i = 30; i >= 0; i -= 2) eks = eks << 1 | BEBIT(ks2, i); - odd_head = odd_tail = malloc(sizeof(uint32_t) << 21); - even_head = even_tail = malloc(sizeof(uint32_t) << 21); - statelist = malloc(sizeof(struct Crypto1State) << 18); + odd_head = odd_tail = calloc(1, sizeof(uint32_t) << 21); + even_head = even_tail = calloc(1, sizeof(uint32_t) << 21); + statelist = calloc(1, sizeof(struct Crypto1State) << 18); if (!odd_tail-- || !even_tail-- || !statelist) { free(statelist); statelist = 0; @@ -157,7 +157,7 @@ struct Crypto1State *lfsr_recovery32(uint32_t ks2, uint32_t in) { for (i = 0; i < 2; i++) { for (uint32_t j = 0; j <= 0xff; j++) { - bucket[i][j].head = malloc(sizeof(uint32_t) << 14); + bucket[i][j].head = calloc(1, sizeof(uint32_t) << 14); if (!bucket[i][j].head) { goto out; } @@ -227,7 +227,7 @@ struct Crypto1State *lfsr_recovery64(uint32_t ks2, uint32_t ks3) { uint32_t *tail, table[1 << 16]; int i, j; - sl = statelist = malloc(sizeof(struct Crypto1State) << 4); + sl = statelist = calloc(1, sizeof(struct Crypto1State) << 4); if (!sl) return 0; sl->odd = sl->even = 0; @@ -488,7 +488,7 @@ struct Crypto1State *lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8] odd = lfsr_prefix_ks(ks, 1); even = lfsr_prefix_ks(ks, 0); - s = statelist = malloc((sizeof * statelist) << 24); // was << 20. Need more for no_par special attack. Enough??? + s = statelist = calloc(1, (sizeof * statelist) << 24); // was << 20. Need more for no_par special attack. Enough??? if (!s || !odd || !even) { free(statelist); statelist = 0; diff --git a/common/lfdemod.c b/common/lfdemod.c index 8314206d0..738b2060d 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -1340,7 +1340,7 @@ bool DetectST(uint8_t *buffer, size_t *size, int *foundclock, size_t *ststart, s int tol = 0; int j = 0, high, low, skip = 0, start = 0, end = 0, minClk = 255; size_t i = 0; - //probably should malloc... || test if memory is available ... handle device side? memory danger!!! [marshmellow] + //probably should calloc... || test if memory is available ... handle device side? memory danger!!! [marshmellow] int tmpbuff[bufsize / LOWEST_DEFAULT_CLOCK]; // low to low wave count //guess rf/32 clock, if click is smaller we will only have room for a fraction of the samples captured int waveLen[bufsize / LOWEST_DEFAULT_CLOCK]; // high to low wave count //if clock is larger then we waste memory in array size that is not needed... //size_t testsize = (bufsize < 512) ? bufsize : 512; diff --git a/tools/hitag2crack/crack2/ht2crack2buildtable.c b/tools/hitag2crack/crack2/ht2crack2buildtable.c index 5454b0717..a8f576f5f 100644 --- a/tools/hitag2crack/crack2/ht2crack2buildtable.c +++ b/tools/hitag2crack/crack2/ht2crack2buildtable.c @@ -60,9 +60,9 @@ static void create_table(struct table *tt, int d_1, int d_2) { } // create some space - tt->data = (unsigned char *)malloc(DATAMAX); + tt->data = (unsigned char *)calloc(1, DATAMAX); if (!(tt->data)) { - printf("create_table: cannot malloc data\n"); + printf("create_table: cannot calloc data\n"); exit(1); } @@ -373,9 +373,9 @@ static void *sorttable(void *dd) { int space = 0x100 / NUM_SORT_THREADS; // create table - 50MB should be enough - unsigned char *table = (unsigned char *)malloc(50UL * 1024UL * 1024UL); + unsigned char *table = (unsigned char *)calloc(1, 50UL * 1024UL * 1024UL); if (!table) { - printf("sorttable: cannot malloc table\n"); + printf("sorttable: cannot calloc table\n"); exit(1); } diff --git a/tools/hitag2crack/crack2/ht2crack2search.c b/tools/hitag2crack/crack2/ht2crack2search.c index f9d4a779b..c775f7011 100644 --- a/tools/hitag2crack/crack2/ht2crack2search.c +++ b/tools/hitag2crack/crack2/ht2crack2search.c @@ -59,9 +59,9 @@ static int loadrngdata(struct rngdata *r, char *file) { r->len = filestat.st_size / 2; // printf("r->len = %d\n", r->len); - r->data = (unsigned char *)malloc(r->len); + r->data = (unsigned char *)calloc(1, r->len); if (!(r->data)) { - printf("cannot malloc\n"); + printf("cannot calloc\n"); exit(1); } diff --git a/tools/hitag2crack/crack3/ht2crack3.c b/tools/hitag2crack/crack3/ht2crack3.c index b341aedce..a81d33d40 100644 --- a/tools/hitag2crack/crack3/ht2crack3.c +++ b/tools/hitag2crack/crack3/ht2crack3.c @@ -332,9 +332,9 @@ int main(int argc, char *argv[]) { // read in nR aR pairs numnrar = 0; - buf = (char *)malloc(lenbuf); + buf = (char *)calloc(1, lenbuf); if (!buf) { - printf("cannot malloc buf\n"); + printf("cannot calloc buf\n"); exit(1); } @@ -368,9 +368,9 @@ int main(int argc, char *argv[]) { printf("Loaded %u NrAr pairs\n", numnrar); // create table of thread data - tdata = (struct threaddata *)malloc(sizeof(struct threaddata) * NUM_THREADS); + tdata = (struct threaddata *)calloc(1, sizeof(struct threaddata) * NUM_THREADS); if (!tdata) { - printf("cannot malloc threaddata\n"); + printf("cannot calloc threaddata\n"); exit(1); } diff --git a/tools/hitag2crack/crack4/ht2crack4.c b/tools/hitag2crack/crack4/ht2crack4.c index f4ebb2459..3c2680692 100644 --- a/tools/hitag2crack/crack4/ht2crack4.c +++ b/tools/hitag2crack/crack4/ht2crack4.c @@ -225,9 +225,9 @@ static uint64_t packstate(uint64_t s) { /* create_guess_table mallocs the tables */ static void create_guess_table(void) { - guesses = (struct guess *)malloc(sizeof(struct guess) * maxtablesize); + guesses = (struct guess *)calloc(1, sizeof(struct guess) * maxtablesize); if (!guesses) { - printf("cannot malloc guess table\n"); + printf("cannot allocate memory for guess table\n"); exit(1); } } @@ -264,9 +264,9 @@ static void init_guess_table(char *filename, char *uidstr) { } num_nRaR = 0; - buf = (char *)malloc(lenbuf); + buf = (char *)calloc(1, lenbuf); if (!buf) { - printf("cannot malloc buf\n"); + printf("cannot calloc buf\n"); exit(1); } diff --git a/tools/hitag2crack/crack5gpu/ht2crack5gpu.c b/tools/hitag2crack/crack5gpu/ht2crack5gpu.c index 9074d8bd1..77d470f22 100644 --- a/tools/hitag2crack/crack5gpu/ht2crack5gpu.c +++ b/tools/hitag2crack/crack5gpu/ht2crack5gpu.c @@ -261,9 +261,9 @@ int main(int argc, char *argv[]) { exit(1); } - ctx.kernelSource = (char *)malloc(filestat.st_size); + ctx.kernelSource = (char *)calloc(1, filestat.st_size); if (!ctx.kernelSource) { - printf("Cannot malloc kernelSource\n"); + printf("Cannot calloc kernelSource\n"); exit(1); } diff --git a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c index 74fbd3764..da23bd451 100644 --- a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c +++ b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c @@ -413,9 +413,9 @@ int main(int argc, char **argv) { int freeListIdx = 0; // todo, calculate the max number of allocations to remove 0x40 - void **freeList = (void **) malloc(0x40 * sizeof(void *)); + void **freeList = (void **) calloc(1, 0x40 * sizeof(void *)); if (!freeList) { - printf("Error: malloc (freeList) failed (%d): %s\n", errno, strerror(errno)); + printf("Error: calloc (freeList) failed (%d): %s\n", errno, strerror(errno)); exit(3); } diff --git a/tools/hitag2crack/crack5opencl/queue.c b/tools/hitag2crack/crack5opencl/queue.c index fcb1f3a0a..606394d42 100644 --- a/tools/hitag2crack/crack5opencl/queue.c +++ b/tools/hitag2crack/crack5opencl/queue.c @@ -249,9 +249,9 @@ int wu_queue_push(wu_queue_ctx_t *ctx, size_t id, size_t off, size_t max) { if (ctx->queue_head == 0) first = 1; - if (!(ptr = (wu_queue_item_t *) malloc(sizeof(wu_queue_item_t)))) { + if (!(ptr = (wu_queue_item_t *) calloc(1, sizeof(wu_queue_item_t)))) { #if TEST_UNIT == 1 - fprintf(stderr, "! Error: malloc() failed (%d): %s\n", errno, strerror(errno)); + fprintf(stderr, "! Error: calloc() failed (%d): %s\n", errno, strerror(errno)); #endif pthread_mutex_unlock(&ctx->queue_mutex); return ERROR_ALLOC; diff --git a/tools/mf_nonce_brute/mf_nonce_brute.c b/tools/mf_nonce_brute/mf_nonce_brute.c index 35edc9387..32b4d9bd6 100644 --- a/tools/mf_nonce_brute/mf_nonce_brute.c +++ b/tools/mf_nonce_brute/mf_nonce_brute.c @@ -641,7 +641,7 @@ int main(int argc, char *argv[]) { // threads for (int i = 0; i < thread_count; ++i) { - struct thread_key_args *b = malloc(sizeof(struct thread_key_args)); + struct thread_key_args *b = calloc(1, sizeof(struct thread_key_args)); b->thread = i; b->idx = i; b->uid = uid; From 61c9252e15cef7f2f3951bac7fbeb0572d153c5c Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 00:35:43 +0100 Subject: [PATCH 32/73] calloc --- client/deps/hardnested/hardnested_bf_core.c | 2 +- client/deps/hardnested/hardnested_bruteforce.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/deps/hardnested/hardnested_bf_core.c b/client/deps/hardnested/hardnested_bf_core.c index 0e7eabaf5..76beb9873 100644 --- a/client/deps/hardnested/hardnested_bf_core.c +++ b/client/deps/hardnested/hardnested_bf_core.c @@ -238,7 +238,7 @@ uint64_t CRACK_STATES_BITSLICED(uint32_t cuid, uint8_t *best_first_bytes, statel memset(bs_zeroes.bytes, 0x00, VECTOR_SIZE); // bitslice all the even states - bitslice_t **restrict bitsliced_even_states = (bitslice_t **)malloc(((p->len[EVEN_STATE] - 1) / MAX_BITSLICES + 1) * sizeof(bitslice_t *)); + bitslice_t **restrict bitsliced_even_states = (bitslice_t **)calloc(1, ((p->len[EVEN_STATE] - 1) / MAX_BITSLICES + 1) * sizeof(bitslice_t *)); if (bitsliced_even_states == NULL) { PrintAndLogEx(WARNING, "Out of memory error in brute_force. Aborting..."); exit(4); diff --git a/client/deps/hardnested/hardnested_bruteforce.c b/client/deps/hardnested/hardnested_bruteforce.c index 71ff09144..2516f150e 100644 --- a/client/deps/hardnested/hardnested_bruteforce.c +++ b/client/deps/hardnested/hardnested_bruteforce.c @@ -436,8 +436,8 @@ static bool read_bench_data(statelist_t *test_candidates) { float brute_force_benchmark(void) { statelist_t test_candidates[NUM_BRUTE_FORCE_THREADS]; - test_candidates[0].states[ODD_STATE] = malloc((TEST_BENCH_SIZE + 1) * sizeof(uint32_t)); - test_candidates[0].states[EVEN_STATE] = malloc((TEST_BENCH_SIZE + 1) * sizeof(uint32_t)); + test_candidates[0].states[ODD_STATE] = calloc(1, (TEST_BENCH_SIZE + 1) * sizeof(uint32_t)); + test_candidates[0].states[EVEN_STATE] = calloc(1, (TEST_BENCH_SIZE + 1) * sizeof(uint32_t)); for (uint8_t i = 0; i < NUM_BRUTE_FORCE_THREADS - 1; i++) { test_candidates[i].next = test_candidates + i + 1; test_candidates[i + 1].states[ODD_STATE] = test_candidates[0].states[ODD_STATE]; From 0942ce7a684d3a2e2c450047da9ab73cc9f84bc6 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:34:54 +0100 Subject: [PATCH 33/73] refactory parity files a bit --- armsrc/Makefile | 1 - client/CMakeLists.txt | 1 - client/Makefile | 1 - client/android/CMakeLists.txt | 1 - client/experimental_lib/CMakeLists.txt | 1 - client/src/cmdhffelica.c | 8 +--- common/parity.c | 57 -------------------------- common/parity.h | 36 ++++++++++++---- 8 files changed, 30 insertions(+), 76 deletions(-) delete mode 100644 common/parity.c diff --git a/armsrc/Makefile b/armsrc/Makefile index a797cddb9..968dc445d 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -155,7 +155,6 @@ THUMBSRC = start.c \ # These are to be compiled in ARM mode ARMSRC = fpgaloader.c \ - parity.c \ usb_cdc.c \ cmd.c diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 454bbdd7d..26d5c16bd 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -189,7 +189,6 @@ add_subdirectory(${PM3_ROOT}/client/deps deps) set (TARGET_SOURCES ${PM3_ROOT}/common/commonutil.c ${PM3_ROOT}/common/util_posix.c - ${PM3_ROOT}/common/parity.c ${PM3_ROOT}/common/bucketsort.c ${PM3_ROOT}/common/crapto1/crapto1.c ${PM3_ROOT}/common/crapto1/crypto1.c diff --git a/client/Makefile b/client/Makefile index 08b935919..0b74919c2 100644 --- a/client/Makefile +++ b/client/Makefile @@ -660,7 +660,6 @@ SRCS += bucketsort.c \ iso15693tools.c \ legic_prng.c \ lfdemod.c \ - parity.c \ util_posix.c # swig diff --git a/client/android/CMakeLists.txt b/client/android/CMakeLists.txt index e8c9f9e3c..3148436ac 100644 --- a/client/android/CMakeLists.txt +++ b/client/android/CMakeLists.txt @@ -57,7 +57,6 @@ endif () add_library(pm3rrg_rdv4 SHARED ${PM3_ROOT}/common/commonutil.c ${PM3_ROOT}/common/util_posix.c - ${PM3_ROOT}/common/parity.c ${PM3_ROOT}/common/bucketsort.c ${PM3_ROOT}/common/crapto1/crapto1.c ${PM3_ROOT}/common/crapto1/crypto1.c diff --git a/client/experimental_lib/CMakeLists.txt b/client/experimental_lib/CMakeLists.txt index b39ede6fe..8e0e68621 100644 --- a/client/experimental_lib/CMakeLists.txt +++ b/client/experimental_lib/CMakeLists.txt @@ -190,7 +190,6 @@ add_subdirectory(${PM3_ROOT}/client/deps deps) set (TARGET_SOURCES ${PM3_ROOT}/common/commonutil.c ${PM3_ROOT}/common/util_posix.c - ${PM3_ROOT}/common/parity.c ${PM3_ROOT}/common/bucketsort.c ${PM3_ROOT}/common/crapto1/crapto1.c ${PM3_ROOT}/common/crapto1/crypto1.c diff --git a/client/src/cmdhffelica.c b/client/src/cmdhffelica.c index 0f67fc8f6..6b2d3e92e 100644 --- a/client/src/cmdhffelica.c +++ b/client/src/cmdhffelica.c @@ -177,12 +177,6 @@ static int print_authentication2(void) { static const char *felica_model_name(uint8_t rom_type, uint8_t ic_type) { // source: mainly https://www.sony.net/Products/felica/business/tech-support/list.html - - if (ic_type >= 0x14 && ic_type <= 0x1F) { - return "FeliCa Mobile IC Chip V3.0"; - } - - switch (ic_type) { // FeliCa Standard Products: case 0x46: @@ -239,7 +233,7 @@ static const char *felica_model_name(uint8_t rom_type, uint8_t ic_type) { case 0x1D: case 0x1E: case 0x1F: - return "Mobile FeliCa IC Chip V3.0"; + return "FeliCa Mobile IC Chip V3.0"; case 0x10: case 0x11: case 0x12: diff --git a/common/parity.c b/common/parity.c deleted file mode 100644 index cae62914b..000000000 --- a/common/parity.c +++ /dev/null @@ -1,57 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- -// parity functions (all defined in parity.h) -//----------------------------------------------------------------------------- -#include "parity.h" - -const uint8_t g_OddByteParity[256] = { - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1 -}; -/* -const uint8_t EvenByteParity[256] = { - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 -}; -*/ diff --git a/common/parity.h b/common/parity.h index 82ca85c9f..3694c515a 100644 --- a/common/parity.h +++ b/common/parity.h @@ -23,20 +23,42 @@ #include "common.h" -extern const uint8_t g_OddByteParity[256]; +static const uint8_t g_odd_byte_parity[256] = { + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1 +}; + +//extern const uint8_t OddByteParity[256]; + +#define ODD_PARITY8(x) { g_odd_byte_parity[x] } +#define EVEN_PARITY8(x) { !g_odd_byte_parity[x] } static inline uint8_t oddparity8(const uint8_t x) { - return g_OddByteParity[x]; + return g_odd_byte_parity[x]; } static inline uint8_t evenparity8(const uint8_t x) { - return !g_OddByteParity[x]; + return !g_odd_byte_parity[x]; } static inline uint8_t evenparity16(uint16_t x) { #if !defined __GNUC__ x ^= x >> 8; - return evenparity8(x); + return EVEN_PARITY8(x) ; #else return (__builtin_parity(x) & 0xFF); #endif @@ -45,7 +67,7 @@ static inline uint8_t evenparity16(uint16_t x) { static inline uint8_t oddparity16(uint16_t x) { #if !defined __GNUC__ x ^= x >> 8; - return oddparity8(x); + return ODD_PARITY8(x); #else return !__builtin_parity(x); #endif @@ -55,7 +77,7 @@ static inline uint8_t evenparity32(uint32_t x) { #if !defined __GNUC__ x ^= x >> 16; x ^= x >> 8; - return evenparity8(x); + return EVEN_PARITY8(x); #else return (__builtin_parity(x) & 0xFF); #endif @@ -65,7 +87,7 @@ static inline uint8_t oddparity32(uint32_t x) { #if !defined __GNUC__ x ^= x >> 16; x ^= x >> 8; - return oddparity8(x); + return ODD_PARITY8(x); #else return !__builtin_parity(x); #endif From abacf673dced8638c3a39f02a7f6b126dcd9414a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:35:16 +0100 Subject: [PATCH 34/73] cppcheck fixes --- client/src/cmdanalyse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/cmdanalyse.c b/client/src/cmdanalyse.c index 716107956..5de3bc063 100644 --- a/client/src/cmdanalyse.c +++ b/client/src/cmdanalyse.c @@ -1189,11 +1189,11 @@ static int CmdAnalyseUnits(const char *Cmd) { PrintAndLogEx(INFO, " 32 SSP = %u ETU (expect 1) " _GREEN_("ok"), SSP_TO_ETU(32)); } else if (etu) { - PrintAndLogEx(INFO, " %d ETU = %u us ", ETU_TO_US(etu)); - PrintAndLogEx(INFO, " %d ETU = %u SSP ", ETU_TO_SSP(etu)); + PrintAndLogEx(INFO, " %d ETU = %u us ", ETU_TO_US(etu), 0); + PrintAndLogEx(INFO, " %d ETU = %u SSP ", ETU_TO_SSP(etu), 0); } else if (us) { - PrintAndLogEx(INFO, " %d us = %u ETU ", US_TO_ETU(us)); - PrintAndLogEx(INFO, " %d us = %u SSP ", US_TO_SSP(us)); + PrintAndLogEx(INFO, " %d us = %u ETU ", US_TO_ETU(us), 0); + PrintAndLogEx(INFO, " %d us = %u SSP ", US_TO_SSP(us), 0); } return PM3_SUCCESS; From 28efc8b09747088a0d1871aec181f49feede879f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:36:29 +0100 Subject: [PATCH 35/73] hf mf darkside - textual adaptation to current style --- client/src/cmdhfmf.c | 24 ++++++++++++------------ client/src/mifare/mifarehost.c | 28 +++++++++++++++------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 13cbc248d..2d9f05fb3 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -314,7 +314,6 @@ static int CmdHF14AMfAcl(const char *Cmd) { return PM3_SUCCESS; } - static int CmdHF14AMfDarkside(const char *Cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "hf mf darkside", @@ -343,31 +342,32 @@ static int CmdHF14AMfDarkside(const char *Cmd) { CLIParserFree(ctx); uint64_t key = 0; - + uint64_t t1 = msclock(); int isOK = mfDarkside(blockno, key_type, &key); - PrintAndLogEx(NORMAL, ""); + t1 = msclock() - t1; + switch (isOK) { case -1 : - PrintAndLogEx(WARNING, "button pressed. Aborted."); + PrintAndLogEx(WARNING, "button pressed, aborted"); return PM3_ESOFT; case -2 : - PrintAndLogEx(FAILED, "card is not vulnerable to Darkside attack (doesn't send NACK on authentication requests)."); + PrintAndLogEx(FAILED, "card is not vulnerable to Darkside attack (doesn't send NACK on authentication requests)"); return PM3_ESOFT; case -3 : - PrintAndLogEx(FAILED, "card is not vulnerable to Darkside attack (its random number generator is not predictable)."); + PrintAndLogEx(FAILED, "card is not vulnerable to Darkside attack (its random number generator is not predictable)"); return PM3_ESOFT; case -4 : PrintAndLogEx(FAILED, "card is not vulnerable to Darkside attack (its random number generator seems to be based on the wellknown"); - PrintAndLogEx(FAILED, "generating polynomial with 16 effective bits only, but shows unexpected behaviour."); - return PM3_ESOFT; - case -5 : - PrintAndLogEx(WARNING, "aborted via keyboard."); + PrintAndLogEx(FAILED, "generating polynomial with 16 effective bits only, but shows unexpected behaviour"); return PM3_ESOFT; + case PM3_EOPABORTED : + PrintAndLogEx(WARNING, "aborted via keyboard"); + return PM3_EOPABORTED; default : - PrintAndLogEx(SUCCESS, "found valid key: "_YELLOW_("%012" PRIx64), key); + PrintAndLogEx(SUCCESS, "found valid key: "_GREEN_("%012" PRIx64), key); break; } - PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, "time in darkside " _YELLOW_("%.0f") " seconds\n",(float)t1 / 1000.0); return PM3_SUCCESS; } diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 860d19f0e..8c4aa87fd 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -44,10 +44,8 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) { bool first_run = true; // message - PrintAndLogEx(INFO, "--------------------------------------------------------------------------------"); - PrintAndLogEx(INFO, "Executing darkside attack. Expected execution time: 25sec on average"); - PrintAndLogEx(INFO, "press pm3-button on the Proxmark3 device to abort both Proxmark3 and client"); - PrintAndLogEx(INFO, "--------------------------------------------------------------------------------"); + PrintAndLogEx(INFO, "Expected execution time is about 25seconds on average"); + PrintAndLogEx(INFO, "Press pm3-button to abort"); while (true) { clearCommandBuffer(); @@ -63,16 +61,19 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) { //flush queue while (kbd_enter_pressed()) { + SendCommandNG(CMD_BREAK_LOOP, NULL, 0); return PM3_EOPABORTED; } - PrintAndLogEx(INFO, "." NOLF); + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(INFO, "Running darkside " NOLF); // wait cycle while (true) { PrintAndLogEx(NORMAL, "." NOLF); if (kbd_enter_pressed()) { + SendCommandNG(CMD_BREAK_LOOP, NULL, 0); return PM3_EOPABORTED; } @@ -112,7 +113,7 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) { break; } } - PrintAndLogEx(NORMAL, "\n"); + PrintAndLogEx(NORMAL, ""); if (par_list == 0 && first_run == true) { PrintAndLogEx(SUCCESS, "Parity is all zero. Most likely this card sends NACK on every authentication."); @@ -122,8 +123,9 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) { uint32_t keycount = nonce2key(uid, nt, nr, ar, par_list, ks_list, &keylist); if (keycount == 0) { - PrintAndLogEx(FAILED, "key not found (lfsr_common_prefix list is null). Nt=%08x", nt); - PrintAndLogEx(FAILED, "this is expected to happen in 25%% of all cases. Trying again with a different reader nonce..."); + PrintAndLogEx(FAILED, "Key not found (lfsr_common_prefix list is null). Nt = %08x", nt); + PrintAndLogEx(FAILED, "This is expected to happen in 25%% of all cases."); + PrintAndLogEx(FAILED, "Trying again with a different reader nonce..."); continue; } @@ -134,12 +136,12 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) { if (keycount == 0) { free(last_keylist); last_keylist = keylist; - PrintAndLogEx(FAILED, "no candidates found, trying again"); + PrintAndLogEx(FAILED, "No candidates found, trying again"); continue; } } - PrintAndLogEx(SUCCESS, "found " _YELLOW_("%u") " candidate key%s", keycount, (keycount > 1) ? "s." : "."); + PrintAndLogEx(SUCCESS, "found " _YELLOW_("%u") " candidate key%s", keycount, (keycount > 1) ? "s" : ""); *key = UINT64_C(-1); uint8_t keyBlock[PM3_CMD_DATA_SIZE]; @@ -164,7 +166,7 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) { if (*key != UINT64_C(-1)) { break; } else { - PrintAndLogEx(FAILED, "all key candidates failed. Restarting darkside attack"); + PrintAndLogEx(FAILED, "All key candidates failed. Restarting darkside"); free(last_keylist); last_keylist = keylist; first_run = true; @@ -555,7 +557,7 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, free(statelists[1].head.slhead); num_to_bytes(key64, 6, resultKey); - PrintAndLogEx(SUCCESS, "\ntarget block: %3u key type: %c -- found valid key [ " _GREEN_("%s") " ]", + PrintAndLogEx(SUCCESS, "\ntarget block %4u key type %c -- found valid key [ " _GREEN_("%s") " ]", package->block, package->keytype ? 'B' : 'A', sprint_hex_inrow(resultKey, 6) @@ -568,7 +570,7 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, } out: - PrintAndLogEx(SUCCESS, "\ntarget block: %3u key type: %c", + PrintAndLogEx(SUCCESS, "\ntarget block %4u key type %c", package->block, package->keytype ? 'B' : 'A' ); From 0967ea19893574e269edef27cad1a85b97f60426 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:37:35 +0100 Subject: [PATCH 36/73] modified the default mfc hardcoded list to contain some more keys --- client/src/mifare/mifaredefault.h | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/client/src/mifare/mifaredefault.h b/client/src/mifare/mifaredefault.h index ac78aedfa..50fa1c5ee 100644 --- a/client/src/mifare/mifaredefault.h +++ b/client/src/mifare/mifaredefault.h @@ -25,9 +25,8 @@ static const uint64_t g_mifare_default_keys[] = { 0xffffffffffff, // Default key (first key used by program if no user defined key) 0x000000000000, // Blank key 0xa0a1a2a3a4a5, // NFCForum MAD key + 0xd3f7d3f7d3f7, // NDEF public key 0xb0b1b2b3b4b5, - 0xc0c1c2c3c4c5, - 0xd0d1d2d3d4d5, 0xaabbccddeeff, 0x1a2b3c4d5e6f, 0x123456789abc, @@ -36,7 +35,6 @@ static const uint64_t g_mifare_default_keys[] = { 0xabcdef123456, 0x4d3a99c351dd, 0x1a982c7e459a, - 0xd3f7d3f7d3f7, // NDEF public key 0x714c5c886e97, 0x587ee5f9350f, 0xa0478cc39091, @@ -44,7 +42,28 @@ static const uint64_t g_mifare_default_keys[] = { 0x8fd0a4f256e9, 0x0000014b5c31, 0xb578f38a5c61, - 0x96a301bce267 + 0x96a301bce267, + 0xfc00018778f7, + 0x6471a5ef2d1a, // SimonsVoss + 0x4E3552426B32, // ID06 + 0x6A1987C40A21, // Salto + 0xef1232ab18a0, // Schlage + 0x3B7E4FD575AD, // + 0xb7bf0c13066e, // Gallagher + 0x135b88a94b8b, // Saflock + 0x5a7a52d5e20d, // Bosch + 0x314B49474956, // VIGIK1 A + 0x564c505f4d41, // VIGIK1 B + 0x021209197591, // BTCINO + 0x484558414354, // Intratone + 0xEC0A9B1A9E06, // Vingcard + 0x66b31e64ca4b, // Vingcard + 0x97F5DA640B18, // Bangkok metro key + 0xA8844B0BCA06, // Metro Valencia key + 0xE4410EF8ED2D, // Armenian metro + 0x857464D3AAD1, // HTC Eindhoven key + 0x08B386463229, // troika + 0xe00000000000, // icopy }; static const uint8_t g_mifare_mad_key[] = {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5}; From 7c8be44dd68630c62a7cf5848a798a947ed58e39 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:38:16 +0100 Subject: [PATCH 37/73] cppcheck stuff --- tools/hitag2crack/crack5opencl/threads.c | 27 ++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tools/hitag2crack/crack5opencl/threads.c b/tools/hitag2crack/crack5opencl/threads.c index 3416d6858..50c4c7762 100644 --- a/tools/hitag2crack/crack5opencl/threads.c +++ b/tools/hitag2crack/crack5opencl/threads.c @@ -248,7 +248,9 @@ int thread_start_scheduler(thread_ctx_t *ctx, thread_args_t *t_arg, wu_queue_ctx pthread_mutex_lock(&ctx->thread_mutexs[z]); t_arg[z].status = TH_END; t_arg[z].quit = true; - if (cur_status == TH_WAIT) pthread_cond_signal(&ctx->thread_conds[z]); + if (cur_status == TH_WAIT) { + pthread_cond_signal(&ctx->thread_conds[z]); + } pthread_mutex_unlock(&ctx->thread_mutexs[z]); } else { if (ctx->thread_count == 1) { @@ -306,7 +308,9 @@ int thread_start_scheduler(thread_ctx_t *ctx, thread_args_t *t_arg, wu_queue_ctx printf("[master] thread [%zu], got the signal with new state: %s.\n", z, thread_status_strdesc(t_arg[z].status)); fflush(stdout); #endif - if (t_arg[z].status == TH_FOUND_KEY) found = true; + if (t_arg[z].status == TH_FOUND_KEY) { + found = true; + } pthread_mutex_unlock(&ctx->thread_mutex_usleep); #if TDEBUG >= 1 @@ -316,17 +320,18 @@ int thread_start_scheduler(thread_ctx_t *ctx, thread_args_t *t_arg, wu_queue_ctx continue; } - if (found) { + // since found is handled before this part (line 237), removing the if-statement + // doesn't change anything according to cppcheck. #if TDEBUG >= 1 - printf("[master] thread [%zu], the key is found. set TH_END from TH_PROCESSING\n", z); - fflush(stdout); + printf("[master] thread [%zu], the key is found. set TH_END from TH_PROCESSING\n", z); + fflush(stdout); #endif - pthread_mutex_lock(&ctx->thread_mutexs[z]); - t_arg[z].status = TH_END; - t_arg[z].quit = true; - pthread_mutex_unlock(&ctx->thread_mutexs[z]); - continue; - } + pthread_mutex_lock(&ctx->thread_mutexs[z]); + t_arg[z].status = TH_END; + t_arg[z].quit = true; + pthread_mutex_unlock(&ctx->thread_mutexs[z]); + continue; + } if (cur_status == TH_ERROR) { // something went wrong From 073b47d4806a5be647b50a749e057c2f43f42a72 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:39:37 +0100 Subject: [PATCH 38/73] fix to handle when first_byte_sum does not find a match in the possible sums array. ie, leads to a crash --- client/src/cmdhfmfhard.c | 112 ++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 66 deletions(-) diff --git a/client/src/cmdhfmfhard.c b/client/src/cmdhfmfhard.c index 21de93499..bb2d4b024 100644 --- a/client/src/cmdhfmfhard.c +++ b/client/src/cmdhfmfhard.c @@ -56,9 +56,11 @@ #define DEBUG_KEY_ELIMINATION // #define DEBUG_REDUCTION -static uint16_t sums[NUM_SUMS] = {0, 32, 56, 64, 80, 96, 104, 112, 120, 128, 136, 144, 152, 160, 176, 192, 200, 224, 256}; // possible sum property values +// possible sum property values +static uint16_t sums[NUM_SUMS] = {0, 32, 56, 64, 80, 96, 104, 112, 120, 128, 136, 144, 152, 160, 176, 192, 200, 224, 256}; -#define NUM_PART_SUMS 9 // number of possible partial sum property values +// number of possible partial sum property values +#define NUM_PART_SUMS 9 typedef enum { EVEN_STATE = 0, @@ -79,7 +81,6 @@ static uint64_t known_target_key; static uint32_t test_state[2] = {0, 0}; static float brute_force_per_second; - static void get_SIMD_instruction_set(char *instruction_set) { switch (GetSIMDInstrAuto()) { #if defined(COMPILER_HAS_SIMD_AVX512) @@ -108,7 +109,6 @@ static void get_SIMD_instruction_set(char *instruction_set) { } } - static void print_progress_header(void) { char progress_text[80]; char instr_set[12] = ""; @@ -143,7 +143,6 @@ void hardnested_print_progress(uint32_t nonces, const char *activity, float brut } } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // bitarray functions @@ -243,7 +242,6 @@ static void init_bunzip2(bz_stream *compressed_stream, char *input_buffer, uint3 } - static void init_bitflip_bitarrays(void) { #if defined (DEBUG_REDUCTION) uint8_t line = 0; @@ -372,7 +370,6 @@ static void init_bitflip_bitarrays(void) { hardnested_print_progress(0, progress_text, (float)(1LL << 47), 0); } - static void free_bitflip_bitarrays(void) { for (int16_t bitflip = 0x3ff; bitflip > 0x000; bitflip--) { free_bitarray(bitflip_bitarrays[ODD_STATE][bitflip]); @@ -382,7 +379,6 @@ static void free_bitflip_bitarrays(void) { } } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // sum property bitarrays @@ -413,7 +409,6 @@ static uint16_t PartialSumProperty(uint32_t state, odd_even_t odd_even) { return sum; } - static void init_part_sum_bitarrays(void) { for (odd_even_t odd_even = EVEN_STATE; odd_even <= ODD_STATE; odd_even++) { for (uint16_t part_sum_a0 = 0; part_sum_a0 < NUM_PART_SUMS; part_sum_a0++) { @@ -456,7 +451,6 @@ static void init_part_sum_bitarrays(void) { } } - static void free_part_sum_bitarrays(void) { for (int16_t part_sum_a8 = (NUM_PART_SUMS - 1); part_sum_a8 >= 0; part_sum_a8--) { free_bitarray(part_sum_a8_bitarrays[ODD_STATE][part_sum_a8]); @@ -472,7 +466,6 @@ static void free_part_sum_bitarrays(void) { } } - static void init_sum_bitarrays(void) { for (uint16_t sum_a0 = 0; sum_a0 < NUM_SUMS; sum_a0++) { for (odd_even_t odd_even = EVEN_STATE; odd_even <= ODD_STATE; odd_even++) { @@ -496,7 +489,6 @@ static void init_sum_bitarrays(void) { } - static void free_sum_bitarrays(void) { for (int8_t sum_a0 = NUM_SUMS - 1; sum_a0 >= 0; sum_a0--) { free_bitarray(sum_a0_bitarrays[ODD_STATE][sum_a0]); @@ -504,7 +496,6 @@ static void free_sum_bitarrays(void) { } } - #ifdef DEBUG_KEY_ELIMINATION static char failstr[250] = ""; #endif @@ -512,9 +503,7 @@ static char failstr[250] = ""; static const float p_K0[NUM_SUMS] = { // the probability that a random nonce has a Sum Property K 0.0290, 0.0083, 0.0006, 0.0339, 0.0048, 0.0934, 0.0119, 0.0489, 0.0602, 0.4180, 0.0602, 0.0489, 0.0119, 0.0934, 0.0048, 0.0339, 0.0006, 0.0083, 0.0290 }; - static float my_p_K[NUM_SUMS]; - static const float *p_K; static uint32_t cuid; @@ -534,7 +523,6 @@ static uint64_t sample_period = 0; static uint64_t num_keys_tested = 0; static statelist_t *candidates = NULL; - static int add_nonce(uint32_t nonce_enc, uint8_t par_enc) { uint8_t first_byte = nonce_enc >> 24; noncelistentry_t *p1 = nonces[first_byte].first; @@ -552,15 +540,15 @@ static int add_nonce(uint32_t nonce_enc, uint8_t par_enc) { if (p1 == NULL) { // need to add at the end of the list if (p2 == NULL) { // list is empty yet. Add first entry. - p2 = nonces[first_byte].first = malloc(sizeof(noncelistentry_t)); + p2 = nonces[first_byte].first = calloc(1, sizeof(noncelistentry_t)); } else { // add new entry at end of existing list. - p2 = p2->next = malloc(sizeof(noncelistentry_t)); + p2 = p2->next = calloc(1, sizeof(noncelistentry_t)); } } else if ((p1->nonce_enc & 0x00ff0000) != (nonce_enc & 0x00ff0000)) { // found distinct 2nd byte. Need to insert. if (p2 == NULL) { // need to insert at start of list - p2 = nonces[first_byte].first = malloc(sizeof(noncelistentry_t)); + p2 = nonces[first_byte].first = calloc(1, sizeof(noncelistentry_t)); } else { - p2 = p2->next = malloc(sizeof(noncelistentry_t)); + p2 = p2->next = calloc(1, sizeof(noncelistentry_t)); } } else { // we have seen this 2nd byte before. Nothing to add or insert. return (0); @@ -577,7 +565,6 @@ static int add_nonce(uint32_t nonce_enc, uint8_t par_enc) { return (1); // new nonce added } - static void init_nonce_memory(void) { for (uint16_t i = 0; i < 256; i++) { nonces[i].num = 0; @@ -612,7 +599,6 @@ static void init_nonce_memory(void) { first_byte_Sum = 0; } - static void free_nonce_list(noncelistentry_t *p) { if (p == NULL) { return; @@ -642,13 +628,14 @@ static double p_hypergeometric(uint16_t i_K, uint16_t n, uint16_t k) { // P(X=0) = ----------------------------- // N*(N-1)*...*(N-n+1) - uint16_t const N = 256; uint16_t K = sums[i_K]; + // avoids log(x<=0) in calculation below + if (n - k > N - K || k > K) { + return 0.0; + } - - if (n - k > N - K || k > K) return 0.0; // avoids log(x<=0) in calculation below if (k == 0) { // use logarithms to avoid overflow with huge factorials (double type can only hold 170!) double log_result = 0.0; @@ -680,7 +667,9 @@ static double p_hypergeometric(uint16_t i_K, uint16_t n, uint16_t k) { } static float sum_probability(uint16_t i_K, uint16_t n, uint16_t k) { - if (k > sums[i_K]) return 0.0; + if (k > sums[i_K]) { + return 0.0; + } double p_T_is_k_when_S_is_K = p_hypergeometric(i_K, n, k); double p_S_is_K = p_K[i_K]; @@ -706,7 +695,6 @@ static void init_allbitflips_array(void) { } } - static void update_allbitflips_array(void) { if (hardnested_stage & CHECK_2ND_BYTES) { for (uint16_t i = 0; i < 256; i++) { @@ -724,12 +712,10 @@ static void update_allbitflips_array(void) { } } - static uint32_t estimated_num_states_part_sum_coarse(uint16_t part_sum_a0_idx, uint16_t part_sum_a8_idx, odd_even_t odd_even) { return part_sum_count[odd_even][part_sum_a0_idx][part_sum_a8_idx]; } - static uint32_t estimated_num_states_part_sum(uint8_t first_byte, uint16_t part_sum_a0_idx, uint16_t part_sum_a8_idx, odd_even_t odd_even) { if (odd_even == ODD_STATE) { return count_bitarray_AND3(part_sum_a0_bitarrays[odd_even][part_sum_a0_idx], @@ -751,7 +737,6 @@ static uint32_t estimated_num_states_part_sum(uint8_t first_byte, uint16_t part_ // } } - static uint64_t estimated_num_states(uint8_t first_byte, uint16_t sum_a0, uint16_t sum_a8) { uint64_t num_states = 0; for (uint8_t p = 0; p < NUM_PART_SUMS; p++) { @@ -771,7 +756,6 @@ static uint64_t estimated_num_states(uint8_t first_byte, uint16_t sum_a0, uint16 return num_states; } - static uint64_t estimated_num_states_coarse(uint16_t sum_a0, uint16_t sum_a8) { uint64_t num_states = 0; for (uint8_t p = 0; p < NUM_PART_SUMS; p++) { @@ -791,7 +775,6 @@ static uint64_t estimated_num_states_coarse(uint16_t sum_a0, uint16_t sum_a8) { return num_states; } - static void update_p_K(void) { if (hardnested_stage & CHECK_2ND_BYTES) { uint64_t total_count = 0; @@ -813,7 +796,6 @@ static void update_p_K(void) { } } - static void update_sum_bitarrays(odd_even_t odd_even) { if (all_bitflips_bitarray_dirty[odd_even]) { for (uint8_t part_sum = 0; part_sum < NUM_PART_SUMS; part_sum++) { @@ -833,7 +815,6 @@ static void update_sum_bitarrays(odd_even_t odd_even) { } } - static int compare_expected_num_brute_force(const void *b1, const void *b2) { uint8_t index1 = *(uint8_t *)b1; uint8_t index2 = *(uint8_t *)b2; @@ -842,7 +823,6 @@ static int compare_expected_num_brute_force(const void *b1, const void *b2) { return (score1 > score2) - (score1 < score2); } - static int compare_sum_a8_guess(const void *b1, const void *b2) { float prob1 = ((guess_sum_a8_t *)b1)->prob; float prob2 = ((guess_sum_a8_t *)b2)->prob; @@ -850,7 +830,6 @@ static int compare_sum_a8_guess(const void *b1, const void *b2) { } - static float check_smallest_bitflip_bitarrays(void) { uint64_t smallest = 1LL << 48; // initialize best_first_bytes, do a rough estimation on remaining states @@ -871,7 +850,6 @@ static float check_smallest_bitflip_bitarrays(void) { return (float)smallest / 2.0; } - static void update_expected_brute_force(uint8_t best_byte) { float total_prob = 0.0; @@ -892,7 +870,6 @@ static void update_expected_brute_force(uint8_t best_byte) { return; } - static float sort_best_first_bytes(void) { // initialize best_first_bytes, do a rough estimation on remaining states for each Sum_a8 property @@ -981,7 +958,6 @@ static float sort_best_first_bytes(void) { return nonces[best_first_bytes[0]].expected_num_brute_force; } - static float update_reduction_rate(float last, bool init) { #define QUEUE_LEN 4 static float queue[QUEUE_LEN]; @@ -1024,7 +1000,6 @@ static float update_reduction_rate(float last, bool init) { return reduction_rate; } - static bool shrink_key_space(float *brute_forces) { #if defined(DEBUG_REDUCTION) PrintAndLogEx(INFO, "shrink_key_space() with stage = 0x%02x\n", hardnested_stage); @@ -1044,7 +1019,6 @@ static bool shrink_key_space(float *brute_forces) { } - static void estimate_sum_a8(void) { if (first_byte_num == 256) { for (uint16_t i = 0; i < 256; i++) { @@ -1060,7 +1034,6 @@ static void estimate_sum_a8(void) { } } - static int read_nonce_file(char *filename) { if (filename == NULL) { @@ -1107,17 +1080,21 @@ static int read_nonce_file(char *filename) { sprintf(progress_string, "Target Block=%d, Keytype=%c", trgBlockNo, trgKeyType == 0 ? 'A' : 'B'); hardnested_print_progress(num_acquired_nonces, progress_string, (float)(1LL << 47), 0); + bool got_match = false; for (uint8_t i = 0; i < NUM_SUMS; i++) { if (first_byte_Sum == sums[i]) { first_byte_Sum = i; + got_match = true; break; } } - - return 0; + if (got_match == false) { + PrintAndLogEx(FAILED, "No match for the First_Byte_Sum (%u), is the card a genuine MFC Ev1? ", first_byte_Sum); + return 1; + } + return PM3_SUCCESS; } - static noncelistentry_t *SearchFor2ndByte(uint8_t b1, uint8_t b2) { noncelistentry_t *p = nonces[b1].first; while (p != NULL) { @@ -1129,7 +1106,6 @@ static noncelistentry_t *SearchFor2ndByte(uint8_t b1, uint8_t b2) { return NULL; } - static bool timeout(void) { return (msclock() > last_sample_clock + sample_period); } @@ -1233,7 +1209,6 @@ __attribute__((force_align_arg_pointer)) return NULL; } - static void check_for_BitFlipProperties(bool time_budget) { // create and run worker threads pthread_t thread_id[NUM_CHECK_BITFLIPS_THREADS]; @@ -1272,7 +1247,6 @@ static void check_for_BitFlipProperties(bool time_budget) { #endif } - static void update_nonce_data(bool time_budget) { check_for_BitFlipProperties(time_budget); update_allbitflips_array(); @@ -1282,7 +1256,6 @@ static void update_nonce_data(bool time_budget) { estimate_sum_a8(); } - static void apply_sum_a0(void) { uint32_t old_count = num_all_bitflips_bitarray[EVEN_STATE]; num_all_bitflips_bitarray[EVEN_STATE] = count_bitarray_AND(all_bitflips_bitarray[EVEN_STATE], sum_a0_bitarrays[EVEN_STATE][first_byte_Sum]); @@ -1296,7 +1269,6 @@ static void apply_sum_a0(void) { } } - static void simulate_MFplus_RNG(uint32_t test_cuid, uint64_t test_key, uint32_t *nt_enc, uint8_t *par_enc) { struct Crypto1State sim_cs = {0, 0}; @@ -1316,10 +1288,9 @@ static void simulate_MFplus_RNG(uint32_t test_cuid, uint64_t test_key, uint32_t uint8_t nt_byte_par_enc = ks_par ^ oddparity8(nt_byte_dec); // determine the nt byte's parity and encode it *par_enc = (*par_enc << 1) | nt_byte_par_enc; } - } -static void simulate_acquire_nonces(void) { +static int simulate_acquire_nonces(void) { time_t time1 = time(NULL); last_sample_clock = 0; sample_period = 1000; // for simulation @@ -1355,12 +1326,21 @@ static void simulate_acquire_nonces(void) { if (first_byte_num == 256) { if (hardnested_stage == CHECK_1ST_BYTES) { + + bool got_match = false; for (uint8_t i = 0; i < NUM_SUMS; i++) { if (first_byte_Sum == sums[i]) { first_byte_Sum = i; + got_match = true; break; } } + + if (got_match == false) { + PrintAndLogEx(FAILED, "No match for the First_Byte_Sum (%u), is the card a genuine MFC Ev1? ", first_byte_Sum); + return PM3_ESOFT; + } + hardnested_stage |= CHECK_2ND_BYTES; apply_sum_a0(); } @@ -1389,10 +1369,9 @@ static void simulate_acquire_nonces(void) { // ); fprintf(fstats, "%" PRIu32 ";%" PRIu32 ";%1.0f;", total_num_nonces, num_acquired_nonces, difftime(end_time, time1)); - + return PM3_SUCCESS; } - static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, bool nonce_file_write, bool slow, char *filename) { last_sample_clock = msclock(); @@ -1486,12 +1465,20 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_ if (first_byte_num == 256) { if (hardnested_stage == CHECK_1ST_BYTES) { + bool got_match = false; for (uint8_t i = 0; i < NUM_SUMS; i++) { if (first_byte_Sum == sums[i]) { first_byte_Sum = i; + got_match = true; break; } } + + if (got_match == false) { + PrintAndLogEx(FAILED, "No match for the First_Byte_Sum (%u), is the card a genuine MFC Ev1? ", first_byte_Sum); + return 4; + } + hardnested_stage |= CHECK_2ND_BYTES; apply_sum_a0(); } @@ -1550,10 +1537,9 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_ fclose(fnonces); } - return 0; + return PM3_SUCCESS; } - static inline bool invariant_holds(uint_fast8_t byte_diff, uint_fast32_t state1, uint_fast32_t state2, uint_fast8_t bit, uint_fast8_t state_bit) { uint_fast8_t j_1_bit_mask = 0x01 << (bit - 1); uint_fast8_t bit_diff = byte_diff & j_1_bit_mask; // difference of (j-1)th bit @@ -1564,7 +1550,6 @@ static inline bool invariant_holds(uint_fast8_t byte_diff, uint_fast32_t state1, return !all_diff; } - static inline bool invalid_state(uint_fast8_t byte_diff, uint_fast32_t state1, uint_fast32_t state2, uint_fast8_t bit, uint_fast8_t state_bit) { uint_fast8_t j_bit_mask = (0x01 << bit); uint_fast8_t bit_diff = byte_diff & j_bit_mask; // difference of jth bit @@ -1574,7 +1559,6 @@ static inline bool invalid_state(uint_fast8_t byte_diff, uint_fast32_t state1, u return all_diff; } - static inline bool remaining_bits_match(uint_fast8_t num_common_bits, uint_fast8_t byte_diff, uint_fast32_t state1, uint_fast32_t state2, odd_even_t odd_even) { if (odd_even) { // odd bits @@ -1619,11 +1603,9 @@ static inline bool remaining_bits_match(uint_fast8_t num_common_bits, uint_fast8 return true; // valid state } - static pthread_mutex_t statelist_cache_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t book_of_work_mutex = PTHREAD_MUTEX_INITIALIZER; - typedef enum { TO_BE_DONE, WORK_IN_PROGRESS, @@ -1636,7 +1618,6 @@ static struct sl_cache_entry { work_status_t cache_status; } sl_cache[NUM_PART_SUMS][NUM_PART_SUMS][2]; - static void init_statelist_cache(void) { pthread_mutex_lock(&statelist_cache_mutex); for (uint16_t i = 0; i < NUM_PART_SUMS; i++) { @@ -1651,7 +1632,6 @@ static void init_statelist_cache(void) { pthread_mutex_unlock(&statelist_cache_mutex); } - static void free_statelist_cache(void) { pthread_mutex_lock(&statelist_cache_mutex); for (uint16_t i = 0; i < NUM_PART_SUMS; i++) { @@ -1750,7 +1730,6 @@ static void bitarray_to_list(uint8_t byte, uint32_t *bitarray, uint32_t *state_l *len = p - state_list; } - static void add_cached_states(statelist_t *cands, uint16_t part_sum_a0, uint16_t part_sum_a8, odd_even_t odd_even) { cands->states[odd_even] = sl_cache[part_sum_a0 / 2][part_sum_a8 / 2][odd_even].sl; cands->len[odd_even] = sl_cache[part_sum_a0 / 2][part_sum_a8 / 2][odd_even].len; @@ -2227,7 +2206,6 @@ int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBloc char instr_set[12] = {0}; get_SIMD_instruction_set(instr_set); - PrintAndLogEx(SUCCESS, "Using " _GREEN_("%s") " SIMD core.", instr_set); // initialize static arrays memset(part_sum_count, 0, sizeof(part_sum_count)); @@ -2243,7 +2221,7 @@ int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBloc setlocale(LC_NUMERIC, ""); if ((fstats = fopen("hardnested_stats.txt", "a")) == NULL) { PrintAndLogEx(WARNING, "Could not create/open file " _YELLOW_("hardnested_stats.txt")); - return 3; + return PM3_EFILE; } for (uint32_t i = 0; i < tests; i++) { @@ -2267,7 +2245,9 @@ int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBloc init_nonce_memory(); update_reduction_rate(0.0, true); - simulate_acquire_nonces(); + if (simulate_acquire_nonces() != PM3_SUCCESS) { + return 3; + } set_test_state(best_first_bytes[0]); From 4b0096c13520ca01548a89bfe3658749a0309eea Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 9 Jan 2022 13:40:58 +0100 Subject: [PATCH 39/73] cppcheck complains about the dynamic_lock_Areas access. Might fix it --- client/src/cmdhftopaz.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhftopaz.c b/client/src/cmdhftopaz.c index 42351ed50..b0834a4fc 100644 --- a/client/src/cmdhftopaz.c +++ b/client/src/cmdhftopaz.c @@ -49,8 +49,8 @@ static struct { uint8_t uid[7]; uint16_t size; uint8_t data_blocks[TOPAZ_STATIC_MEMORY / 8][8]; // this memory is always there - uint8_t *dynamic_memory; // this memory can be there - dynamic_lock_area_t *dynamic_lock_areas; // lock area descriptors + uint8_t *dynamic_memory; // this memory can be there + dynamic_lock_area_t *dynamic_lock_areas; // lock area descriptors } topaz_tag; static void topaz_switch_on_field(void) { @@ -201,6 +201,11 @@ static bool topaz_byte_is_locked(uint16_t byteno) { if (lock_area == NULL) { return false; } else { + + if ((lock_area->byte_offset - TOPAZ_STATIC_MEMORY) < 0) { + return false; + } + lockbits = &topaz_tag.dynamic_memory[lock_area->byte_offset - TOPAZ_STATIC_MEMORY]; locked_bytes_per_bit = lock_area->bytes_locked_per_bit; byteno = byteno - lock_area->first_locked_byte; From 9686e4712b5e2c4046599209e8763258acbd6ec4 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 13:41:12 +0100 Subject: [PATCH 40/73] text --- AUTHORS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index c453bb1dc..c1424a8a1 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -15,8 +15,8 @@ Therefore, only the following copyright notices are left untouched in the corres - copyright notices of standalone modes initial authors - copyright notices of dependencies (client/deps, common) -Since then, copyright of each contribution is tracked by the Git history. See the output of `git shortlog -nse` for a full list or `git log --pretty=short --follow |git shortlog -ne` to track a specific file. See also [the Contributors page on Github](https://github.com/RfidResearchGroup/proxmark3/graphs/contributors). +Since then, copyright of each contribution is tracked by the Git history. See the output of `git shortlog -nse` for a full list or `git log --pretty=short --follow |git shortlog -ne` to track a specific file. See also [the Contributors page on Github](https://github.com/RfidResearchGroup/proxmark3/graphs/contributors) and [this Gource animation](https://www.youtube.com/watch?v=N7vpk0iIq9s) retracing the commits history from March 2009 until January 2022. -A [mailmap](.mailmap) is maintained to map author and committer names and email addresses to canonical real names and email addresses. +A [mailmap](.mailmap) is maintained to map author and committer names and email addresses to canonical names and email addresses. If by accident a copyright was removed from a file and is *not* directly deducible from the Git history, please submit a PR. From 5a4584358c11cbe7342ba158a17d8ecb62a6701a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 14:10:26 +0100 Subject: [PATCH 41/73] make style --- client/src/cmdhfgallagher.c | 90 +++++++++---------- client/src/cmdhfmf.c | 2 +- client/src/cmdhfmfhard.c | 2 +- client/src/mifare/mifaredefault.h | 2 +- client/src/rl_vocabulory.h | 16 +--- client/src/tea.h | 2 +- client/src/wiegand_formats.c | 2 +- common/commonutil.c | 2 +- common/lfdemod.c | 2 +- doc/commands.json | 50 +++++------ .../crack5opencl/ht2crack5opencl.c | 4 +- tools/hitag2crack/crack5opencl/opencl.c | 10 +-- 12 files changed, 88 insertions(+), 96 deletions(-) diff --git a/client/src/cmdhfgallagher.c b/client/src/cmdhfgallagher.c index fb7e6e46a..59a688f93 100644 --- a/client/src/cmdhfgallagher.c +++ b/client/src/cmdhfgallagher.c @@ -116,7 +116,7 @@ static void cad_aid_uint_to_byte(uint32_t aid, uint8_t *data) { * is for the specified region & facility, false otherwise. */ static bool cad_facility_match(const uint8_t *entry, uint8_t region_code, uint16_t facility_code) { - return (entry[0] == region_code) && + return (entry[0] == region_code) && ((entry[1] << 8) + entry[2] == facility_code); } @@ -152,9 +152,9 @@ static int authenticate(DesfireContext_t *ctx, bool verbose) { int res = DesfireAuthenticate(ctx, DACEV1, false); if (res != PM3_SUCCESS) { PrintAndLogEx(ERR, "Desfire authenticate " _RED_("error") ". Result: [%d] %s", - res, - DesfireAuthErrorToStr(res) - ); + res, + DesfireAuthErrorToStr(res) + ); return res; } @@ -200,7 +200,7 @@ static bool aid_exists(DesfireContext_t *ctx, uint32_t aid, bool verbose) { PrintAndLogEx(INFO, "AID %06X %s", aid, res == PM3_SUCCESS ? "exists" : "does not exist" - ); + ); } return (res == PM3_SUCCESS); @@ -273,9 +273,9 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si // Check file contained 16 bytes of data if (read_len != 16) { PM3_RET_ERR(PM3_EFAILED, "Failed reading file 0 in AID %06X, expected 16 bytes, got %zu bytes", - aid, - read_len - ); + aid, + read_len + ); } // Check second half of file is the bitwise inverse of the first half @@ -285,9 +285,9 @@ static int hfgal_read_creds_app(DesfireContext_t *ctx, uint32_t aid, uint8_t *si if (memcmp(buf, &buf[8], 8) != 0) { PM3_RET_ERR(PM3_EFAILED, "Invalid cardholder data in file 0 in AID %06X. Received %s", - aid, - sprint_hex_inrow(buf, 16) - ); + aid, + sprint_hex_inrow(buf, 16) + ); } gallagher_decode_creds(buf, creds); @@ -312,7 +312,7 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint // UID is required for key diversification if (ctx->uidlen == 0) PM3_RET_ERR(PM3_EINVARG, "UID is required for key diversification. " - "Please fetch it before calling `hfgal_create_creds_app`"); + "Please fetch it before calling `hfgal_create_creds_app`"); // Create application DesfireCryptoAlgorithm app_algo = T_AES; @@ -348,7 +348,7 @@ static int hfgal_create_creds_app(DesfireContext_t *ctx, uint8_t *site_key, uint i, aid, sprint_hex_inrow(buf, ARRAYLEN(buf)) - ); + ); // Authenticate uint8_t blank_key[CRYPTO_AES128_KEY_SIZE] = {0}; @@ -437,7 +437,7 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, PrintAndLogEx(ERR, "hfgal_read_cad destination buffer is incorrectly sized. Received len %d, must be at least %d", dest_buf_len, 3 * 36 - ); + ); return PM3_EINVARG; } @@ -477,9 +477,9 @@ static int hfgal_read_cad(DesfireContext_t *ctx, uint8_t *dest_buf, PrintAndLogEx(SUCCESS, "Card Application Directory contains:" NOLF); for (int i = 0; i < num_entries; i++) { PrintAndLogEx(NORMAL, "%s %06X" NOLF, - (i == 0) ? "" : ",", - cad_aid_byte_to_uint(&dest_buf[i * 6 + 3]) - ); + (i == 0) ? "" : ",", + cad_aid_byte_to_uint(&dest_buf[i * 6 + 3]) + ); } PrintAndLogEx(NORMAL, ""); } @@ -518,8 +518,8 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo if (verbose) { PrintAndLogEx(INFO, "Created Card Application Directory (AID " _YELLOW_("%06X") ", empty contents & blank keys)", - CAD_AID - ); + CAD_AID + ); } // Select application & authenticate @@ -537,7 +537,7 @@ static int hfgal_create_cad(DesfireContext_t *ctx, uint8_t *site_key, bool verbo PrintAndLogEx(INFO, "Diversified key " _YELLOW_("0") " for CAD (AID " _YELLOW_("%06X") "): " _GREEN_("%s"), CAD_AID, sprint_hex_inrow(buf, ARRAYLEN(buf)) - ); + ); // Change key DesfireSetCommMode(ctx, DCMEncryptedPlain); @@ -587,15 +587,15 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 } // 6 entries per file - uint8_t file_id = num_entries / 6; + uint8_t file_id = num_entries / 6; uint8_t entry_num = num_entries % 6; // Check if facility already exists in CAD. for (uint8_t i = 0; i < ARRAYLEN(cad); i += 6) { if (cad_facility_match(&cad[i], creds->region_code, creds->facility_code)) PM3_RET_ERR(PM3_EFATAL, "Facility already exists in CAD, delete or update AID %06X", - cad_aid_byte_to_uint(&cad[i + 3]) - ); + cad_aid_byte_to_uint(&cad[i + 3]) + ); } // Create entry @@ -610,7 +610,7 @@ static int hfgal_add_aid_to_cad(DesfireContext_t *ctx, uint8_t *site_key, uint32 entry_num, file_id, sprint_hex_inrow(entry, 6) - ); + ); } // Select application & authenticate @@ -721,9 +721,9 @@ static int hfgal_remove_aid_from_cad(DesfireContext_t *ctx, uint8_t *site_key, if (verbose) { PrintAndLogEx(INFO, "Deleted unnecessary file " _YELLOW_("%d") " from CAD (AID " _YELLOW_("%06X")")", - file_id, - CAD_AID - ); + file_id, + CAD_AID + ); } } @@ -775,7 +775,7 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q current_aid, region_code, facility_code - ); + ); } else { PrintAndLogEx(INFO, "Reading AID: " _YELLOW_("%06X"), current_aid); } @@ -786,7 +786,7 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q res = hfgal_read_creds_app(&dctx, current_aid, site_key, &creds, verbose); PM3_RET_IF_ERR_MAYBE_MSG(res, !quiet, "Failed reading card application credentials"); - PrintAndLogEx(SUCCESS, "Gallagher (AID %06X) - region: " _GREEN_("%u") + PrintAndLogEx(SUCCESS, "Gallagher (AID %06X) - region: " _GREEN_("%u") ", fc: " _GREEN_("%u") ", cn: " _GREEN_("%u") ", issue level: " _GREEN_("%u"), @@ -795,7 +795,7 @@ static int hfgal_read_card(uint32_t aid, uint8_t *site_key, bool verbose, bool q creds.facility_code, creds.card_number, creds.issue_level - ); + ); } return PM3_SUCCESS; } @@ -899,10 +899,10 @@ static int CmdGallagherClone(const char *cmd) { CLIGetHexWithReturn(ctx, 3, key, &key_len); if (key_len && key_len != desfire_get_key_length(key_algo)) { PM3_RET_ERR_FREE(PM3_EINVARG, "%s key must have %d bytes length instead of %d", - CLIGetOptionListStr(DesfireAlgoOpts, key_algo), - desfire_get_key_length(key_algo), - key_len - ); + CLIGetOptionListStr(DesfireAlgoOpts, key_algo), + desfire_get_key_length(key_algo), + key_len + ); } if (key_len == 0) { // Default to a key of all zeros @@ -927,11 +927,11 @@ static int CmdGallagherClone(const char *cmd) { // Check that the AID is in the expected range if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || - (aid_buf[2] < 0x20) || - (aid_buf[2] > 0x2B)) { - // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't - PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); - } + (aid_buf[2] < 0x20) || + (aid_buf[2] > 0x2B)) { + // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't + PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); + } } int site_key_len = 0; @@ -1026,8 +1026,8 @@ static int CmdGallagherDelete(const char *cmd) { // Check that the AID is in the expected range if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || - (aid_buf[2] < 0x20) || - (aid_buf[2] > 0x2B)) { + (aid_buf[2] < 0x20) || + (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); } @@ -1098,9 +1098,9 @@ static int CmdGallagherDiversify(const char *cmd) { aid = DesfireAIDByteToUint(aid_buf); // Check that the AID is in the expected range - if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || - (aid_buf[2] < 0x20) || - (aid_buf[2] > 0x2B)) { + if ((memcmp(aid_buf, "\xF4\x81", 2) != 0) || + (aid_buf[2] < 0x20) || + (aid_buf[2] > 0x2B)) { // TODO: this should probably be a warning, but key diversification will throw an error later even if we don't PM3_RET_ERR_FREE(PM3_EINVARG, "Invalid Gallagher AID %06X, expected 2?81F4, where 0 <= ? <= 0xB", aid); } @@ -1152,7 +1152,7 @@ static int CmdGallagherDiversify(const char *cmd) { aid, key_num, key_str - ); + ); } return PM3_SUCCESS; } diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 2d9f05fb3..04241e759 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -367,7 +367,7 @@ static int CmdHF14AMfDarkside(const char *Cmd) { PrintAndLogEx(SUCCESS, "found valid key: "_GREEN_("%012" PRIx64), key); break; } - PrintAndLogEx(SUCCESS, "time in darkside " _YELLOW_("%.0f") " seconds\n",(float)t1 / 1000.0); + PrintAndLogEx(SUCCESS, "time in darkside " _YELLOW_("%.0f") " seconds\n", (float)t1 / 1000.0); return PM3_SUCCESS; } diff --git a/client/src/cmdhfmfhard.c b/client/src/cmdhfmfhard.c index bb2d4b024..92921e9b4 100644 --- a/client/src/cmdhfmfhard.c +++ b/client/src/cmdhfmfhard.c @@ -60,7 +60,7 @@ static uint16_t sums[NUM_SUMS] = {0, 32, 56, 64, 80, 96, 104, 112, 120, 128, 136, 144, 152, 160, 176, 192, 200, 224, 256}; // number of possible partial sum property values -#define NUM_PART_SUMS 9 +#define NUM_PART_SUMS 9 typedef enum { EVEN_STATE = 0, diff --git a/client/src/mifare/mifaredefault.h b/client/src/mifare/mifaredefault.h index 50fa1c5ee..3fe163d2e 100644 --- a/client/src/mifare/mifaredefault.h +++ b/client/src/mifare/mifaredefault.h @@ -48,7 +48,7 @@ static const uint64_t g_mifare_default_keys[] = { 0x4E3552426B32, // ID06 0x6A1987C40A21, // Salto 0xef1232ab18a0, // Schlage - 0x3B7E4FD575AD, // + 0x3B7E4FD575AD, // 0xb7bf0c13066e, // Gallagher 0x135b88a94b8b, // Saflock 0x5a7a52d5e20d, // Bosch diff --git a/client/src/rl_vocabulory.h b/client/src/rl_vocabulory.h index 1e372bc34..87dcf1b6d 100644 --- a/client/src/rl_vocabulory.h +++ b/client/src/rl_vocabulory.h @@ -1,17 +1,9 @@ //----------------------------------------------------------------------------- -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// Copyright (C) 2021 // -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. //----------------------------------------------------------------------------- // readline auto complete utilities //----------------------------------------------------------------------------- diff --git a/client/src/tea.h b/client/src/tea.h index 1dda24a1f..62a67fa7b 100644 --- a/client/src/tea.h +++ b/client/src/tea.h @@ -8,7 +8,7 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index db2223a0b..c7cf1d21b 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1422,7 +1422,7 @@ int HIDFindCardFormat(const char *format) { bool HIDPack(int format_idx, wiegand_card_t *card, wiegand_message_t *packed, bool preamble) { memset(packed, 0, sizeof(wiegand_message_t)); - if ((format_idx < 0) || (format_idx >= ARRAYLEN(FormatTable) - 1) ) + if ((format_idx < 0) || (format_idx >= ARRAYLEN(FormatTable) - 1)) return false; return FormatTable[format_idx].Pack(card, packed, preamble); diff --git a/common/commonutil.c b/common/commonutil.c index 3002953d5..a3e026dd1 100644 --- a/common/commonutil.c +++ b/common/commonutil.c @@ -245,4 +245,4 @@ uint16_t get_sw(const uint8_t *d, uint8_t n) { n -= 2; return d[n] * 0x0100 + d[n + 1]; -} \ No newline at end of file +} diff --git a/common/lfdemod.c b/common/lfdemod.c index 738b2060d..6401d522c 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -1311,7 +1311,7 @@ uint8_t detectFSKClk(const uint8_t *bits, size_t size, uint8_t fcHigh, uint8_t f // look for Sequence Terminator - should be pulses of clk*(1 or 2), clk*2, clk*(1.5 or 2), by idx we mean graph position index... -static bool findST(int *stStopLoc, int *stStartIdx, +static bool findST(int *stStopLoc, int *stStartIdx, const int lowToLowWaveLen[], const int highToLowWaveLen[], int clk, int tol, int buffSize, size_t *i) { if (buffSize < *i + 4) return false; diff --git a/doc/commands.json b/doc/commands.json index d5fd002c0..4b2d6edca 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -2322,30 +2322,30 @@ }, "hf gallagher clone": { "command": "hf gallagher clone", - "description": "clone gallagher credentials to a writable desfire card", + "description": "clone gallagher credentials to a writable desfire card specify site key is required if using non-default key key, lengths for the different crypto: des 8 bytes 2tdea or aes 16 bytes 3tdea 24 bytes aid id, default finds lowest available in range 0x2?81f4, where 0 <= ? <= 0xb.", "notes": [ "hf gallagher clone --rc 1 --fc 22 --cn 3333 --il 4 --sitekey 00112233445566778899aabbccddeeff" ], "offline": false, "options": [ "-h, --help this help", - "-n, --keynum key number [default=0]", - "-t, --algo crypt algo: des, 2tdea, 3tdea, aes", - "-k, --key key for authentication to the picc (hex 8(des), 16(2tdea or aes) or 24(3tdea) bytes)", - "--rc region code. 4 bits max", - "--fc facility code. 2 bytes max", - "--cn card number. 3 bytes max", - "--il issue level. 4 bits max", - "--aid application id to write (3 bytes) [default finds lowest available in range 0x2?81f4, where 0 <= ? <= 0xb]", - "--sitekey mifare site key to compute diversified keys (16 bytes, required if using non-default key)", + "-n, --keynum key number [default = 0]", + "-t, --algo crypt algo: des, 2tdea, 3tdea, aes", + "-k, --key key for authentication to the picc", + "--rc region code. 4 bits max", + "--fc facility code. 2 bytes max", + "--cn card number. 3 bytes max", + "--il issue level. 4 bits max", + "--aid application id to write (3 bytes)", + "--sitekey site key to compute diversified keys (16 bytes)", "--apdu show apdu requests and responses", "-v, --verbose verbose mode" ], - "usage": "hf gallagher clone [-hv] [-n ] [-t ] [-k ] --rc --fc --cn --il [--aid ] [--sitekey ] [--apdu]" + "usage": "hf gallagher clone [-hv] [-n ] [-t ] [-k ] --rc --fc --cn --il [--aid ] [--sitekey ] [--apdu]" }, "hf gallagher delete": { "command": "hf gallagher delete", - "description": "delete gallagher application from a desfire card", + "description": "delete gallagher application from a desfire card specify site key is required if using non-default key", "notes": [ "hf gallagher delete --aid 2081f4 --sitekey 00112233445566778899aabbccddeeff" ], @@ -2353,7 +2353,7 @@ "options": [ "-h, --help this help", "--aid application id to delete (3 bytes)", - "--sitekey mifare site key to compute diversified keys (16 bytes, required if using non-default key)", + "--sitekey site key to compute diversified keys (16 bytes)", "--apdu show apdu requests and responses", "-v, --verbose verbose mode" ], @@ -2361,7 +2361,7 @@ }, "hf gallagher diversifykey": { "command": "hf gallagher diversifykey", - "description": "diversify gallagher key", + "description": "diversify gallagher key specify site key is required if using non-default key", "notes": [ "hf gallagher diversify --uid 11223344556677 --aid 2081f4" ], @@ -2369,25 +2369,25 @@ "options": [ "-h, --help this help", "--aid application id for diversification (3 bytes)", - "--keynum key number [default=0]", + "--keynum key number [default = 0]", "--uid card uid to delete (4 or 7 bytes)", - "--sitekey mifare site key to compute diversified keys (16 bytes, required if using non-default key)", + "--sitekey site key to compute diversified keys (16 bytes)", "--apdu show apdu requests and responses" ], - "usage": "hf gallagher diversify [-h] --aid [--keynum ] [--uid ] [--sitekey ] [--apdu]" + "usage": "hf gallagher diversify [-h] --aid [--keynum ] [--uid ] [--sitekey ] [--apdu]" }, "hf gallagher help": { "command": "hf gallagher help", - "description": "help this help diversifykey diversify gallagher key --------------------------------------------------------------------------------------- hf gallagher reader available offline: no read a gallagher desfire tag", + "description": "help this help diversifykey diversify gallagher key --------------------------------------------------------------------------------------- hf gallagher reader available offline: no read a gallagher desfire tag from the card application directory, cad specify site key is required if using non-default key", "notes": [ - "hf gallagher reader --aid 2081f4 --sitekey 00112233445566778899aabbccddeeff -> act as a reader that skips reading the card application directory and uses a non-default site key", - "hf gallagher reader -@ -> continuous reader mode" + "hf gallagher reader -@ -> continuous reader mode", + "hf gallagher reader --aid 2081f4 --sitekey 00112233445566778899aabbccddeeff -> skip cad" ], "offline": true, "options": [ "-h, --help this help", - "--aid application id to read (3 bytes). if specified, then the card application directory is not used", - "--sitekey mifare site key to compute diversified keys (16 bytes, required if using non-default key)", + "--aid application id to read (3 bytes). if specified, the cad is not used", + "--sitekey site key to compute diversified keys (16 bytes)", "-@, --continuous continuous reader mode", "--apdu show apdu requests and responses", "-v, --verbose verbose mode" @@ -7194,7 +7194,7 @@ }, "lf gproxii clone": { "command": "lf gproxii clone", - "description": "clone a guardall tag to a t55x7, q5/t5555 or em4305/4469 tag. the facility-code is 8-bit and the card number is 16-bit. larger values are truncated. currently work only on 26bit", + "description": "clone a guardall tag to a t55x7, q5/t5555 or em4305/4469 tag. the facility-code is 8-bit and the card number is 20-bit. larger values are truncated. currently work only on 26 | 36 bit format", "notes": [ "lf gproxii clone --fmt 26 --fc 123 --cn 1337", "lf gproxii clone --q5 --fmt 26 --fc 123 --cn 1337 -> encode for q5/t5555 tag", @@ -7240,7 +7240,7 @@ }, "lf gproxii sim": { "command": "lf gproxii sim", - "description": "enables simulation of guardall card with specified card number. simulation runs until the button is pressed or another usb command is issued. the facility-code is 8-bit and the card number is 16-bit. larger values are truncated. currently work only on 26bit", + "description": "enables simulation of guardall card with specified card number. simulation runs until the button is pressed or another usb command is issued. the facility-code is 8-bit and the card number is 16-bit. larger values are truncated. currently work only on 26 | 36 bit format", "notes": [ "lf gproxii sim --fmt 26 --fc 123 --cn 1337" ], @@ -10237,6 +10237,6 @@ "metadata": { "commands_extracted": 601, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2022-01-06T19:05:01" + "extracted_on": "2022-01-09T13:10:14" } } \ No newline at end of file diff --git a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c index da23bd451..7d2f9eba7 100644 --- a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c +++ b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c @@ -94,8 +94,8 @@ static uint64_t expand(uint64_t mask, uint64_t value) { static void bitslice(const uint64_t value, bitslice_t *restrict bitsliced_value) { // set constants bitslice_t bs_zeroes, bs_ones; - memset((uint8_t*)&bs_ones, 0xff, VECTOR_SIZE); - memset((uint8_t*)&bs_zeroes, 0x00, VECTOR_SIZE); + memset((uint8_t *)&bs_ones, 0xff, VECTOR_SIZE); + memset((uint8_t *)&bs_zeroes, 0x00, VECTOR_SIZE); for (size_t bit_idx = 0; bit_idx < 32; bit_idx++) { const bool bit = get_bit(32 - 1 - bit_idx, value); diff --git a/tools/hitag2crack/crack5opencl/opencl.c b/tools/hitag2crack/crack5opencl/opencl.c index 1ee16d3cb..aadca459a 100644 --- a/tools/hitag2crack/crack5opencl/opencl.c +++ b/tools/hitag2crack/crack5opencl/opencl.c @@ -24,7 +24,7 @@ License: GNU General Public License v3 or any later version (see LICENSE.txt) #include "opencl.h" -bool plat_dev_enabled(unsigned int id, const unsigned int *sel, +bool plat_dev_enabled(unsigned int id, const unsigned int *sel, unsigned int cnt, unsigned int cur_type, unsigned int allow_type) { // usefulonly with devices if (allow_type != CL_DEVICE_TYPE_ALL) { @@ -69,10 +69,10 @@ unsigned int get_smallest_profile(compute_platform_ctx_t *cd_ctx, size_t ocl_pla } int discoverDevices(unsigned int profile_selected, uint32_t device_types_selected, - cl_uint *platform_detected_cnt, size_t *selected_platforms_cnt, - size_t *selected_devices_cnt, compute_platform_ctx_t **cd_ctx, - unsigned int *plat_sel, unsigned int plat_cnt, unsigned int *dev_sel, - unsigned int dev_cnt, bool verbose, bool show) { + cl_uint *platform_detected_cnt, size_t *selected_platforms_cnt, + size_t *selected_devices_cnt, compute_platform_ctx_t **cd_ctx, + unsigned int *plat_sel, unsigned int plat_cnt, unsigned int *dev_sel, + unsigned int dev_cnt, bool verbose, bool show) { int err = 0; unsigned int ocl_platform_max = MAX_OPENCL_DEVICES; // 16 cl_uint ocl_platform_cnt; From 2269ad69147bb947130bbdd86ed4a208074e2616 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 14:19:48 +0100 Subject: [PATCH 42/73] Remove ARRAY_LENGTH, we've already ARRAYLEN --- client/src/mifare/desfirecore.c | 10 +++++----- client/src/mifare/desfiresecurechan.c | 10 +++++----- client/src/util.h | 2 -- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 6132dfa7f..2fc1446fc 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -50,7 +50,7 @@ const CLIParserOption DesfireAlgoOpts[] = { {T_AES, "aes"}, {0, NULL}, }; -const size_t DesfireAlgoOptsLen = ARRAY_LENGTH(DesfireAlgoOpts); +const size_t DesfireAlgoOptsLen = ARRAYLEN(DesfireAlgoOpts); const CLIParserOption DesfireKDFAlgoOpts[] = { {MFDES_KDF_ALGO_NONE, "none"}, @@ -58,7 +58,7 @@ const CLIParserOption DesfireKDFAlgoOpts[] = { {MFDES_KDF_ALGO_GALLAGHER, "gallagher"}, {0, NULL}, }; -const size_t DesfireKDFAlgoOptsLen = ARRAY_LENGTH(DesfireKDFAlgoOpts); +const size_t DesfireKDFAlgoOptsLen = ARRAYLEN(DesfireKDFAlgoOpts); const CLIParserOption DesfireCommunicationModeOpts[] = { {DCMPlain, "plain"}, @@ -66,7 +66,7 @@ const CLIParserOption DesfireCommunicationModeOpts[] = { {DCMEncrypted, "encrypt"}, {0, NULL}, }; -const size_t DesfireCommunicationModeOptsLen = ARRAY_LENGTH(DesfireCommunicationModeOpts); +const size_t DesfireCommunicationModeOptsLen = ARRAYLEN(DesfireCommunicationModeOpts); const CLIParserOption DesfireCommandSetOpts[] = { {DCCNative, "native"}, @@ -74,7 +74,7 @@ const CLIParserOption DesfireCommandSetOpts[] = { {DCCISO, "iso"}, {0, NULL}, }; -const size_t DesfireCommandSetOptsLen = ARRAY_LENGTH(DesfireCommandSetOpts); +const size_t DesfireCommandSetOptsLen = ARRAYLEN(DesfireCommandSetOpts); const CLIParserOption DesfireSecureChannelOpts[] = { {DACd40, "d40"}, @@ -83,7 +83,7 @@ const CLIParserOption DesfireSecureChannelOpts[] = { {DACLRP, "lrp"}, {0, NULL}, }; -const size_t DesfireSecureChannelOptsLen = ARRAY_LENGTH(DesfireSecureChannelOpts); +const size_t DesfireSecureChannelOptsLen = ARRAYLEN(DesfireSecureChannelOpts); const CLIParserOption DesfireFileAccessModeOpts[] = { {0x00, "key0"}, diff --git a/client/src/mifare/desfiresecurechan.c b/client/src/mifare/desfiresecurechan.c index beb41f3d5..1f2c11645 100644 --- a/client/src/mifare/desfiresecurechan.c +++ b/client/src/mifare/desfiresecurechan.c @@ -205,7 +205,7 @@ static const CmdHeaderLengths_t CmdHeaderLengths[] = { }; static uint8_t DesfireGetCmdHeaderLen(uint8_t cmd) { - for (int i = 0; i < ARRAY_LENGTH(CmdHeaderLengths); i++) + for (int i = 0; i < ARRAYLEN(CmdHeaderLengths); i++) if (CmdHeaderLengths[i].cmd == cmd) return CmdHeaderLengths[i].len; @@ -229,7 +229,7 @@ static bool DesfireEV1D40TransmitMAC(DesfireContext_t *ctx, uint8_t cmd) { if (ctx->secureChannel != DACd40 && ctx->secureChannel != DACEV1) return true; - for (int i = 0; i < ARRAY_LENGTH(EV1D40TransmitMAC); i++) + for (int i = 0; i < ARRAYLEN(EV1D40TransmitMAC); i++) if (EV1D40TransmitMAC[i] == cmd) return true; @@ -248,7 +248,7 @@ static bool DesfireEV1D40ReceiveMAC(DesfireContext_t *ctx, uint8_t cmd) { if (ctx->secureChannel != DACd40) return true; - for (int i = 0; i < ARRAY_LENGTH(D40ReceiveMAC); i++) + for (int i = 0; i < ARRAYLEN(D40ReceiveMAC); i++) if (D40ReceiveMAC[i] == cmd) return true; @@ -267,7 +267,7 @@ static const uint8_t ISOChannelValidCmd[] = { }; static bool DesfireISOChannelValidCmd(uint8_t cmd) { - for (int i = 0; i < ARRAY_LENGTH(ISOChannelValidCmd); i++) + for (int i = 0; i < ARRAYLEN(ISOChannelValidCmd); i++) if (ISOChannelValidCmd[i] == cmd) return true; @@ -828,7 +828,7 @@ bool PrintChannelModeWarning(uint8_t cmd, DesfireSecureChannel secureChannel, De } bool found = false; - for (int i = 0; i < ARRAY_LENGTH(AllowedChannelModes); i++) + for (int i = 0; i < ARRAYLEN(AllowedChannelModes); i++) if (AllowedChannelModes[i].cmd == cmd) { // full compare if (AllowedChannelModes[i].secureChannel == secureChannel && diff --git a/client/src/util.h b/client/src/util.h index 87a54739f..e24dacc3d 100644 --- a/client/src/util.h +++ b/client/src/util.h @@ -24,8 +24,6 @@ #include #endif -#define ARRAY_LENGTH( array ) ( sizeof( array ) / sizeof( *( array ) ) ) - // used for save/load files #ifndef FILE_PATH_SIZE # define FILE_PATH_SIZE 1000 From 33ef5f4243bb8a847c6de848e4ac63eb04cbab1a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 14:25:10 +0100 Subject: [PATCH 43/73] use ARRAYLEN --- armsrc/Standalone/dankarmulti.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/Standalone/dankarmulti.h b/armsrc/Standalone/dankarmulti.h index 482391ddd..617b99f10 100644 --- a/armsrc/Standalone/dankarmulti.h +++ b/armsrc/Standalone/dankarmulti.h @@ -47,7 +47,7 @@ typedef struct mode_t { #define START_MODE_LIST mode_t *mode_list[] = { #define ADD_MODE(name) &MODE_INTERNAL_NAME(name), -#define END_MODE_LIST }; static const int NUM_MODES = sizeof(mode_list) / sizeof(mode_t*); +#define END_MODE_LIST }; static const int NUM_MODES = ARRAYLEN(mode_list); #else From bb098c4eab3edbd66c8315842c115a1fefeda1ae Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 14:46:28 +0100 Subject: [PATCH 44/73] Disable zx for the release as it's still WIP --- client/src/cmdlf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 3001bfe05..9ecd3f6bf 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -1830,7 +1830,7 @@ static command_t CommandTable[] = { {"t55xx", CmdLFT55XX, AlwaysAvailable, "{ T55xx CHIPs... }"}, {"viking", CmdLFViking, AlwaysAvailable, "{ Viking RFIDs... }"}, {"visa2000", CmdLFVisa2k, AlwaysAvailable, "{ Visa2000 RFIDs... }"}, - {"zx", CmdLFZx8211, AlwaysAvailable, "{ ZX8211 RFIDs... }"}, +// {"zx", CmdLFZx8211, AlwaysAvailable, "{ ZX8211 RFIDs... }"}, {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("General") " ---------------------"}, {"config", CmdLFConfig, IfPm3Lf, "Get/Set config for LF sampling, bit/sample, decimation, frequency"}, {"cmdread", CmdLFCommandRead, IfPm3Lf, "Modulate LF reader field to send command before read"}, From 6b0b9682aabc123c57e50ba0177cdb6ea04ac3a4 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 16:09:50 +0100 Subject: [PATCH 45/73] arch docker --- docker/archlinux/Dockerfile | 2 +- docker/archlinux/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/archlinux/Dockerfile b/docker/archlinux/Dockerfile index 8c9c9eabf..f822b33cc 100644 --- a/docker/archlinux/Dockerfile +++ b/docker/archlinux/Dockerfile @@ -1,7 +1,7 @@ FROM archlinux:base ENV LANG C -RUN pacman -Syy +RUN pacman -Syu --noconfirm RUN pacman-db-upgrade # qt5-base skipped # bluez skipped, can't be installed in docker diff --git a/docker/archlinux/README.md b/docker/archlinux/README.md index 3dc7d549d..72756a91e 100644 --- a/docker/archlinux/README.md +++ b/docker/archlinux/README.md @@ -13,7 +13,7 @@ Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist EOF -sudo pacman -Sy +sudo pacman -Syu # search available versions pacman -Ss '^arm-none-eabi-gcc$' From f11ae25213340c36618910893394043fb493571c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 9 Jan 2022 16:21:39 +0100 Subject: [PATCH 46/73] Disable ht2crack5gpu as ht2crack5opencl supercedes it and ht2crack5gpu can be difficult to get running on setups supporting OpenCL on more than one Nvidia GPU --- .../ISSUE_TEMPLATE/checklist-for-release.md | 2 +- doc/md/Development/Maintainers.md | 2 +- doc/md/Development/Makefile-vs-CMake.md | 2 +- docker/homebrew/README.md | 2 +- tools/hitag2crack/Makefile | 10 ++---- .../.gitignore | 0 .../Makefile | 0 .../README.md | 0 .../ht2crack5gpu.c | 0 .../ht2crack5kernel.cl | 0 tools/pm3_tests.sh | 35 +++++++------------ 11 files changed, 20 insertions(+), 33 deletions(-) rename tools/hitag2crack/{crack5gpu => crack5gpu_disabled}/.gitignore (100%) rename tools/hitag2crack/{crack5gpu => crack5gpu_disabled}/Makefile (100%) rename tools/hitag2crack/{crack5gpu => crack5gpu_disabled}/README.md (100%) rename tools/hitag2crack/{crack5gpu => crack5gpu_disabled}/ht2crack5gpu.c (100%) rename tools/hitag2crack/{crack5gpu => crack5gpu_disabled}/ht2crack5kernel.cl (100%) diff --git a/.github/ISSUE_TEMPLATE/checklist-for-release.md b/.github/ISSUE_TEMPLATE/checklist-for-release.md index e75aa2d22..cc123af85 100644 --- a/.github/ISSUE_TEMPLATE/checklist-for-release.md +++ b/.github/ISSUE_TEMPLATE/checklist-for-release.md @@ -35,7 +35,7 @@ make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && sudo make install PLATFORM=P ( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS= && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1 ( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1 -# Hitag2crack, optionally with --long and --gpu ... +# Hitag2crack, optionally with --long and --opencl ... make hitag2crack/clean && make hitag2crack && tools/pm3_tests.sh hitag2crack || exit 1 ``` diff --git a/doc/md/Development/Maintainers.md b/doc/md/Development/Maintainers.md index 0cf7817f6..2055e5bd2 100644 --- a/doc/md/Development/Maintainers.md +++ b/doc/md/Development/Maintainers.md @@ -77,7 +77,7 @@ On some architectures, pthread library is not present: One tool requires a CUDA compilation environment, it can be skipped as well: -* `make hitag2crack SKIPGPU=1` to skip ht2crack5gpu tool when compiling the hitag2crack toolsuite. +* `make hitag2crack SKIPOPENCL=1` to skip ht2crack5opencl tool when compiling the hitag2crack toolsuite. Some unittests are available via `make check`, which is actually triggering individual targets as for `make install`. diff --git a/doc/md/Development/Makefile-vs-CMake.md b/doc/md/Development/Makefile-vs-CMake.md index d77734cfc..79ac43e2c 100644 --- a/doc/md/Development/Makefile-vs-CMake.md +++ b/doc/md/Development/Makefile-vs-CMake.md @@ -95,7 +95,7 @@ At the moment both are maintained because they don't perfectly overlap yet. | Feature | Makefile | Remarks | |-----|---|---| -| Skip GPU-dependent code | `SKIPGPU=1` | to skip ht2crack5gpu tool when compiling the hitag2crack toolsuite | +| Skip OpenCL-dependent code | `SKIPOPENCL=1` | to skip ht2crack5opencl tool when compiling the hitag2crack toolsuite | ## ARM ^[Top](#top) diff --git a/docker/homebrew/README.md b/docker/homebrew/README.md index 77bfc8bb2..07c92e573 100644 --- a/docker/homebrew/README.md +++ b/docker/homebrew/README.md @@ -11,7 +11,7 @@ make -j client USE_BREW=1 SKIPREADLINE=1 make -j mfkey make -j nonce2key make -j mf_nonce_brute -make -j hitag2crack SKIPGPU=1 +make -j hitag2crack SKIPOPENCL=1 make -j fpga_compress ``` diff --git a/tools/hitag2crack/Makefile b/tools/hitag2crack/Makefile index 26f538110..631e5d261 100644 --- a/tools/hitag2crack/Makefile +++ b/tools/hitag2crack/Makefile @@ -1,8 +1,8 @@ include ../../Makefile.defs all clean install uninstall check: %: crack2/% crack3/% crack4/% crack5/% -ifneq ($(SKIPGPU),1) -all clean install uninstall check: %: crack5gpu/% crack5opencl/% +ifneq ($(SKIPOPENCL),1) +all clean install uninstall check: %: crack5opencl/% endif crack2/%: FORCE @@ -21,14 +21,10 @@ crack5/%: FORCE $(info [*] MAKE $@) $(Q)$(MAKE) --no-print-directory -C crack5 $(patsubst crack5/%,%,$@) DESTDIR=$(MYDESTDIR) -crack5gpu/%: FORCE - $(info [*] MAKE $@) - $(Q)$(MAKE) --no-print-directory -C crack5gpu $(patsubst crack5gpu/%,%,$@) DESTDIR=$(MYDESTDIR) - crack5opencl/%: FORCE $(info [*] MAKE $@) $(Q)$(MAKE) --no-print-directory -C crack5opencl $(patsubst crack5opencl/%,%,$@) DESTDIR=$(MYDESTDIR) FORCE: # Dummy target to force remake in the subdirectories, even if files exist (this Makefile doesn't know about the prerequisites) -.phony: crack2 crack3 crack4 crack5 crack5gpu crack5opencl FORCE +.phony: crack2 crack3 crack4 crack5 crack5opencl FORCE diff --git a/tools/hitag2crack/crack5gpu/.gitignore b/tools/hitag2crack/crack5gpu_disabled/.gitignore similarity index 100% rename from tools/hitag2crack/crack5gpu/.gitignore rename to tools/hitag2crack/crack5gpu_disabled/.gitignore diff --git a/tools/hitag2crack/crack5gpu/Makefile b/tools/hitag2crack/crack5gpu_disabled/Makefile similarity index 100% rename from tools/hitag2crack/crack5gpu/Makefile rename to tools/hitag2crack/crack5gpu_disabled/Makefile diff --git a/tools/hitag2crack/crack5gpu/README.md b/tools/hitag2crack/crack5gpu_disabled/README.md similarity index 100% rename from tools/hitag2crack/crack5gpu/README.md rename to tools/hitag2crack/crack5gpu_disabled/README.md diff --git a/tools/hitag2crack/crack5gpu/ht2crack5gpu.c b/tools/hitag2crack/crack5gpu_disabled/ht2crack5gpu.c similarity index 100% rename from tools/hitag2crack/crack5gpu/ht2crack5gpu.c rename to tools/hitag2crack/crack5gpu_disabled/ht2crack5gpu.c diff --git a/tools/hitag2crack/crack5gpu/ht2crack5kernel.cl b/tools/hitag2crack/crack5gpu_disabled/ht2crack5kernel.cl similarity index 100% rename from tools/hitag2crack/crack5gpu/ht2crack5kernel.cl rename to tools/hitag2crack/crack5gpu_disabled/ht2crack5kernel.cl diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index bf611b743..ed48e200f 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -7,7 +7,7 @@ DICPATH="./client/dictionaries" RESOURCEPATH="./client/resources" SLOWTESTS=false -GPUTESTS=false +OPENCLTESTS=false TESTALL=true TESTMFKEY=false TESTNONCE2KEY=false @@ -26,9 +26,9 @@ while (( "$#" )); do case "$1" in -h|--help) echo """ -Usage: $0 [--long] [--gpu] [--clientbin /path/to/proxmark3] [mfkey|nonce2key|mf_nonce_brute|fpga_compress|bootrom|armsrc|client|recovery|common] +Usage: $0 [--long] [--opencl] [--clientbin /path/to/proxmark3] [mfkey|nonce2key|mf_nonce_brute|fpga_compress|bootrom|armsrc|client|recovery|common] --long: Enable slow tests - --gpu: Enable tests requiring GPU + --opencl: Enable tests requiring OpenCL (preferably a Nvidia GPU) --clientbin ...: Specify path to proxmark3 binary to test If no target given, all targets will be tested """ @@ -38,8 +38,8 @@ Usage: $0 [--long] [--gpu] [--clientbin /path/to/proxmark3] [mfkey|nonce2key|mf_ SLOWTESTS=true shift ;; - --gpu) - GPUTESTS=true + --opencl) + OPENCLTESTS=true shift ;; --clientbin) @@ -141,9 +141,9 @@ function CheckFileExist() { return 1 } -# [slow] [gpu] [retry] [ignore] <command_line> <check_result_regex> +# [slow] [opencl] [retry] [ignore] <title> <command_line> <check_result_regex> # slow: test takes more than ~5s -# gpu: test requires GPU presence +# opencl: test requires OpenCL # retry: test repeated up to 3 times in case of failure # ignore: test failure is not fatal function CheckExecute() { @@ -153,11 +153,11 @@ function CheckExecute() { else local SLOWTEST=false fi - if [ "$1" == "gpu" ]; then - local GPUTEST=true + if [ "$1" == "opencl" ]; then + local OPENCLTEST=true shift else - local GPUTEST=false + local OPENCLTEST=false fi if [ "$1" == "retry" ]; then local RETRY="1 2 3 e" @@ -179,8 +179,8 @@ function CheckExecute() { echo -e "[ ${C_YELLOW}SKIPPED${C_NC} ] ( slow )" return $RESULT fi - if $GPUTEST && ! $GPUTESTS; then - echo -e "[ ${C_YELLOW}SKIPPED${C_NC} ] ( gpu )" + if $OPENCLTEST && ! $OPENCLTESTS; then + echo -e "[ ${C_YELLOW}SKIPPED${C_NC} ] ( opencl )" return $RESULT fi @@ -327,15 +327,6 @@ while true; do # Order of magnitude to crack it: ~12s on 1 core, ~3s on 4 cores -> tagged as "slow" if ! CheckExecute slow "ht2crack5 test" "cd $HT2CRACK5PATH; ./ht2crack5 $HT2CRACK5UID $HT2CRACK5NRAR" "Key: $HT2CRACK5KEY"; then break; fi - echo -e "\n${C_BLUE}Testing ht2crack5gpu:${C_NC} ${HT2CRACK5GPUPATH:=./tools/hitag2crack/crack5gpu/}" - if ! CheckFileExist "ht2crack5gpu exists" "$HT2CRACK5GPUPATH/ht2crack5gpu"; then break; fi - HT2CRACK5GPUUID=12345678 - HT2CRACK5GPUKEY=AABBCCDDEEFF - # The speed depends on the nRaR so we'll use two pairs known to work fast - HT2CRACK5GPUNRAR="B438220C 944FFD74 942C59E3 3D450B34" - # Order of magnitude to crack it: ~15s -> tagged as "slow" - if ! CheckExecute slow gpu "ht2crack5gpu test" "cd $HT2CRACK5GPUPATH; ./ht2crack5gpu $HT2CRACK5GPUUID $HT2CRACK5GPUNRAR" "Key: $HT2CRACK5GPUKEY"; then break; fi - echo -e "\n${C_BLUE}Testing ht2crack5opencl:${C_NC} ${HT2CRACK5OPENCLPATH:=./tools/hitag2crack/crack5opencl/}" if ! CheckFileExist "ht2crack5opencl exists" "$HT2CRACK5OPENCLPATH/ht2crack5opencl"; then break; fi HT2CRACK5OPENCLUID=12345678 @@ -343,7 +334,7 @@ while true; do # The speed depends on the nRaR so we'll use two pairs known to work fast HT2CRACK5OPENCLNRAR="B438220C 944FFD74 942C59E3 3D450B34" # Order of magnitude to crack it: ~15s -> tagged as "slow" - if ! CheckExecute slow gpu "ht2crack5opencl test" "cd $HT2CRACK5OPENCLPATH; ./ht2crack5opencl $HT2CRACK5OPENCLUID $HT2CRACK5OPENCLNRAR" "Key found.*: $HT2CRACK5OPENCLKEY"; then break; fi + if ! CheckExecute slow opencl "ht2crack5opencl test" "cd $HT2CRACK5OPENCLPATH; ./ht2crack5opencl $HT2CRACK5OPENCLUID $HT2CRACK5OPENCLNRAR" "Key found.*$HT2CRACK5OPENCLKEY"; then break; fi fi if $TESTALL || $TESTCLIENT; then echo -e "\n${C_BLUE}Testing client:${C_NC} ${CLIENTBIN:=./client/proxmark3}" From 1a408d62a5eb4fa6d8d59da05476a871d3f7ab3b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Sun, 9 Jan 2022 17:06:26 +0100 Subject: [PATCH 47/73] simplify release tests as PLATFORM doesn't influence tests --- .github/ISSUE_TEMPLATE/checklist-for-release.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/checklist-for-release.md b/.github/ISSUE_TEMPLATE/checklist-for-release.md index cc123af85..514b454d7 100644 --- a/.github/ISSUE_TEMPLATE/checklist-for-release.md +++ b/.github/ISSUE_TEMPLATE/checklist-for-release.md @@ -27,13 +27,13 @@ assignees: doegox, iceman1001 #!/usr/bin/env bash make clean && make -j PLATFORM=PM3GENERIC PLATFORM_EXTRAS= && tools/pm3_tests.sh --long || exit 1 -make clean && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS= && tools/pm3_tests.sh --long || exit 1 -make clean && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && tools/pm3_tests.sh --long || exit 1 +make clean && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS= || exit 1 +make clean && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON || exit 1 make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && sudo make install PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && ( cd /tmp; proxmark3 -c 'data load -f lf_EM4x05.pm3;lf search -1'|grep 'Valid FDX-B ID found' ) && sudo make uninstall || exit 1 ( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3GENERIC PLATFORM_EXTRAS= && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1 -( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS= && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1 -( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && cp -a ../*scripts ../*libs . && ../../tools/pm3_tests.sh --clientbin $(pwd)/proxmark3 client ) || exit 1 +( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS= ) || exit 1 +( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON ) || exit 1 # Hitag2crack, optionally with --long and --opencl ... make hitag2crack/clean && make hitag2crack && tools/pm3_tests.sh hitag2crack || exit 1 From dee65c8036f43094dc2573a9be0e08240fdc62f5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Sun, 9 Jan 2022 17:49:42 +0100 Subject: [PATCH 48/73] recover_pk: better warning if OpenSSL doesn't provide required curve (Fedora I'm looking at you) cf https://bugzilla.redhat.com/show_bug.cgi?id=1019390#c25 --- tools/recover_pk.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/recover_pk.py b/tools/recover_pk.py index 470f406ae..8f1f19140 100755 --- a/tools/recover_pk.py +++ b/tools/recover_pk.py @@ -34,7 +34,11 @@ def guess_curvename(signature): def recover(data, signature, curvename, alghash=None): recovered = set() - curve = sslcrypto.ecc.get_curve(curvename) + try: + curve = sslcrypto.ecc.get_curve(curvename) + except ValueError: + print("Warning, your OpenSSL doesn't provide support for curve", curvename) + return recovered recoverable = len(signature) % 1 == 1 if (recoverable): try: From 081edec89bb977a3b51e1f0abb33fe2d95a00b0d Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Sun, 9 Jan 2022 17:52:16 +0100 Subject: [PATCH 49/73] text --- docker/fedora-34/README.md | 18 ++---------------- docker/fedora-35/README.md | 18 ++---------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/docker/fedora-34/README.md b/docker/fedora-34/README.md index 58a4db08a..5fccbba41 100644 --- a/docker/fedora-34/README.md +++ b/docker/fedora-34/README.md @@ -7,20 +7,6 @@ python3 -m pip install ansicolors sslcrypto tools/pm3_tests.sh --long ``` -Warning, no idea how to manage to run `recover_pk` on Fedora... -Tried the followings: -``` -python3 -m pip install pyopenssl -sudo yum -y install openssl-devel libffi-devel -``` -Error is: -``` - File "/home/rrg/.local/lib/python3.9/site-packages/sslcrypto/_ecc.py", line 202, in get_curve - return EllipticCurve(self._backend, params, self._aes, nid) - File "/home/rrg/.local/lib/python3.9/site-packages/sslcrypto/_ecc.py", line 211, in __init__ - self._backend = backend_factory(**params) - File "/home/rrg/.local/lib/python3.9/site-packages/sslcrypto/openssl/ecc.py", line 221, in __init__ - raise ValueError("Could not create group object") -``` +Warning, `recover_pk selftests` will fail on Fedora because they stripped down the available ECC curves in their OpenSSL. -So just comment the "recover_pk test" for now, until someone figures out how to solve the issue. +So just comment the "recover_pk test" diff --git a/docker/fedora-35/README.md b/docker/fedora-35/README.md index 58a4db08a..5fccbba41 100644 --- a/docker/fedora-35/README.md +++ b/docker/fedora-35/README.md @@ -7,20 +7,6 @@ python3 -m pip install ansicolors sslcrypto tools/pm3_tests.sh --long ``` -Warning, no idea how to manage to run `recover_pk` on Fedora... -Tried the followings: -``` -python3 -m pip install pyopenssl -sudo yum -y install openssl-devel libffi-devel -``` -Error is: -``` - File "/home/rrg/.local/lib/python3.9/site-packages/sslcrypto/_ecc.py", line 202, in get_curve - return EllipticCurve(self._backend, params, self._aes, nid) - File "/home/rrg/.local/lib/python3.9/site-packages/sslcrypto/_ecc.py", line 211, in __init__ - self._backend = backend_factory(**params) - File "/home/rrg/.local/lib/python3.9/site-packages/sslcrypto/openssl/ecc.py", line 221, in __init__ - raise ValueError("Could not create group object") -``` +Warning, `recover_pk selftests` will fail on Fedora because they stripped down the available ECC curves in their OpenSSL. -So just comment the "recover_pk test" for now, until someone figures out how to solve the issue. +So just comment the "recover_pk test" From 21061d6d55a0179db2e3a3f62f83e6f5fcb1446a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Mon, 10 Jan 2022 10:27:39 +0100 Subject: [PATCH 50/73] Removing client/android library cmake, not needed anymore --- client/android/CMakeLists.txt | 246 ---------------------------------- client/android/jni_tools.c | 81 ----------- client/android/jni_tools.h | 40 ------ client/android/pm3_main.c | 174 ------------------------ 4 files changed, 541 deletions(-) delete mode 100644 client/android/CMakeLists.txt delete mode 100644 client/android/jni_tools.c delete mode 100644 client/android/jni_tools.h delete mode 100644 client/android/pm3_main.c diff --git a/client/android/CMakeLists.txt b/client/android/CMakeLists.txt deleted file mode 100644 index 3148436ac..000000000 --- a/client/android/CMakeLists.txt +++ /dev/null @@ -1,246 +0,0 @@ -#----------------------------------------------------------------------------- -# Copyright (C) Jonathan Westhues, Mar 2006 -# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See LICENSE.txt for the text of the license. -#----------------------------------------------------------------------------- -# version -message(STATUS "CMake ${CMAKE_VERSION}") -cmake_minimum_required(VERSION 3.4.1) -project(proxmark3) - -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fvisibility=hidden -w") - -# Root path into client -set(PM3_ROOT ../../) - -add_subdirectory(../deps deps) - -# Build zlib deps at external -if (CMAKE_MAKE_PROGRAM MATCHES ".*ninja.*") - set(BZIP2_INCLUDE_DIRS ${BZIP2_ROOT}) - set(BZIP2_LIBRARIES pm3rrg_rdv4_bzip2) -elseif (UNIX) # Cross compile at Unix Makefile System. - # bzip2 dep. - include(ExternalProject) - set(CFLAGS_EXTERNAL_LIB "CFLAGS=--target=${CMAKE_C_COMPILER_TARGET} -w") - set(BZIP2_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps/bzip2/src/bzip2) - ExternalProject_Add(bzip2 - GIT_REPOSITORY https://android.googlesource.com/platform/external/bzip2 - GIT_TAG platform-tools-30.0.2 - PREFIX deps/bzip2 - #SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/bzip2 - CONFIGURE_COMMAND mkdir -p ${BZIP2_BUILD_DIR} && git archive --format tar HEAD | tar -C ${BZIP2_BUILD_DIR} -x - BUILD_IN_SOURCE ON - BUILD_COMMAND make -C ${BZIP2_BUILD_DIR} -j4 CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} LD=${CMAKE_C_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} ${CFLAGS_EXTERNAL_LIB} libbz2.a - INSTALL_COMMAND "" - LOG_DOWNLOAD ON - ) - ExternalProject_Add_StepTargets(bzip2 configure build install) - set(BZIP2_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/deps/bzip2/src/bzip2) - set(BZIP2_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/deps/bzip2/src/bzip2/libbz2.a) -else () - message(ERROR "Please implement your BZIP2 import.") -endif () - -# client resources -add_library(pm3rrg_rdv4 SHARED - ${PM3_ROOT}/common/commonutil.c - ${PM3_ROOT}/common/util_posix.c - ${PM3_ROOT}/common/bucketsort.c - ${PM3_ROOT}/common/crapto1/crapto1.c - ${PM3_ROOT}/common/crapto1/crypto1.c - ${PM3_ROOT}/common/crc.c - ${PM3_ROOT}/common/crc16.c - ${PM3_ROOT}/common/crc32.c - ${PM3_ROOT}/common/crc64.c - ${PM3_ROOT}/common/lfdemod.c - ${PM3_ROOT}/common/legic_prng.c - ${PM3_ROOT}/common/iso15693tools.c - ${PM3_ROOT}/common/cardhelper.c - ${PM3_ROOT}/common/generator.c - ${PM3_ROOT}/client/src/crypto/asn1dump.c - ${PM3_ROOT}/client/src/crypto/asn1utils.c - ${PM3_ROOT}/client/src/crypto/libpcrypto.c - ${PM3_ROOT}/client/src/emv/test/cda_test.c - ${PM3_ROOT}/client/src/emv/test/crypto_test.c - ${PM3_ROOT}/client/src/emv/test/cryptotest.c - ${PM3_ROOT}/client/src/emv/test/dda_test.c - ${PM3_ROOT}/client/src/emv/test/sda_test.c - ${PM3_ROOT}/client/src/emv/cmdemv.c - ${PM3_ROOT}/client/src/emv/crypto.c - ${PM3_ROOT}/client/src/emv/crypto_polarssl.c - ${PM3_ROOT}/client/src/emv/dol.c - ${PM3_ROOT}/client/src/emv/emv_pk.c - ${PM3_ROOT}/client/src/emv/emv_pki.c - ${PM3_ROOT}/client/src/emv/emv_pki_priv.c - ${PM3_ROOT}/client/src/emv/emv_roca.c - ${PM3_ROOT}/client/src/emv/emv_tags.c - ${PM3_ROOT}/client/src/emv/emvcore.c - ${PM3_ROOT}/client/src/emv/emvjson.c - ${PM3_ROOT}/client/src/emv/tlv.c - ${PM3_ROOT}/client/src/fido/additional_ca.c - ${PM3_ROOT}/client/src/fido/cbortools.c - ${PM3_ROOT}/client/src/fido/cose.c - ${PM3_ROOT}/client/src/fido/fidocore.c - ${PM3_ROOT}/client/src/iso7816/apduinfo.c - ${PM3_ROOT}/client/src/iso7816/iso7816core.c - ${PM3_ROOT}/client/src/ksx6924/ksx6924core.c - ${PM3_ROOT}/client/src/cipurse/cipursecrypto.c - ${PM3_ROOT}/client/src/cipurse/cipursecore.c - ${PM3_ROOT}/client/src/cipurse/cipursetest.c - ${PM3_ROOT}/client/src/loclass/cipher.c - ${PM3_ROOT}/client/src/loclass/cipherutils.c - ${PM3_ROOT}/client/src/loclass/elite_crack.c - ${PM3_ROOT}/client/src/loclass/hash1_brute.c - ${PM3_ROOT}/client/src/loclass/ikeys.c - ${PM3_ROOT}/client/src/mifare/mad.c - ${PM3_ROOT}/client/src/mifare/aiddesfire.c - ${PM3_ROOT}/client/src/mifare/mfkey.c - ${PM3_ROOT}/client/src/mifare/mifare4.c - ${PM3_ROOT}/client/src/mifare/mifaredefault.c - ${PM3_ROOT}/client/src/mifare/mifarehost.c - ${PM3_ROOT}/client/src/nfc/ndef.c - ${PM3_ROOT}/client/src/mifare/lrpcrypto.c - ${PM3_ROOT}/client/src/mifare/desfirecrypto.c - ${PM3_ROOT}/client/src/mifare/desfiresecurechan.c - ${PM3_ROOT}/client/src/mifare/desfirecore.c - ${PM3_ROOT}/client/src/mifare/desfiretest.c - ${PM3_ROOT}/client/src/mifare/gallaghercore.c - ${PM3_ROOT}/client/src/uart/uart_posix.c - ${PM3_ROOT}/client/src/uart/uart_win32.c - ${PM3_ROOT}/client/src/ui/overlays.ui - ${PM3_ROOT}/client/src/ui/image.ui - ${PM3_ROOT}/client/src/aidsearch.c - ${PM3_ROOT}/client/src/atrs.c - ${PM3_ROOT}/client/src/cmdanalyse.c - ${PM3_ROOT}/client/src/cmdcrc.c - ${PM3_ROOT}/client/src/cmddata.c - ${PM3_ROOT}/client/src/cmdflashmem.c - ${PM3_ROOT}/client/src/cmdflashmemspiffs.c - ${PM3_ROOT}/client/src/cmdhf.c - ${PM3_ROOT}/client/src/cmdhf14a.c - ${PM3_ROOT}/client/src/cmdhf14b.c - ${PM3_ROOT}/client/src/cmdhf15.c - ${PM3_ROOT}/client/src/cmdhfcryptorf.c - ${PM3_ROOT}/client/src/cmdhfemrtd.c - ${PM3_ROOT}/client/src/cmdhfepa.c - ${PM3_ROOT}/client/src/cmdhffelica.c - ${PM3_ROOT}/client/src/cmdhffido.c - ${PM3_ROOT}/client/src/cmdhfgallagher.c - ${PM3_ROOT}/client/src/cmdhfcipurse.c - ${PM3_ROOT}/client/src/cmdhficlass.c - ${PM3_ROOT}/client/src/cmdhfjooki.c - ${PM3_ROOT}/client/src/cmdhfksx6924.c - ${PM3_ROOT}/client/src/cmdhflegic.c - ${PM3_ROOT}/client/src/cmdhflist.c - ${PM3_ROOT}/client/src/cmdhflto.c - ${PM3_ROOT}/client/src/cmdhfmf.c - ${PM3_ROOT}/client/src/cmdhfmfdes.c - ${PM3_ROOT}/client/src/cmdhfmfhard.c - ${PM3_ROOT}/client/src/cmdhfmfp.c - ${PM3_ROOT}/client/src/cmdhfmfu.c - ${PM3_ROOT}/client/src/cmdhfseos.c - ${PM3_ROOT}/client/src/cmdhfst.c - ${PM3_ROOT}/client/src/cmdhfst25ta.c - ${PM3_ROOT}/client/src/cmdhfthinfilm.c - ${PM3_ROOT}/client/src/cmdhftopaz.c - ${PM3_ROOT}/client/src/cmdhfwaveshare.c - ${PM3_ROOT}/client/src/cmdhw.c - ${PM3_ROOT}/client/src/cmdlf.c - ${PM3_ROOT}/client/src/cmdlfawid.c - ${PM3_ROOT}/client/src/cmdlfcotag.c - ${PM3_ROOT}/client/src/cmdlfdestron.c - ${PM3_ROOT}/client/src/cmdlfem.c - ${PM3_ROOT}/client/src/cmdlfem410x.c - ${PM3_ROOT}/client/src/cmdlfem4x05.c - ${PM3_ROOT}/client/src/cmdlfem4x50.c - ${PM3_ROOT}/client/src/cmdlfem4x70.c - ${PM3_ROOT}/client/src/cmdlffdxb.c - ${PM3_ROOT}/client/src/cmdlfgallagher.c - ${PM3_ROOT}/client/src/cmdlfguard.c - ${PM3_ROOT}/client/src/cmdlfhid.c - ${PM3_ROOT}/client/src/cmdlfhitag.c - ${PM3_ROOT}/client/src/cmdlfidteck.c - ${PM3_ROOT}/client/src/cmdlfindala.c - ${PM3_ROOT}/client/src/cmdlfio.c - ${PM3_ROOT}/client/src/cmdlfjablotron.c - ${PM3_ROOT}/client/src/cmdlfkeri.c - ${PM3_ROOT}/client/src/cmdlfmotorola.c - ${PM3_ROOT}/client/src/cmdlfnedap.c - ${PM3_ROOT}/client/src/cmdlfnexwatch.c - ${PM3_ROOT}/client/src/cmdlfnoralsy.c - ${PM3_ROOT}/client/src/cmdlfpac.c - ${PM3_ROOT}/client/src/cmdlfparadox.c - ${PM3_ROOT}/client/src/cmdlfpcf7931.c - ${PM3_ROOT}/client/src/cmdlfpresco.c - ${PM3_ROOT}/client/src/cmdlfpyramid.c - ${PM3_ROOT}/client/src/cmdlfsecurakey.c - ${PM3_ROOT}/client/src/cmdlft55xx.c - ${PM3_ROOT}/client/src/cmdlfti.c - ${PM3_ROOT}/client/src/cmdlfviking.c - ${PM3_ROOT}/client/src/cmdlfvisa2000.c - ${PM3_ROOT}/client/src/cmdlfzx8211.c - ${PM3_ROOT}/client/src/cmdmain.c - ${PM3_ROOT}/client/src/cmdnfc.c - ${PM3_ROOT}/client/src/cmdparser.c - ${PM3_ROOT}/client/src/cmdscript.c - ${PM3_ROOT}/client/src/cmdsmartcard.c - ${PM3_ROOT}/client/src/cmdtrace.c - ${PM3_ROOT}/client/src/cmdusart.c - ${PM3_ROOT}/client/src/cmdwiegand.c - ${PM3_ROOT}/client/src/comms.c - ${PM3_ROOT}/client/src/fileutils.c - ${PM3_ROOT}/client/src/flash.c - ${PM3_ROOT}/client/src/graph.c - ${PM3_ROOT}/client/src/jansson_path.c - ${PM3_ROOT}/client/src/preferences.c - ${PM3_ROOT}/client/src/pm3_binlib.c - ${PM3_ROOT}/client/src/pm3_bitlib.c - ${PM3_ROOT}/client/src/prng.c - ${PM3_ROOT}/client/src/scandir.c - ${PM3_ROOT}/client/src/scripting.c - ${PM3_ROOT}/client/src/tea.c - ${PM3_ROOT}/client/src/ui.c - ${PM3_ROOT}/client/src/util.c - ${PM3_ROOT}/client/src/wiegand_formats.c - ${PM3_ROOT}/client/src/wiegand_formatutils.c - # android resources - jni_tools.c - pm3_main.c - ) - -# includes -target_include_directories(pm3rrg_rdv4 PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${BZIP2_INCLUDE_DIRS} - ${PM3_ROOT}/common - ${PM3_ROOT}/common_fpga - ${PM3_ROOT}/include - ${PM3_ROOT}/client/src - ${PM3_ROOT}/client/include - ) - -target_link_libraries(pm3rrg_rdv4 - ${BZIP2_LIBRARIES} - pm3rrg_rdv4_hardnested - pm3rrg_rdv4_mbedtls - pm3rrg_rdv4_cliparser - pm3rrg_rdv4_jansson - pm3rrg_rdv4_lua - pm3rrg_rdv4_tinycbor - pm3rrg_rdv4_amiibo - pm3rrg_rdv4_reveng - pm3rrg_rdv4_whereami - android - log) diff --git a/client/android/jni_tools.c b/client/android/jni_tools.c deleted file mode 100644 index 66f1cf3f8..000000000 --- a/client/android/jni_tools.c +++ /dev/null @@ -1,81 +0,0 @@ -// -// Created by DXL on 2017/9/1. -// - -//including header -#include <malloc.h> -#include <jni_tools.h> -#include <stdbool.h> - -// native thread attach label -static bool g_IsAttach; - -// get current env for jvm -JNIEnv *getJniEnv() { - JNIEnv *currentThreadEnv; - g_IsAttach = false; - if ((*g_JavaVM)->GetEnv(g_JavaVM, (void **) ¤tThreadEnv, JNI_VERSION_1_4) != JNI_OK) { - LOGE("Get Env Fail!"); - if ((*g_JavaVM)->AttachCurrentThread(g_JavaVM, ¤tThreadEnv, NULL) != JNI_OK) { - LOGE("Attach the current thread Fail!"); - g_IsAttach = false; - return NULL; - } else { - g_IsAttach = true; - LOGE("Attach the current thread Success!"); - return currentThreadEnv; - } - } else { - g_IsAttach = false; - //LOGE("Get Env Success!"); - return currentThreadEnv; - } -} - -// detach native thread from jvm -void detachThread() { - if (g_IsAttach) { - (*g_JavaVM)->DetachCurrentThread(g_JavaVM); - } -} - -// cmd arg parse -CMD *parse_command_line(const char *commandStr) { - CMD *cmd = (CMD *) malloc(sizeof(CMD)); - if (!cmd) { - return NULL; - } - // copy the source to the heap - char *pTmp = strdup(commandStr); - // new memory size is default 20 for char ** - int size = 20; - cmd->cmd = (char **) malloc(size * sizeof(char **)); - if (!cmd->cmd) { - free(cmd); - return NULL; - } - // parse - char *pStr = strtok(pTmp, " "); - cmd->cmd[0] = pStr; - int count = 1; - for (; pStr != NULL; ++count) { - // Capacity expansion - if (count == (size - 1)) { - size += 20; - cmd->cmd = (char **) realloc(cmd->cmd, size * sizeof(char **)); - } - pStr = strtok(NULL, " "); - if (pStr) { - cmd->cmd[count] = pStr; - } - } - cmd->len = (count - 1); - return cmd; -} - -// cmd arg struct free -void free_command_line(CMD *cmd) { - free(cmd->cmd[0]); - free(cmd->cmd); - free(cmd); -} diff --git a/client/android/jni_tools.h b/client/android/jni_tools.h deleted file mode 100644 index 8e900374f..000000000 --- a/client/android/jni_tools.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Created by dell on 2017/9/1. -// - -#ifndef DXL_TOOLS_H -#define DXL_TOOLS_H - -#include <jni.h> -#include <android/log.h> -#include <string.h> - -//JNI LOG -#define TAG "PM3" -#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,TAG,__VA_ARGS__) -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG,__VA_ARGS__) -#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG,__VA_ARGS__) -#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG,__VA_ARGS__) -#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__) - -// a global jvm instance -JavaVM *g_JavaVM; - -// get current env for jvm -JNIEnv *getJniEnv(); - -// detach native thread from jvm๏ผŒ must native thread can detach! -void detachThread(); - -typedef struct { - char **cmd; - int len; -} CMD; - -// cmd arg parse -CMD *parse_command_line(const char *commandStr); - -// cmd arg struct free -void free_command_line(CMD *); - -#endif //DXL_TOOLS_H diff --git a/client/android/pm3_main.c b/client/android/pm3_main.c deleted file mode 100644 index 7c78df203..000000000 --- a/client/android/pm3_main.c +++ /dev/null @@ -1,174 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (C) 2009 Michael Gernoth <michael at gernoth.net> -// Copyright (C) 2010 iZsh <izsh at fail0verflow.com> -// -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. -//----------------------------------------------------------------------------- -// Main binary -//----------------------------------------------------------------------------- - -#include "proxmark3.h" - -#include <stdlib.h> -#include <stdio.h> // for Mingw readline -#include <limits.h> -#include <unistd.h> -#include <ctype.h> -#include "usart_defs.h" -#include "util_posix.h" -#include "proxgui.h" -#include "cmdmain.h" -#include "ui.h" -#include "cmdhw.h" -#include "whereami.h" -#include "comms.h" -#include "fileutils.h" -#include "commonutil.h" // ARRAYLEN -#include "jni_tools.h" - -//iceman, todo: proxify socker server name. Maybe set in preferences? -// DXL reply, todo: -// Is a good idea, we can move this def to preferences, but not now. -// Because libpm3rrg_rdv4.so cant load preferences. -// I will impl a function to load preferences at future. -#define PM3_LOCAL_SOCKET_SERVER "DXL.COM.ASL" - -static char *g_android_executable_directory = NULL; -static char *g_android_user_directory = NULL; - -char g_version_information[] = {""}; - -const char *get_my_executable_directory(void) { - if (g_android_executable_directory == NULL) { - char buf[FILE_PATH_SIZE] = {0}; - getcwd(buf, sizeof(buf)); - strncat(buf, PATHSEP, 1); - g_android_executable_directory = strdup(buf); - } - return g_android_executable_directory; -} - -const char *get_my_user_directory(void) { - return g_android_user_directory; -} - -void ShowGraphWindow(void) {} - -void HideGraphWindow(void) {} - -void RepaintGraphWindow(void) {} - -void ShowPictureWindow(char *fn) {} - -void HidePictureWindow(void) {} - -void RepaintPictureWindow(void) {} - -int push_cmdscriptfile(char *path, bool stayafter) { return PM3_SUCCESS; } - -static bool OpenPm3(void) { - if (g_conn.run) { return true; } - // Open with LocalSocket. Not a tcp connection! - bool ret = OpenProxmark(session.current_device, "socket:"PM3_LOCAL_SOCKET_SERVER, false, 1000, false, 115200); - return ret; -} - -/* - * Transfers to the command buffer and waits for a new command to be executed - * */ -jint Console(JNIEnv *env, jobject instance, jstring cmd_) { - - if (!g_conn.run) { - if (OpenPm3() && TestProxmark(session.current_device) == PM3_SUCCESS) { - LOGD("Connected to device"); - PrintAndLogEx(SUCCESS, "Connected to device"); - } else { - LOGD("Failed to connect to device"); - PrintAndLogEx(ERR, "Failed to connect to device"); - CloseProxmark(session.current_device); - } - } - - PrintAndLogEx(NORMAL, ""); - - char *cmd = (char *)((*env)->GetStringUTFChars(env, cmd_, 0)); - int ret = CommandReceived(cmd); - if (ret == 99) { - // exit / quit - // TODO: implement this - PrintAndLogEx(NORMAL, "Asked to exit, can't really do that yet..."); - } - - (*env)->ReleaseStringUTFChars(env, cmd_, cmd); - return ret; -} - -/* - * Is client running! - * */ -jboolean IsClientRunning(JNIEnv *env, jobject instance) { - return (jboolean)((jboolean) g_conn.run); -} - -/* - * test hw and fw and client. - * */ -jboolean TestPm3(JNIEnv *env, jobject instance) { - if (open() == false) { - CloseProxmark(session.current_device); - return false; - } - bool ret = (TestProxmark(session.current_device) == PM3_SUCCESS); - return (jboolean)(ret); -} - -/* - * stop pm3 client - * */ -void ClosePm3(JNIEnv *env, jobject instance) { - CloseProxmark(session.current_device); -} - -/* - * native function map to jvm - * */ - -//iceman: todo, pm3:ify java class root. Return codes, should match PM3_E* codes. -JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) { - JNIEnv *jniEnv = NULL; - if ((*vm)->GetEnv(vm, (void **) &jniEnv, JNI_VERSION_1_4) != JNI_OK) { - return -1; - } - (*jniEnv)->GetJavaVM(jniEnv, &g_JavaVM); - jclass clazz = (*jniEnv)->FindClass(jniEnv, "cn/rrg/natives/Proxmark3RRGRdv4Tools"); - if (clazz == NULL) { - return -1; - } - jclass clz_test = (*jniEnv)->FindClass(jniEnv, "cn/rrg/devices/Proxmark3RRGRdv4"); - JNINativeMethod methods[] = { - {"startExecute", "(Ljava/lang/String;)I", (void *) Console}, - {"stopExecute", "()V", (void *) ClosePm3}, - {"isExecuting", "()Z", (void *) IsClientRunning} - }; - - JNINativeMethod methods1[] = { - {"testPm3", "()Z", (void *) TestPm3}, - {"closePm3", "()V", ClosePm3} - }; - - if ((*jniEnv)->RegisterNatives(jniEnv, clazz, methods, ARRAYLEN(methods)) != - JNI_OK) { - return -1; - } - - if ((*jniEnv)->RegisterNatives(jniEnv, clz_test, methods1, - ARRAYLEN(methods1)) != JNI_OK) { - return -1; - } - - (*jniEnv)->DeleteLocalRef(jniEnv, clazz); - (*jniEnv)->DeleteLocalRef(jniEnv, clz_test); - return JNI_VERSION_1_4; -} From 221a06321b8b3009e38e6409073e93d0f338f859 Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Mon, 10 Jan 2022 22:29:57 +0100 Subject: [PATCH 51/73] cppcheck fix - array out of bounds. last item is null reduce 1 from arr len, zero based index reduce -1 to get index....\n also made the compare caseinsensitive --- client/src/cmdhficlass.c | 2 +- client/src/cmdlfhid.c | 6 +++--- client/src/wiegand_formats.c | 24 +++++++++++++++--------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 15e04a270..e61ea6df1 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -3830,7 +3830,7 @@ static int CmdHFiClassEncode(const char *Cmd) { wiegand_message_t packed; memset(&packed, 0, sizeof(wiegand_message_t)); - int format_idx = HIDFindCardFormat((char *)format); + int format_idx = HIDFindCardFormat(format); if (format_idx == -1) { PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format); return PM3_EINVARG; diff --git a/client/src/cmdlfhid.c b/client/src/cmdlfhid.c index dbb8c3d12..e673f1829 100644 --- a/client/src/cmdlfhid.c +++ b/client/src/cmdlfhid.c @@ -279,7 +279,7 @@ static int CmdHIDSim(const char *Cmd) { memset(&packed, 0, sizeof(wiegand_message_t)); // format validation - int format_idx = HIDFindCardFormat((char *)format); + int format_idx = HIDFindCardFormat(format); if (format_idx == -1 && raw_len == 0) { PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format); return PM3_EINVARG; @@ -383,7 +383,7 @@ static int CmdHIDClone(const char *Cmd) { memset(&packed, 0, sizeof(wiegand_message_t)); // format validation - int format_idx = HIDFindCardFormat((char *)format); + int format_idx = HIDFindCardFormat(format); if (format_idx == -1 && raw_len == 0) { PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format); return PM3_EINVARG; @@ -509,7 +509,7 @@ static int CmdHIDBrute(const char *Cmd) { formatLen = sizeof(format); CLIGetStrWithReturn(ctx, 2, format, &formatLen); - format_idx = HIDFindCardFormat((char *) format); + format_idx = HIDFindCardFormat(format); if (format_idx == -1) { PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format); CLIParserFree(ctx); diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index c7cf1d21b..ae29f72f3 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1391,7 +1391,7 @@ void HIDListFormats(void) { ++i; } PrintAndLogEx(INFO, "------------------------------------------------------------"); - PrintAndLogEx(INFO, "Available card formats: " _YELLOW_("%" PRIu64), ARRAYLEN(FormatTable)); + PrintAndLogEx(INFO, "Available card formats: " _YELLOW_("%" PRIu64), ARRAYLEN(FormatTable) - 1); PrintAndLogEx(NORMAL, ""); return; } @@ -1402,27 +1402,33 @@ cardformat_t HIDGetCardFormat(int idx) { int HIDFindCardFormat(const char *format) { - if (FormatTable[0].Name == NULL) - return -1; + char* s = str_dup(format); + str_lower(s); int i = 0; + while (FormatTable[i].Name) { -// str_lower + char* a = str_dup(FormatTable[i].Name); + str_lower(a); - while (FormatTable[i].Name && strcmp(FormatTable[i].Name, format)) { + if (strcmp(a, s) == 0) { + free(a); + free(s); + return i; + } + + free(a); ++i; } - if (FormatTable[i].Name) - return i; - + free(s); return -1; } bool HIDPack(int format_idx, wiegand_card_t *card, wiegand_message_t *packed, bool preamble) { memset(packed, 0, sizeof(wiegand_message_t)); - if ((format_idx < 0) || (format_idx >= ARRAYLEN(FormatTable) - 1)) + if ((format_idx < 0) || (format_idx > ARRAYLEN(FormatTable) - 2)) return false; return FormatTable[format_idx].Pack(card, packed, preamble); From 651b8f752ec8399d26e300faf0adc3f9c4161daf Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Mon, 10 Jan 2022 22:30:57 +0100 Subject: [PATCH 52/73] text --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 107228324..0e46f77b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + - Changed Wiegand format lookup - now case-insensitive (@iceman1001) - Added new standalone mode `hf_15SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem (@startrk1995) - Added support for MIFARE DESFire application creation without authentication (@joswr1ght) - Changed drastically Hitag S ARM code to remove state machines and ease way to build new commands (@doegox) From caf9f07c7ab397837d4eb2d73b63120f33bfb837 Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Mon, 10 Jan 2022 22:41:02 +0100 Subject: [PATCH 53/73] fix lf hid brute param for format --- client/src/cmdlfhid.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/client/src/cmdlfhid.c b/client/src/cmdlfhid.c index e673f1829..cd86cd9fb 100644 --- a/client/src/cmdlfhid.c +++ b/client/src/cmdlfhid.c @@ -469,16 +469,6 @@ static int CmdHIDClone(const char *Cmd) { */ static int CmdHIDBrute(const char *Cmd) { - - uint32_t delay = 1000; - int format_idx = -1; - int direction = 0; - uint8_t format[16] = {0}; - int formatLen; - - wiegand_card_t cn_hi, cn_low; - memset(&cn_hi, 0, sizeof(wiegand_card_t)); - CLIParserContext *ctx; CLIParserInit(&ctx, "lf hid brute", "Enables bruteforce of HID readers with specified facility code.\n" @@ -506,22 +496,29 @@ static int CmdHIDBrute(const char *Cmd) { CLIExecWithReturn(ctx, Cmd, argtable, false); bool verbose = arg_get_lit(ctx, 1); - formatLen = sizeof(format); - CLIGetStrWithReturn(ctx, 2, format, &formatLen); - format_idx = HIDFindCardFormat(format); + char format[16] = {0}; + int format_len = 0; + CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t *)format, sizeof(format), &format_len); + + int format_idx = HIDFindCardFormat(format); if (format_idx == -1) { PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format); CLIParserFree(ctx); return PM3_EINVARG; } + wiegand_card_t cn_hi, cn_low; + memset(&cn_hi, 0, sizeof(wiegand_card_t)); + cn_hi.FacilityCode = arg_get_u32_def(ctx, 3, 0); cn_hi.CardNumber = arg_get_u32_def(ctx, 4, 0); cn_hi.IssueLevel = arg_get_u32_def(ctx, 5, 0); cn_hi.OEM = arg_get_u32_def(ctx, 6, 0); - delay = arg_get_u32_def(ctx, 7, 1000); + uint32_t delay = arg_get_u32_def(ctx, 7, 1000); + + int direction = 0; if (arg_get_lit(ctx, 8) && arg_get_lit(ctx, 9)) { direction = 0; } else if (arg_get_lit(ctx, 8)) { From 65cc18130774f04e4febea907ceb7dc6a644099d Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Tue, 11 Jan 2022 00:38:10 +0100 Subject: [PATCH 54/73] update license header --- client/pyscripts/pm3_help2list.py | 18 +++++++++++++----- client/src/rl_vocabulory.h | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/client/pyscripts/pm3_help2list.py b/client/pyscripts/pm3_help2list.py index ff24dda8d..58830b7e6 100755 --- a/client/pyscripts/pm3_help2list.py +++ b/client/pyscripts/pm3_help2list.py @@ -48,11 +48,19 @@ def main(): command_data = parse_all_command_data(help_text) args.output_file.write("""//----------------------------------------------------------------------------- -// Copyright (C) 2021 <iceman> +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // readline auto complete utilities //----------------------------------------------------------------------------- @@ -64,7 +72,7 @@ def main(): extern "C" { #endif -#ifdef HAVE_READLINE +#if defined(HAVE_READLINE) #include <stdlib.h> #include <string.h> #include <readline/readline.h> diff --git a/client/src/rl_vocabulory.h b/client/src/rl_vocabulory.h index 87dcf1b6d..3cebed491 100644 --- a/client/src/rl_vocabulory.h +++ b/client/src/rl_vocabulory.h @@ -1,9 +1,17 @@ //----------------------------------------------------------------------------- -// Copyright (C) 2021 <iceman> +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- // readline auto complete utilities //----------------------------------------------------------------------------- @@ -15,7 +23,7 @@ extern "C" { #endif -#ifdef HAVE_READLINE +#if defined(HAVE_READLINE) #include <stdlib.h> #include <string.h> #include <readline/readline.h> From 105d5334dbe90d7f03db8e9487a1b7725a7e2246 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Tue, 11 Jan 2022 02:15:54 +0100 Subject: [PATCH 55/73] make style to remove zx --- client/src/rl_vocabulory.h | 3 --- client/src/wiegand_formats.c | 4 ++-- doc/commands.json | 31 +++---------------------------- doc/commands.md | 11 ----------- 4 files changed, 5 insertions(+), 44 deletions(-) diff --git a/client/src/rl_vocabulory.h b/client/src/rl_vocabulory.h index 3cebed491..ce1d1a7c2 100644 --- a/client/src/rl_vocabulory.h +++ b/client/src/rl_vocabulory.h @@ -654,9 +654,6 @@ const static vocabulory_t vocabulory[] = { { 0, "lf visa2000 reader" }, { 0, "lf visa2000 clone" }, { 0, "lf visa2000 sim" }, - { 1, "lf zx help" }, - { 1, "lf zx demod" }, - { 0, "lf zx reader" }, { 1, "mem help" }, { 0, "mem baudrate" }, { 0, "mem dump" }, diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index ae29f72f3..1e417df5d 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1402,13 +1402,13 @@ cardformat_t HIDGetCardFormat(int idx) { int HIDFindCardFormat(const char *format) { - char* s = str_dup(format); + char *s = str_dup(format); str_lower(s); int i = 0; while (FormatTable[i].Name) { - char* a = str_dup(FormatTable[i].Name); + char *a = str_dup(FormatTable[i].Name); str_lower(a); if (strcmp(a, s) == 0) { diff --git a/doc/commands.json b/doc/commands.json index 4b2d6edca..ca5b13fb5 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -7255,7 +7255,7 @@ }, "lf help": { "command": "lf help", - "description": "help this help ----------- -------------- low frequency -------------- awid { awid rfids... } cotag { cotag chips... } destron { fdx-a destron rfids... } em { em chips & rfids... } fdxb { fdx-b rfids... } gallagher { gallagher rfids... } gproxii { guardall prox ii rfids... } hid { hid prox rfids... } hitag { hitag chips... } idteck { idteck rfids... } indala { indala rfids... } io { ioprox rfids... } jablotron { jablotron rfids... } keri { keri rfids... } motorola { motorola rfids... } nedap { nedap rfids... } nexwatch { nexwatch rfids... } noralsy { noralsy rfids... } pac { pac/stanley rfids... } paradox { paradox rfids... } pcf7931 { pcf7931 chips... } presco { presco rfids... } pyramid { farpointe/pyramid rfids... } securakey { securakey rfids... } ti { ti chips... } t55xx { t55xx chips... } viking { viking rfids... } visa2000 { visa2000 rfids... } zx { zx8211 rfids... } ----------- --------------------- general --------------------- search read and search for valid known tag --------------------------------------------------------------------------------------- lf config available offline: no get/set config for lf sampling, bit/sample, decimation, frequency these changes are temporary, will be reset after a power cycle. - use `lf read` performs a read (active field) - use `lf sniff` performs a sniff (no active field)", + "description": "help this help ----------- -------------- low frequency -------------- awid { awid rfids... } cotag { cotag chips... } destron { fdx-a destron rfids... } em { em chips & rfids... } fdxb { fdx-b rfids... } gallagher { gallagher rfids... } gproxii { guardall prox ii rfids... } hid { hid prox rfids... } hitag { hitag chips... } idteck { idteck rfids... } indala { indala rfids... } io { ioprox rfids... } jablotron { jablotron rfids... } keri { keri rfids... } motorola { motorola rfids... } nedap { nedap rfids... } nexwatch { nexwatch rfids... } noralsy { noralsy rfids... } pac { pac/stanley rfids... } paradox { paradox rfids... } pcf7931 { pcf7931 chips... } presco { presco rfids... } pyramid { farpointe/pyramid rfids... } securakey { securakey rfids... } ti { ti chips... } t55xx { t55xx chips... } viking { viking rfids... } visa2000 { visa2000 rfids... } ----------- --------------------- general --------------------- search read and search for valid known tag --------------------------------------------------------------------------------------- lf config available offline: no get/set config for lf sampling, bit/sample, decimation, frequency these changes are temporary, will be reset after a power cycle. - use `lf read` performs a read (active field) - use `lf sniff` performs a sniff (no active field)", "notes": [ "lf config -> shows current config", "lf config -b 8 --125 -> samples at 125 khz, 8 bps", @@ -9176,31 +9176,6 @@ ], "usage": "lf visa2000 sim [-h] --cn <dec>" }, - "lf zx help": { - "command": "lf zx help", - "description": "help this help demod demodulate an zx 8211 tag from the graphbuffer --------------------------------------------------------------------------------------- lf zx demod available offline: yes try to find zx8211 preamble, if found decode / descramble data", - "notes": [ - "lf zx demod" - ], - "offline": true, - "options": [ - "-h, --help this help" - ], - "usage": "lf zx demod [-h]" - }, - "lf zx reader": { - "command": "lf zx reader", - "description": "read a zx tag", - "notes": [ - "lf zx reader -@ -> continuous reader mode" - ], - "offline": false, - "options": [ - "-h, --help this help", - "-@ optional - continuous reader mode" - ], - "usage": "lf zx reader [-h@]" - }, "mem dump": { "command": "mem dump", "description": "dumps flash memory on device into a file or view in console", @@ -10235,8 +10210,8 @@ } }, "metadata": { - "commands_extracted": 601, + "commands_extracted": 599, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2022-01-09T13:10:14" + "extracted_on": "2022-01-11T01:15:20" } } \ No newline at end of file diff --git a/doc/commands.md b/doc/commands.md index 7bf7ce494..f585b71da 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -1139,17 +1139,6 @@ Check column "offline" for their availability. |`lf visa2000 sim `|N |`simulate Visa2000 tag` -### lf zx - - { ZX8211 RFIDs... } - -|command |offline |description -|------- |------- |----------- -|`lf zx help `|Y |`This help` -|`lf zx demod `|Y |`demodulate an ZX 8211 tag from the GraphBuffer` -|`lf zx reader `|N |`attempt to read and extract tag data` - - ### mem { Flash memory manipulation... } From c754122a74156ce8ebe8572fca71f653ec3b9a44 Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 08:56:59 +0100 Subject: [PATCH 56/73] coverity fix CID #370724 --- client/src/emv/emv_pk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/emv/emv_pk.c b/client/src/emv/emv_pk.c index e3f871fd7..b32c703ec 100644 --- a/client/src/emv/emv_pk.c +++ b/client/src/emv/emv_pk.c @@ -267,7 +267,7 @@ static size_t emv_pk_write_str(char *out, size_t outlen, const char *str) { char *emv_pk_dump_pk(const struct emv_pk *pk) { size_t outpos = 0; - size_t outsize = 1024; // should be enough + size_t outsize = 1048; // should be enough char *out = calloc(1, outsize); // should be enough if (!out) return NULL; From 5f9d8273e6faef96562b8db2485be8bd1665b24f Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 10:54:14 +0100 Subject: [PATCH 57/73] fix outofbounds --- client/src/emv/emv_pk.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/client/src/emv/emv_pk.c b/client/src/emv/emv_pk.c index b32c703ec..8df7a2067 100644 --- a/client/src/emv/emv_pk.c +++ b/client/src/emv/emv_pk.c @@ -269,23 +269,27 @@ char *emv_pk_dump_pk(const struct emv_pk *pk) { size_t outpos = 0; size_t outsize = 1048; // should be enough char *out = calloc(1, outsize); // should be enough - if (!out) + if (out == NULL) { return NULL; + } size_t rc = emv_pk_write_bin(out + outpos, outsize - outpos, pk->rid, 5); - if (rc == 0) + if (rc == 0) { goto err; + } outpos += rc; rc = emv_pk_write_bin(out + outpos, outsize - outpos, &pk->index, 1); - if (rc == 0) + if (rc == 0) { goto err; + } outpos += rc; - if (outpos + 7 > outsize) + if (outpos + 7 >= outsize) { goto err; + } out[outpos++] = TOHEX((pk->expire >> 20) & 0xf); out[outpos++] = TOHEX((pk->expire >> 16) & 0xf); out[outpos++] = TOHEX((pk->expire >> 12) & 0xf); @@ -296,13 +300,15 @@ char *emv_pk_dump_pk(const struct emv_pk *pk) { if (pk->pk_algo == PK_RSA) { rc = emv_pk_write_str(out + outpos, outsize - outpos, "rsa"); - if (rc == 0) + if (rc == 0) { goto err; + } outpos += rc; out[outpos++] = ' '; } else { - if (outpos + 4 > outsize) + if (outpos + 4 >= outsize) { goto err; + } out[outpos++] = '?'; out[outpos++] = '?'; out[outpos++] = TOHEX(pk->pk_algo >> 4); @@ -310,24 +316,28 @@ char *emv_pk_dump_pk(const struct emv_pk *pk) { } rc = emv_pk_write_bin(out + outpos, outsize - outpos, pk->exp, pk->elen); - if (rc == 0) + if (rc == 0) { goto err; + } outpos += rc; rc = emv_pk_write_bin(out + outpos, outsize - outpos, pk->modulus, pk->mlen); - if (rc == 0) + if (rc == 0) { goto err; + } outpos += rc; if (pk->hash_algo == HASH_SHA_1) { rc = emv_pk_write_str(out + outpos, outsize - outpos, "sha1"); - if (rc == 0) + if (rc == 0) { goto err; + } outpos += rc; out[outpos++] = ' '; } else { - if (outpos + 4 > outsize) + if (outpos + 4 >= outsize) { goto err; + } out[outpos++] = '?'; out[outpos++] = '?'; out[outpos++] = TOHEX(pk->pk_algo >> 4); @@ -336,12 +346,12 @@ char *emv_pk_dump_pk(const struct emv_pk *pk) { rc = emv_pk_write_bin(out + outpos, outsize - outpos, pk->hash, 20); - if (rc == 0) + if (rc == 0) { goto err; + } + outpos += rc; - out[outpos - 1] = '\0'; - return out; err: From 8d5f31757f155c95d7ede4abf9cd1f6531b7344a Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 10:59:22 +0100 Subject: [PATCH 58/73] avoid printing null items --- client/src/wiegand_formats.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index 1e417df5d..d7818661c 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1259,6 +1259,11 @@ static bool Unpack_bc40(wiegand_message_t *packed, wiegand_card_t *card) { void print_desc_wiegand(cardformat_t *fmt, wiegand_message_t *packed) { + // return if invalid card format + if (fmt->Name == NULL) { + return; + } + char *s = calloc(128, sizeof(uint8_t)); sprintf(s, _YELLOW_("%-10s")" %-32s", fmt->Name, fmt->Descrp); @@ -1397,6 +1402,11 @@ void HIDListFormats(void) { } cardformat_t HIDGetCardFormat(int idx) { + + // if idx is out-of-bounds, return the last item + if ((idx < 0) || (idx > ARRAYLEN(FormatTable) - 2)) { + return FormatTable[ARRAYLEN(FormatTable) - 1]; + } return FormatTable[idx]; } From b15f7c4789d7d9d125fd471f8ed357e57d4d5b35 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Tue, 11 Jan 2022 14:26:50 +0100 Subject: [PATCH 59/73] Inject readline markers only if using readline --- include/ansi.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/ansi.h b/include/ansi.h index 47ce9a5be..c06c06e6b 100644 --- a/include/ansi.h +++ b/include/ansi.h @@ -32,12 +32,17 @@ #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 // characters that take up no physical screen space when displayed by // bracketing a sequence of such characters with the special markers // RL_PROMPT_START_IGNORE = '\001' and RL_PROMPT_END_IGNORE = '\002' #define RL_ESC(a) "\001" a "\002" +#else +#define RL_ESC(a) a +#endif // HAVE_READLINE #define _RL_RED_(s) RL_ESC("\x1b[31m") s RL_ESC(AEND) #define _RL_GREEN_(s) RL_ESC("\x1b[32m") s RL_ESC(AEND) From 4b7a8f02d4550d3b1a37e523e130a08d0369ebd2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Tue, 11 Jan 2022 15:06:22 +0100 Subject: [PATCH 60/73] fix 'lf ti demod' segfault --- client/src/cmdlfti.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/cmdlfti.c b/client/src/cmdlfti.c index 20efd5472..cd339b087 100644 --- a/client/src/cmdlfti.c +++ b/client/src/cmdlfti.c @@ -98,6 +98,9 @@ int demodTI(bool verbose) { int lowTot = 0, highTot = 0; int retval = PM3_ESOFT; + if (g_GraphTraceLen < convLen) { + return retval; + } for (i = 0; i < g_GraphTraceLen - convLen; i++) { lowSum = 0; highSum = 0; From f986b838e4b07f1a243ce05c54bfeb11c0f23a5b Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 19:06:08 +0100 Subject: [PATCH 61/73] text --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e46f77b2..982e79169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + +## [Frostbit] [2022-01-11] - Changed Wiegand format lookup - now case-insensitive (@iceman1001) - Added new standalone mode `hf_15SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem (@startrk1995) - Added support for MIFARE DESFire application creation without authentication (@joswr1ght) From 0b65f2bc9e835885378e32e1fe05076e29bc05e3 Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 19:17:19 +0100 Subject: [PATCH 62/73] Release v4.14831 - Frostbit --- Makefile.defs | 4 ++-- armsrc/Makefile | 2 +- bootrom/Makefile | 2 +- client/CMakeLists.txt | 4 ++-- client/Makefile | 4 ++-- client/deps/amiibo.cmake | 2 +- client/deps/cliparser.cmake | 2 +- client/deps/hardnested.cmake | 14 +++++++------- client/deps/jansson.cmake | 2 +- client/deps/lua.cmake | 2 +- client/deps/mbedtls.cmake | 2 +- client/deps/reveng.cmake | 2 +- client/deps/tinycbor.cmake | 2 +- client/deps/whereami.cmake | 2 +- client/src/proxmark3.c | 2 +- common/default_version_pm3.c | 26 ++++++-------------------- common_arm/Makefile.common | 2 +- 17 files changed, 31 insertions(+), 45 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 06396d3d0..a8e9dea24 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -89,8 +89,8 @@ ifeq ($(DEBUG),1) DEFCFLAGS = -g -O0 -fstrict-aliasing -pipe DEFLDFLAGS = else - DEFCXXFLAGS = -Wall -Werror -O3 -pipe - DEFCFLAGS = -Wall -Werror -O3 -fstrict-aliasing -pipe + DEFCXXFLAGS = -Wall -O3 -pipe + DEFCFLAGS = -Wall -O3 -fstrict-aliasing -pipe DEFLDFLAGS = endif diff --git a/armsrc/Makefile b/armsrc/Makefile index 968dc445d..dea06a66b 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -184,7 +184,7 @@ showinfo: # version_pm3.c should be remade on every time fullimage.stage1.elf should be remade version_pm3.c: default_version_pm3.c $(OBJDIR)/fpga_version_info.o $(OBJDIR)/fpga_all.o $(THUMBOBJ) $(ARMOBJ) $(info [-] GEN $@) - $(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@ + $(Q)$(CP) $< $@ fpga_version_info.c: $(FPGA_BITSTREAMS) $(FPGA_COMPRESSOR) $(info [-] GEN $@) diff --git a/bootrom/Makefile b/bootrom/Makefile index a1bc5f7ae..1affc593c 100644 --- a/bootrom/Makefile +++ b/bootrom/Makefile @@ -50,7 +50,7 @@ OBJS = $(OBJDIR)/bootrom.s19 # version_pm3.c should be remade on every compilation version_pm3.c: default_version_pm3.c $(info [=] GEN $@) - $(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@ + $(Q)$(CP) $< $@ all: showinfo $(OBJS) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 26d5c16bd..031853c84 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -353,7 +353,7 @@ set (TARGET_SOURCES add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/version_pm3.c - COMMAND sh ${PM3_ROOT}/tools/mkversion.sh > ${CMAKE_BINARY_DIR}/version_pm3.c || perl ${PM3_ROOT}/tools/mkversion.pl > ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c + COMMAND ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c DEPENDS ${PM3_ROOT}/common/default_version_pm3.c ) @@ -540,7 +540,7 @@ add_executable(proxmark3 ${ADDITIONAL_SRC} ) -target_compile_options(proxmark3 PUBLIC -Wall -Werror -O3) +target_compile_options(proxmark3 PUBLIC -Wall -O3) if (EMBED_READLINE) if (NOT SKIPREADLINE EQUAL 1) add_dependencies(proxmark3 ncurses readline) diff --git a/client/Makefile b/client/Makefile index 0b74919c2..f42494c61 100644 --- a/client/Makefile +++ b/client/Makefile @@ -377,7 +377,7 @@ ifeq ($(SWIG_PYTHON_FOUND),1) PM3CFLAGS += -DHAVE_PYTHON_SWIG endif -CXXFLAGS ?= -Wall -Werror -O3 +CXXFLAGS ?= -Wall -O3 PM3CXXFLAGS = $(CXXFLAGS) PM3CXXFLAGS += -I../include -I./include @@ -838,7 +838,7 @@ src/pm3_pywrap.c: pm3.i # version_pm3.c should be remade on every compilation src/version_pm3.c: default_version_pm3.c $(info [=] GEN $@) - $(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@ + $(Q)$(CP) $< $@ # easy printing of MAKE VARIABLES print-%: ; @echo $* = $($*) diff --git a/client/deps/amiibo.cmake b/client/deps/amiibo.cmake index c946c0682..8c524c170 100644 --- a/client/deps/amiibo.cmake +++ b/client/deps/amiibo.cmake @@ -19,7 +19,7 @@ target_link_libraries(pm3rrg_rdv4_amiibo PRIVATE m pm3rrg_rdv4_mbedtls) -target_compile_options(pm3rrg_rdv4_amiibo PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_amiibo PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_amiibo PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(pm3rrg_rdv4_amiibo PRIVATE amiitool diff --git a/client/deps/cliparser.cmake b/client/deps/cliparser.cmake index fccae33b7..a85cc2374 100644 --- a/client/deps/cliparser.cmake +++ b/client/deps/cliparser.cmake @@ -9,5 +9,5 @@ target_include_directories(pm3rrg_rdv4_cliparser PRIVATE ../../include ../src) target_include_directories(pm3rrg_rdv4_cliparser INTERFACE cliparser) -target_compile_options(pm3rrg_rdv4_cliparser PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_cliparser PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_cliparser PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/hardnested.cmake b/client/deps/hardnested.cmake index dc569641c..67be099fa 100644 --- a/client/deps/hardnested.cmake +++ b/client/deps/hardnested.cmake @@ -2,7 +2,7 @@ add_library(pm3rrg_rdv4_hardnested_nosimd OBJECT hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) -target_compile_options(pm3rrg_rdv4_hardnested_nosimd PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_hardnested_nosimd PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_hardnested_nosimd PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(pm3rrg_rdv4_hardnested_nosimd PRIVATE @@ -28,7 +28,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_mmx PRIVATE -Wall -Werror -O3) + target_compile_options(pm3rrg_rdv4_hardnested_mmx PRIVATE -Wall -O3) target_compile_options(pm3rrg_rdv4_hardnested_mmx BEFORE PRIVATE -mmmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_mmx PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -43,7 +43,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_sse2 PRIVATE -Wall -Werror -O3) + target_compile_options(pm3rrg_rdv4_hardnested_sse2 PRIVATE -Wall -O3) target_compile_options(pm3rrg_rdv4_hardnested_sse2 BEFORE PRIVATE -mmmx -msse2 -mno-avx -mno-avx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_sse2 PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -58,7 +58,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_avx PRIVATE -Wall -Werror -O3) + target_compile_options(pm3rrg_rdv4_hardnested_avx PRIVATE -Wall -O3) target_compile_options(pm3rrg_rdv4_hardnested_avx BEFORE PRIVATE -mmmx -msse2 -mavx -mno-avx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_avx PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -73,7 +73,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_avx2 PRIVATE -Wall -Werror -O3) + target_compile_options(pm3rrg_rdv4_hardnested_avx2 PRIVATE -Wall -O3) target_compile_options(pm3rrg_rdv4_hardnested_avx2 BEFORE PRIVATE -mmmx -msse2 -mavx -mavx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_avx2 PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -88,7 +88,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_avx512 PRIVATE -Wall -Werror -O3) + target_compile_options(pm3rrg_rdv4_hardnested_avx512 PRIVATE -Wall -O3) target_compile_options(pm3rrg_rdv4_hardnested_avx512 BEFORE PRIVATE -mmmx -msse2 -mavx -mavx2 -mavx512f) set_property(TARGET pm3rrg_rdv4_hardnested_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -113,7 +113,7 @@ add_library(pm3rrg_rdv4_hardnested STATIC hardnested/hardnested_bruteforce.c $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_nosimd> ${SIMD_TARGETS}) -target_compile_options(pm3rrg_rdv4_hardnested PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_hardnested PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_hardnested PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(pm3rrg_rdv4_hardnested PRIVATE ../../common diff --git a/client/deps/jansson.cmake b/client/deps/jansson.cmake index c91a47047..42c701d5e 100644 --- a/client/deps/jansson.cmake +++ b/client/deps/jansson.cmake @@ -14,5 +14,5 @@ add_library(pm3rrg_rdv4_jansson STATIC target_compile_definitions(pm3rrg_rdv4_jansson PRIVATE HAVE_STDINT_H) target_include_directories(pm3rrg_rdv4_jansson INTERFACE jansson) -target_compile_options(pm3rrg_rdv4_jansson PRIVATE -Wall -Werror -Wno-unused-function -O3) +target_compile_options(pm3rrg_rdv4_jansson PRIVATE -Wall -Wno-unused-function -O3) set_property(TARGET pm3rrg_rdv4_jansson PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/lua.cmake b/client/deps/lua.cmake index 12870342e..5cf33d724 100644 --- a/client/deps/lua.cmake +++ b/client/deps/lua.cmake @@ -52,5 +52,5 @@ if (NOT MINGW) endif (NOT MINGW) target_include_directories(pm3rrg_rdv4_lua INTERFACE liblua) -target_compile_options(pm3rrg_rdv4_lua PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_lua PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_lua PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/mbedtls.cmake b/client/deps/mbedtls.cmake index 40929e1ea..c726ddeba 100644 --- a/client/deps/mbedtls.cmake +++ b/client/deps/mbedtls.cmake @@ -44,5 +44,5 @@ add_library(pm3rrg_rdv4_mbedtls STATIC target_include_directories(pm3rrg_rdv4_mbedtls PRIVATE ../../common) target_include_directories(pm3rrg_rdv4_mbedtls INTERFACE ../../common/mbedtls) -target_compile_options(pm3rrg_rdv4_mbedtls PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_mbedtls PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_mbedtls PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/reveng.cmake b/client/deps/reveng.cmake index d7e3cfd8a..1040730f1 100644 --- a/client/deps/reveng.cmake +++ b/client/deps/reveng.cmake @@ -13,5 +13,5 @@ target_include_directories(pm3rrg_rdv4_reveng PRIVATE ../src ../../include) target_include_directories(pm3rrg_rdv4_reveng INTERFACE reveng) -target_compile_options(pm3rrg_rdv4_reveng PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_reveng PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_reveng PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/tinycbor.cmake b/client/deps/tinycbor.cmake index 5a6abda25..c74618149 100644 --- a/client/deps/tinycbor.cmake +++ b/client/deps/tinycbor.cmake @@ -11,5 +11,5 @@ add_library(pm3rrg_rdv4_tinycbor STATIC target_include_directories(pm3rrg_rdv4_tinycbor INTERFACE tinycbor) # Strange errors on Mingw when compiling with -O3 -target_compile_options(pm3rrg_rdv4_tinycbor PRIVATE -Wall -Werror -O2) +target_compile_options(pm3rrg_rdv4_tinycbor PRIVATE -Wall -O2) set_property(TARGET pm3rrg_rdv4_tinycbor PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/whereami.cmake b/client/deps/whereami.cmake index d2d6a5b2a..721873066 100644 --- a/client/deps/whereami.cmake +++ b/client/deps/whereami.cmake @@ -2,5 +2,5 @@ add_library(pm3rrg_rdv4_whereami STATIC whereami/whereami.c) target_compile_definitions(pm3rrg_rdv4_whereami PRIVATE WAI_PM3_TUNED) target_include_directories(pm3rrg_rdv4_whereami INTERFACE whereami) -target_compile_options(pm3rrg_rdv4_whereami PRIVATE -Wall -Werror -O3) +target_compile_options(pm3rrg_rdv4_whereami PRIVATE -Wall -O3) set_property(TARGET pm3rrg_rdv4_whereami PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 67d1c6528..a63e2794c 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -46,7 +46,7 @@ #ifndef LIBPM3 #define BANNERMSG1 "" #define BANNERMSG2 " [ Iceman :snowflake: ]" -#define BANNERMSG3 "" +#define BANNERMSG3 "Release v4.14831 - Frostbit" typedef enum LogoMode { UTF8, ANSI, ASCII } LogoMode; diff --git a/common/default_version_pm3.c b/common/default_version_pm3.c index d2a1deb83..4e8a2d623 100644 --- a/common/default_version_pm3.c +++ b/common/default_version_pm3.c @@ -1,20 +1,5 @@ -//----------------------------------------------------------------------------- -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- #include "common.h" -/* This is the default version_pm3.c file that Makefile.common falls back to if neither sh nor perl are available */ +/* Generated file, do not edit */ #ifndef ON_DEVICE #define SECTVERSINFO #else @@ -23,8 +8,9 @@ const struct version_information_t SECTVERSINFO g_version_information = { VERSION_INFORMATION_MAGIC, - 1, /* version 1 */ - 0, /* version information not present */ - 2, /* cleanliness couldn't be determined */ - /* Remaining fields: zero */ + 1, + 1, + 1, + "RRG/Iceman/master/v4.14831", + "2022-01-11 19:17:19", }; diff --git a/common_arm/Makefile.common b/common_arm/Makefile.common index 99f4d9ecd..e40d998a6 100644 --- a/common_arm/Makefile.common +++ b/common_arm/Makefile.common @@ -49,7 +49,7 @@ VPATH = . ../common_arm ../common ../common/crapto1 ../common/mbedtls ../common/ INCLUDES = ../include/proxmark3_arm.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/pm3_cmd.h ARMCFLAGS = -mthumb-interwork -fno-builtin -DEFCFLAGS = -Wall -Werror -Os -pedantic -fstrict-aliasing -pipe +DEFCFLAGS = -Wall -Os -pedantic -fstrict-aliasing -pipe # Some more warnings we want as errors: DEFCFLAGS += -Wbad-function-cast -Wchar-subscripts -Wundef -Wunused -Wuninitialized -Wpointer-arith -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Wnested-externs -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wtype-limits From 1731695483def11ce6bfb914840bd9bb23d10653 Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 19:17:19 +0100 Subject: [PATCH 63/73] Revert "Release v4.14831 - Frostbit" This reverts commit 0b65f2bc9e835885378e32e1fe05076e29bc05e3. --- Makefile.defs | 4 ++-- armsrc/Makefile | 2 +- bootrom/Makefile | 2 +- client/CMakeLists.txt | 4 ++-- client/Makefile | 4 ++-- client/deps/amiibo.cmake | 2 +- client/deps/cliparser.cmake | 2 +- client/deps/hardnested.cmake | 14 +++++++------- client/deps/jansson.cmake | 2 +- client/deps/lua.cmake | 2 +- client/deps/mbedtls.cmake | 2 +- client/deps/reveng.cmake | 2 +- client/deps/tinycbor.cmake | 2 +- client/deps/whereami.cmake | 2 +- client/src/proxmark3.c | 2 +- common/default_version_pm3.c | 26 ++++++++++++++++++++------ common_arm/Makefile.common | 2 +- 17 files changed, 45 insertions(+), 31 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index a8e9dea24..06396d3d0 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -89,8 +89,8 @@ ifeq ($(DEBUG),1) DEFCFLAGS = -g -O0 -fstrict-aliasing -pipe DEFLDFLAGS = else - DEFCXXFLAGS = -Wall -O3 -pipe - DEFCFLAGS = -Wall -O3 -fstrict-aliasing -pipe + DEFCXXFLAGS = -Wall -Werror -O3 -pipe + DEFCFLAGS = -Wall -Werror -O3 -fstrict-aliasing -pipe DEFLDFLAGS = endif diff --git a/armsrc/Makefile b/armsrc/Makefile index dea06a66b..968dc445d 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -184,7 +184,7 @@ showinfo: # version_pm3.c should be remade on every time fullimage.stage1.elf should be remade version_pm3.c: default_version_pm3.c $(OBJDIR)/fpga_version_info.o $(OBJDIR)/fpga_all.o $(THUMBOBJ) $(ARMOBJ) $(info [-] GEN $@) - $(Q)$(CP) $< $@ + $(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@ fpga_version_info.c: $(FPGA_BITSTREAMS) $(FPGA_COMPRESSOR) $(info [-] GEN $@) diff --git a/bootrom/Makefile b/bootrom/Makefile index 1affc593c..a1bc5f7ae 100644 --- a/bootrom/Makefile +++ b/bootrom/Makefile @@ -50,7 +50,7 @@ OBJS = $(OBJDIR)/bootrom.s19 # version_pm3.c should be remade on every compilation version_pm3.c: default_version_pm3.c $(info [=] GEN $@) - $(Q)$(CP) $< $@ + $(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@ all: showinfo $(OBJS) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 031853c84..26d5c16bd 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -353,7 +353,7 @@ set (TARGET_SOURCES add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/version_pm3.c - COMMAND ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c + COMMAND sh ${PM3_ROOT}/tools/mkversion.sh > ${CMAKE_BINARY_DIR}/version_pm3.c || perl ${PM3_ROOT}/tools/mkversion.pl > ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c DEPENDS ${PM3_ROOT}/common/default_version_pm3.c ) @@ -540,7 +540,7 @@ add_executable(proxmark3 ${ADDITIONAL_SRC} ) -target_compile_options(proxmark3 PUBLIC -Wall -O3) +target_compile_options(proxmark3 PUBLIC -Wall -Werror -O3) if (EMBED_READLINE) if (NOT SKIPREADLINE EQUAL 1) add_dependencies(proxmark3 ncurses readline) diff --git a/client/Makefile b/client/Makefile index f42494c61..0b74919c2 100644 --- a/client/Makefile +++ b/client/Makefile @@ -377,7 +377,7 @@ ifeq ($(SWIG_PYTHON_FOUND),1) PM3CFLAGS += -DHAVE_PYTHON_SWIG endif -CXXFLAGS ?= -Wall -O3 +CXXFLAGS ?= -Wall -Werror -O3 PM3CXXFLAGS = $(CXXFLAGS) PM3CXXFLAGS += -I../include -I./include @@ -838,7 +838,7 @@ src/pm3_pywrap.c: pm3.i # version_pm3.c should be remade on every compilation src/version_pm3.c: default_version_pm3.c $(info [=] GEN $@) - $(Q)$(CP) $< $@ + $(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@ # easy printing of MAKE VARIABLES print-%: ; @echo $* = $($*) diff --git a/client/deps/amiibo.cmake b/client/deps/amiibo.cmake index 8c524c170..c946c0682 100644 --- a/client/deps/amiibo.cmake +++ b/client/deps/amiibo.cmake @@ -19,7 +19,7 @@ target_link_libraries(pm3rrg_rdv4_amiibo PRIVATE m pm3rrg_rdv4_mbedtls) -target_compile_options(pm3rrg_rdv4_amiibo PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_amiibo PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_amiibo PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(pm3rrg_rdv4_amiibo PRIVATE amiitool diff --git a/client/deps/cliparser.cmake b/client/deps/cliparser.cmake index a85cc2374..fccae33b7 100644 --- a/client/deps/cliparser.cmake +++ b/client/deps/cliparser.cmake @@ -9,5 +9,5 @@ target_include_directories(pm3rrg_rdv4_cliparser PRIVATE ../../include ../src) target_include_directories(pm3rrg_rdv4_cliparser INTERFACE cliparser) -target_compile_options(pm3rrg_rdv4_cliparser PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_cliparser PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_cliparser PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/hardnested.cmake b/client/deps/hardnested.cmake index 67be099fa..dc569641c 100644 --- a/client/deps/hardnested.cmake +++ b/client/deps/hardnested.cmake @@ -2,7 +2,7 @@ add_library(pm3rrg_rdv4_hardnested_nosimd OBJECT hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) -target_compile_options(pm3rrg_rdv4_hardnested_nosimd PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_hardnested_nosimd PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_hardnested_nosimd PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(pm3rrg_rdv4_hardnested_nosimd PRIVATE @@ -28,7 +28,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_mmx PRIVATE -Wall -O3) + target_compile_options(pm3rrg_rdv4_hardnested_mmx PRIVATE -Wall -Werror -O3) target_compile_options(pm3rrg_rdv4_hardnested_mmx BEFORE PRIVATE -mmmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_mmx PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -43,7 +43,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_sse2 PRIVATE -Wall -O3) + target_compile_options(pm3rrg_rdv4_hardnested_sse2 PRIVATE -Wall -Werror -O3) target_compile_options(pm3rrg_rdv4_hardnested_sse2 BEFORE PRIVATE -mmmx -msse2 -mno-avx -mno-avx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_sse2 PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -58,7 +58,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_avx PRIVATE -Wall -O3) + target_compile_options(pm3rrg_rdv4_hardnested_avx PRIVATE -Wall -Werror -O3) target_compile_options(pm3rrg_rdv4_hardnested_avx BEFORE PRIVATE -mmmx -msse2 -mavx -mno-avx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_avx PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -73,7 +73,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_avx2 PRIVATE -Wall -O3) + target_compile_options(pm3rrg_rdv4_hardnested_avx2 PRIVATE -Wall -Werror -O3) target_compile_options(pm3rrg_rdv4_hardnested_avx2 BEFORE PRIVATE -mmmx -msse2 -mavx -mavx2 -mno-avx512f) set_property(TARGET pm3rrg_rdv4_hardnested_avx2 PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -88,7 +88,7 @@ if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS) hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c) - target_compile_options(pm3rrg_rdv4_hardnested_avx512 PRIVATE -Wall -O3) + target_compile_options(pm3rrg_rdv4_hardnested_avx512 PRIVATE -Wall -Werror -O3) target_compile_options(pm3rrg_rdv4_hardnested_avx512 BEFORE PRIVATE -mmmx -msse2 -mavx -mavx2 -mavx512f) set_property(TARGET pm3rrg_rdv4_hardnested_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -113,7 +113,7 @@ add_library(pm3rrg_rdv4_hardnested STATIC hardnested/hardnested_bruteforce.c $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_nosimd> ${SIMD_TARGETS}) -target_compile_options(pm3rrg_rdv4_hardnested PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_hardnested PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_hardnested PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(pm3rrg_rdv4_hardnested PRIVATE ../../common diff --git a/client/deps/jansson.cmake b/client/deps/jansson.cmake index 42c701d5e..c91a47047 100644 --- a/client/deps/jansson.cmake +++ b/client/deps/jansson.cmake @@ -14,5 +14,5 @@ add_library(pm3rrg_rdv4_jansson STATIC target_compile_definitions(pm3rrg_rdv4_jansson PRIVATE HAVE_STDINT_H) target_include_directories(pm3rrg_rdv4_jansson INTERFACE jansson) -target_compile_options(pm3rrg_rdv4_jansson PRIVATE -Wall -Wno-unused-function -O3) +target_compile_options(pm3rrg_rdv4_jansson PRIVATE -Wall -Werror -Wno-unused-function -O3) set_property(TARGET pm3rrg_rdv4_jansson PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/lua.cmake b/client/deps/lua.cmake index 5cf33d724..12870342e 100644 --- a/client/deps/lua.cmake +++ b/client/deps/lua.cmake @@ -52,5 +52,5 @@ if (NOT MINGW) endif (NOT MINGW) target_include_directories(pm3rrg_rdv4_lua INTERFACE liblua) -target_compile_options(pm3rrg_rdv4_lua PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_lua PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_lua PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/mbedtls.cmake b/client/deps/mbedtls.cmake index c726ddeba..40929e1ea 100644 --- a/client/deps/mbedtls.cmake +++ b/client/deps/mbedtls.cmake @@ -44,5 +44,5 @@ add_library(pm3rrg_rdv4_mbedtls STATIC target_include_directories(pm3rrg_rdv4_mbedtls PRIVATE ../../common) target_include_directories(pm3rrg_rdv4_mbedtls INTERFACE ../../common/mbedtls) -target_compile_options(pm3rrg_rdv4_mbedtls PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_mbedtls PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_mbedtls PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/reveng.cmake b/client/deps/reveng.cmake index 1040730f1..d7e3cfd8a 100644 --- a/client/deps/reveng.cmake +++ b/client/deps/reveng.cmake @@ -13,5 +13,5 @@ target_include_directories(pm3rrg_rdv4_reveng PRIVATE ../src ../../include) target_include_directories(pm3rrg_rdv4_reveng INTERFACE reveng) -target_compile_options(pm3rrg_rdv4_reveng PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_reveng PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_reveng PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/tinycbor.cmake b/client/deps/tinycbor.cmake index c74618149..5a6abda25 100644 --- a/client/deps/tinycbor.cmake +++ b/client/deps/tinycbor.cmake @@ -11,5 +11,5 @@ add_library(pm3rrg_rdv4_tinycbor STATIC target_include_directories(pm3rrg_rdv4_tinycbor INTERFACE tinycbor) # Strange errors on Mingw when compiling with -O3 -target_compile_options(pm3rrg_rdv4_tinycbor PRIVATE -Wall -O2) +target_compile_options(pm3rrg_rdv4_tinycbor PRIVATE -Wall -Werror -O2) set_property(TARGET pm3rrg_rdv4_tinycbor PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/deps/whereami.cmake b/client/deps/whereami.cmake index 721873066..d2d6a5b2a 100644 --- a/client/deps/whereami.cmake +++ b/client/deps/whereami.cmake @@ -2,5 +2,5 @@ add_library(pm3rrg_rdv4_whereami STATIC whereami/whereami.c) target_compile_definitions(pm3rrg_rdv4_whereami PRIVATE WAI_PM3_TUNED) target_include_directories(pm3rrg_rdv4_whereami INTERFACE whereami) -target_compile_options(pm3rrg_rdv4_whereami PRIVATE -Wall -O3) +target_compile_options(pm3rrg_rdv4_whereami PRIVATE -Wall -Werror -O3) set_property(TARGET pm3rrg_rdv4_whereami PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index a63e2794c..67d1c6528 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -46,7 +46,7 @@ #ifndef LIBPM3 #define BANNERMSG1 "" #define BANNERMSG2 " [ Iceman :snowflake: ]" -#define BANNERMSG3 "Release v4.14831 - Frostbit" +#define BANNERMSG3 "" typedef enum LogoMode { UTF8, ANSI, ASCII } LogoMode; diff --git a/common/default_version_pm3.c b/common/default_version_pm3.c index 4e8a2d623..d2a1deb83 100644 --- a/common/default_version_pm3.c +++ b/common/default_version_pm3.c @@ -1,5 +1,20 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- #include "common.h" -/* Generated file, do not edit */ +/* This is the default version_pm3.c file that Makefile.common falls back to if neither sh nor perl are available */ #ifndef ON_DEVICE #define SECTVERSINFO #else @@ -8,9 +23,8 @@ const struct version_information_t SECTVERSINFO g_version_information = { VERSION_INFORMATION_MAGIC, - 1, - 1, - 1, - "RRG/Iceman/master/v4.14831", - "2022-01-11 19:17:19", + 1, /* version 1 */ + 0, /* version information not present */ + 2, /* cleanliness couldn't be determined */ + /* Remaining fields: zero */ }; diff --git a/common_arm/Makefile.common b/common_arm/Makefile.common index e40d998a6..99f4d9ecd 100644 --- a/common_arm/Makefile.common +++ b/common_arm/Makefile.common @@ -49,7 +49,7 @@ VPATH = . ../common_arm ../common ../common/crapto1 ../common/mbedtls ../common/ INCLUDES = ../include/proxmark3_arm.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/pm3_cmd.h ARMCFLAGS = -mthumb-interwork -fno-builtin -DEFCFLAGS = -Wall -Os -pedantic -fstrict-aliasing -pipe +DEFCFLAGS = -Wall -Werror -Os -pedantic -fstrict-aliasing -pipe # Some more warnings we want as errors: DEFCFLAGS += -Wbad-function-cast -Wchar-subscripts -Wundef -Wunused -Wuninitialized -Wpointer-arith -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Wnested-externs -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wtype-limits From 4e78034a6e7b0710ba47feb8faf4136a70ea0420 Mon Sep 17 00:00:00 2001 From: iceman1001 <iceman@iuse.se> Date: Tue, 11 Jan 2022 19:20:33 +0100 Subject: [PATCH 64/73] release numbering update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 982e79169..af93d6654 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac ## [unreleased][unreleased] -## [Frostbit] [2022-01-11] +## [Frostbit.4.14831] [2022-01-11] - Changed Wiegand format lookup - now case-insensitive (@iceman1001) - Added new standalone mode `hf_15SNIFF` - Same as `hf_14ASNIFF` standalone mode for RDV4 - flashmem (@startrk1995) - Added support for MIFARE DESFire application creation without authentication (@joswr1ght) From fc13b6b20c0fb6113faa69c680cbca98af88f75b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Mon, 10 Jan 2022 23:53:01 +0100 Subject: [PATCH 65/73] Add pm3line API to hide readline, allowing easier implementation of alternatives --- Makefile | 2 +- client/CMakeLists.txt | 2 + client/Makefile | 1 + client/experimental_lib/CMakeLists.txt | 2 + client/pyscripts/pm3_help2list.py | 60 +----- client/src/cmdhflegic.c | 20 +- client/src/cmdhw.c | 2 +- client/src/pm3line.c | 200 ++++++++++++++++++ client/src/pm3line.h | 32 +++ .../{rl_vocabulory.h => pm3line_vocabulory.h} | 58 +---- client/src/proxmark3.c | 109 ++-------- client/src/ui.c | 4 +- 12 files changed, 265 insertions(+), 227 deletions(-) create mode 100644 client/src/pm3line.c create mode 100644 client/src/pm3line.h rename client/src/{rl_vocabulory.h => pm3line_vocabulory.h} (93%) diff --git a/Makefile b/Makefile index 32c9b26aa..f446e880e 100644 --- a/Makefile +++ b/Makefile @@ -287,7 +287,7 @@ style: [ -x client/proxmark3 ] && client/proxmark3 --fulltext | sed 's#com[0-9]#/dev/ttyacm0#'|python3 client/pyscripts/pm3_help2json.py - doc/commands.json # Update the readline autocomplete autogenerated code - [ -x client/proxmark3 ] && client/proxmark3 --fulltext | python3 client/pyscripts/pm3_help2list.py - client/src/rl_vocabulory.h + [ -x client/proxmark3 ] && client/proxmark3 --fulltext | python3 client/pyscripts/pm3_help2list.py - client/src/pm3line_vocabulory.h # Detecting weird codepages and tabs. diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 26d5c16bd..a84415814 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -340,6 +340,7 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/pm3.c ${PM3_ROOT}/client/src/pm3_binlib.c ${PM3_ROOT}/client/src/pm3_bitlib.c + ${PM3_ROOT}/client/src/pm3line.c ${PM3_ROOT}/client/src/prng.c ${PM3_ROOT}/client/src/scandir.c ${PM3_ROOT}/client/src/scripting.c @@ -578,6 +579,7 @@ endif (NOT APPLE) if (NOT JANSSON_FOUND) set(ADDITIONAL_LNK pm3rrg_rdv4_jansson ${ADDITIONAL_LNK}) endif (NOT JANSSON_FOUND) + if (NOT WHEREAMI_FOUND) set(ADDITIONAL_LNK pm3rrg_rdv4_whereami ${ADDITIONAL_LNK}) endif (NOT WHEREAMI_FOUND) diff --git a/client/Makefile b/client/Makefile index 0b74919c2..1a11b2fe2 100644 --- a/client/Makefile +++ b/client/Makefile @@ -635,6 +635,7 @@ SRCS = mifare/aiddesfire.c \ pm3_bitlib.c \ preferences.c \ prng.c \ + pm3line.c \ proxmark3.c \ scandir.c \ uart/uart_posix.c \ diff --git a/client/experimental_lib/CMakeLists.txt b/client/experimental_lib/CMakeLists.txt index 8e0e68621..ac455eaec 100644 --- a/client/experimental_lib/CMakeLists.txt +++ b/client/experimental_lib/CMakeLists.txt @@ -341,6 +341,7 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/pm3.c ${PM3_ROOT}/client/src/pm3_binlib.c ${PM3_ROOT}/client/src/pm3_bitlib.c + ${PM3_ROOT}/client/src/pm3line.c ${PM3_ROOT}/client/src/prng.c ${PM3_ROOT}/client/src/scandir.c ${PM3_ROOT}/client/src/scripting.c @@ -581,6 +582,7 @@ endif (NOT APPLE) if (NOT JANSSON_FOUND) set(ADDITIONAL_LNK pm3rrg_rdv4_jansson ${ADDITIONAL_LNK}) endif (NOT JANSSON_FOUND) + if (NOT WHEREAMI_FOUND) set(ADDITIONAL_LNK pm3rrg_rdv4_whereami ${ADDITIONAL_LNK}) endif (NOT WHEREAMI_FOUND) diff --git a/client/pyscripts/pm3_help2list.py b/client/pyscripts/pm3_help2list.py index 58830b7e6..7c27d23fe 100755 --- a/client/pyscripts/pm3_help2list.py +++ b/client/pyscripts/pm3_help2list.py @@ -12,7 +12,7 @@ This version - Iceman Note: - This script is used as a helper script to generate the rl_vocabulory.h file. + This script is used as a helper script to generate the pm3line_vocabulory.h file. It need a working proxmark3 client to extract the help text. Ie: this script can't be used inside the normal build sequence. @@ -65,22 +65,14 @@ def main(): // readline auto complete utilities //----------------------------------------------------------------------------- -#ifndef RL_VOCABULORY_H__ -#define RL_VOCABULORY_H__ +#ifndef PM3LINE_VOCABULORY_H__ +#define PM3LINE_VOCABULORY_H__ #ifdef __cplusplus extern "C" { #endif -#if defined(HAVE_READLINE) -#include <stdlib.h> -#include <string.h> -#include <readline/readline.h> -#include "ui.h" // g_session -#include "util.h" // str_ndup - -char* rl_command_generator(const char *text, int state); -char **rl_command_completion(const char *text, int start, int end); +#include <stdbool.h> typedef struct vocabulory_s { bool offline; @@ -100,50 +92,6 @@ const static vocabulory_t vocabulory[] = {\n""") args.output_file.write(""" {0, NULL}\n}; - -char **rl_command_completion(const char *text, int start, int end) { - rl_attempted_completion_over = 0; - return rl_completion_matches (text, rl_command_generator); -} - -char* rl_command_generator(const char *text, int state) { - static int index; - static size_t len; - size_t rlen = strlen(rl_line_buffer); - const char *command; - - if (!state) { - index = 0; - len = strlen(text); - } - - while ((command = vocabulory[index].name)) { - - // When no pm3 device present - // and the command is not available offline, - // we skip it. - if ((g_session.pm3_present == false) && (vocabulory[index].offline == false )) { - index++; - continue; - } - - index++; - - if (strncmp (command, rl_line_buffer, rlen) == 0) { - const char *next = command + (rlen - len); - const char *space = strstr(next, " "); - if (space != NULL) { - return str_ndup(next, space - next); - } - return str_dup(next); - } - } - - return NULL; -} - -#endif - #ifdef __cplusplus } #endif diff --git a/client/src/cmdhflegic.c b/client/src/cmdhflegic.c index 16f5656a7..f00e58407 100644 --- a/client/src/cmdhflegic.c +++ b/client/src/cmdhflegic.c @@ -17,13 +17,9 @@ //----------------------------------------------------------------------------- #include "cmdhflegic.h" -#include <stdio.h> // for Mingw readline #include <ctype.h> // tolower -#ifdef HAVE_READLINE -#include <readline/readline.h> -#endif - +#include "pm3line.h" // pm3line_read, pm3line_free #include "cliparser.h" #include "cmdparser.h" // command_t #include "comms.h" // clearCommandBuffer @@ -553,19 +549,9 @@ static int CmdLegicWrbl(const char *Cmd) { PrintAndLogEx(INFO, "#####################################"); const char *confirm = "Do you really want to continue? y(es)/n(o) : "; bool overwrite = false; -#ifdef HAVE_READLINE - char *answer = readline(confirm); + char *answer = pm3line_read(confirm); overwrite = (answer[0] == 'y' || answer[0] == 'Y'); -#else - PrintAndLogEx(NORMAL, "%s" NOLF, confirm); - char *answer = NULL; - size_t anslen = 0; - if (getline(&answer, &anslen, stdin) > 0) { - overwrite = (answer[0] == 'y' || answer[0] == 'Y'); - } - PrintAndLogEx(NORMAL, ""); -#endif - free(answer); + pm3line_free(answer); if (overwrite == false) { PrintAndLogEx(WARNING, "command cancelled"); return PM3_EOPABORTED; diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index 55ad35917..991815e46 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -993,7 +993,7 @@ void pm3_version(bool verbose, bool oneliner) { PrintAndLogEx(NORMAL, "%s", temp); PrintAndLogEx(NORMAL, " compiled with............. " PM3CLIENTCOMPILER __VERSION__); PrintAndLogEx(NORMAL, " platform.................. " PM3HOSTOS " / " PM3HOSTARCH); -#ifdef HAVE_READLINE +#if defined(HAVE_READLINE) PrintAndLogEx(NORMAL, " Readline support.......... " _GREEN_("present")); #else PrintAndLogEx(NORMAL, " Readline support.......... " _YELLOW_("absent")); diff --git a/client/src/pm3line.c b/client/src/pm3line.c new file mode 100644 index 000000000..6d33e9990 --- /dev/null +++ b/client/src/pm3line.c @@ -0,0 +1,200 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// API to abstract Readline / Linenoise support +//----------------------------------------------------------------------------- + +#include "pm3line.h" +#include <stdlib.h> +#include <stdio.h> // for Mingw readline and for getline +#include <string.h> +#include <signal.h> +#if defined(HAVE_READLINE) +#include <readline/readline.h> +#include <readline/history.h> +#endif +#include "pm3line_vocabulory.h" +#include "pm3_cmd.h" +#include "ui.h" // g_session +#include "util.h" // str_ndup + +#if defined(HAVE_READLINE) + +static char* rl_command_generator(const char *text, int state) { + static int index; + static size_t len; + size_t rlen = strlen(rl_line_buffer); + const char *command; + + if (!state) { + index = 0; + len = strlen(text); + } + + while ((command = vocabulory[index].name)) { + + // When no pm3 device present + // and the command is not available offline, + // we skip it. + if ((g_session.pm3_present == false) && (vocabulory[index].offline == false )) { + index++; + continue; + } + + index++; + + if (strncmp (command, rl_line_buffer, rlen) == 0) { + const char *next = command + (rlen - len); + const char *space = strstr(next, " "); + if (space != NULL) { + return str_ndup(next, space - next); + } + return str_dup(next); + } + } + + return NULL; +} + +static char **rl_command_completion(const char *text, int start, int end) { + rl_attempted_completion_over = 0; + return rl_completion_matches (text, rl_command_generator); +} + +#endif // HAVE_READLINE + +# if defined(_WIN32) +/* +static bool WINAPI terminate_handler(DWORD t) { + if (t == CTRL_C_EVENT) { + flush_history(); + return true; + } + return false; +} +*/ +# else +static struct sigaction gs_old_sigint_action; +static void sigint_handler(int signum) { + sigaction(SIGINT, &gs_old_sigint_action, NULL); + pm3line_flush_history(); + kill(0, SIGINT); +} +#endif + +void pm3line_install_signals(void){ +# if defined(_WIN32) +// SetConsoleCtrlHandler((PHANDLER_ROUTINE)terminate_handler, true); +# else + struct sigaction action; + memset(&action, 0, sizeof(action)); + action.sa_handler = &sigint_handler; + sigaction(SIGINT, &action, &gs_old_sigint_action); +# endif +#if defined(HAVE_READLINE) + rl_catch_signals = 1; + rl_set_signals(); +#endif // HAVE_READLINE +} + +void pm3line_init(void) { +#if defined(HAVE_READLINE) + /* initialize history */ + using_history(); + rl_readline_name = "PM3"; + rl_attempted_completion_function = rl_command_completion; + +#ifdef RL_STATE_READCMD + rl_extend_line_buffer(1024); +#endif // RL_STATE_READCMD +#endif // HAVE_READLINE +} + +char *pm3line_read(const char *s) { +#if defined(HAVE_READLINE) + return readline(s); +#else + printf("%s", s); + char *answer = NULL; + size_t anslen = 0; + int ret; + if ((ret = getline(&answer, &anslen, stdin)) < 0) { + // TODO this happens also when kbd_enter_pressed() is used, with a key pressed or not + printf("DEBUG: getline returned %i", ret); + free(answer); + answer = NULL; + } + return answer; +#endif +} + +void pm3line_free(void *ref) { + free(ref); +} + +void pm3line_update_prompt(const char *prompt) { +#if defined(HAVE_READLINE) + rl_set_prompt(prompt); + rl_forced_update_display(); +#else + (void) prompt; +#endif +} + +int pm3line_load_history(const char *path) { +#if defined(HAVE_READLINE) + if (read_history(path) == 0) { + return PM3_SUCCESS; + } else { + return PM3_ESOFT; + } +#else + (void) path; + return PM3_ENOTIMPL; +#endif +} + +void pm3line_add_history(const char *line) { +#if defined(HAVE_READLINE) + HIST_ENTRY *entry = history_get(history_length); + // add if not identical to latest recorded line + if ((!entry) || (strcmp(entry->line, line) != 0)) { + add_history(line); + } +#else + (void) line; +#endif +} + +void pm3line_flush_history(void) { + if (g_session.history_path) { +#if defined(HAVE_READLINE) + write_history(g_session.history_path); +#endif // HAVE_READLINE + free(g_session.history_path); + g_session.history_path = NULL; + } +} + +void pm3line_check(int (check)(void)) { +#if defined(HAVE_READLINE) + rl_event_hook = check; +#else + check(); +#endif +} + +// TODO: +// src/ui.c print_progress() diff --git a/client/src/pm3line.h b/client/src/pm3line.h new file mode 100644 index 000000000..50fd57afe --- /dev/null +++ b/client/src/pm3line.h @@ -0,0 +1,32 @@ +//----------------------------------------------------------------------------- +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// API to abstract Readline / Linenoise support +//----------------------------------------------------------------------------- + +#ifndef PM3LINE_H__ +#define PM3LINE_H__ + +void pm3line_init(void); +void pm3line_install_signals(void); +char *pm3line_read(const char* s); +void pm3line_free(void *ref); +void pm3line_update_prompt(const char *prompt); +int pm3line_load_history(const char *path); +void pm3line_add_history(const char *line); +void pm3line_flush_history(void); +void pm3line_check(int (check)(void)); + +#endif // PM3LINE_H__ diff --git a/client/src/rl_vocabulory.h b/client/src/pm3line_vocabulory.h similarity index 93% rename from client/src/rl_vocabulory.h rename to client/src/pm3line_vocabulory.h index ce1d1a7c2..d71e90895 100644 --- a/client/src/rl_vocabulory.h +++ b/client/src/pm3line_vocabulory.h @@ -16,22 +16,14 @@ // readline auto complete utilities //----------------------------------------------------------------------------- -#ifndef RL_VOCABULORY_H__ -#define RL_VOCABULORY_H__ +#ifndef PM3LINE_VOCABULORY_H__ +#define PM3LINE_VOCABULORY_H__ #ifdef __cplusplus extern "C" { #endif -#if defined(HAVE_READLINE) -#include <stdlib.h> -#include <string.h> -#include <readline/readline.h> -#include "ui.h" // g_session -#include "util.h" // str_ndup - -char* rl_command_generator(const char *text, int state); -char **rl_command_completion(const char *text, int start, int end); +#include <stdbool.h> typedef struct vocabulory_s { bool offline; @@ -722,50 +714,6 @@ const static vocabulory_t vocabulory[] = { {0, NULL} }; - -char **rl_command_completion(const char *text, int start, int end) { - rl_attempted_completion_over = 0; - return rl_completion_matches (text, rl_command_generator); -} - -char* rl_command_generator(const char *text, int state) { - static int index; - static size_t len; - size_t rlen = strlen(rl_line_buffer); - const char *command; - - if (!state) { - index = 0; - len = strlen(text); - } - - while ((command = vocabulory[index].name)) { - - // When no pm3 device present - // and the command is not available offline, - // we skip it. - if ((g_session.pm3_present == false) && (vocabulory[index].offline == false )) { - index++; - continue; - } - - index++; - - if (strncmp (command, rl_line_buffer, rlen) == 0) { - const char *next = command + (rlen - len); - const char *space = strstr(next, " "); - if (space != NULL) { - return str_ndup(next, space - next); - } - return str_dup(next); - } - } - - return NULL; -} - -#endif - #ifdef __cplusplus } #endif diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 67d1c6528..43649d22e 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -19,18 +19,12 @@ #include "proxmark3.h" #include <stdlib.h> -#include <stdio.h> // for Mingw readline #include <limits.h> #include <unistd.h> -#ifdef HAVE_READLINE -#include <readline/readline.h> -#include <readline/history.h> -#include "rl_vocabulory.h" -#include <signal.h> -#endif #include <ctype.h> #include <libgen.h> // basename +#include "pm3line.h" #include "usart_defs.h" #include "util_posix.h" #include "proxgui.h" @@ -137,48 +131,16 @@ static int check_comm(void) { if (IsCommunicationThreadDead() && g_session.pm3_present) { PrintAndLogEx(INFO, "Running in " _YELLOW_("OFFLINE") " mode. Use "_YELLOW_("\"hw connect\"") " to reconnect\n"); prompt_dev = PROXPROMPT_DEV_OFFLINE; -#ifdef HAVE_READLINE char prompt[PROXPROMPT_MAX_SIZE] = {0}; prompt_compose(prompt, sizeof(prompt), prompt_ctx, prompt_dev); char prompt_filtered[PROXPROMPT_MAX_SIZE] = {0}; memcpy_filter_ansi(prompt_filtered, prompt, sizeof(prompt_filtered), !g_session.supports_colors); - rl_set_prompt(prompt_filtered); - rl_redisplay(); -#endif + pm3line_update_prompt(prompt_filtered); CloseProxmark(g_session.current_device); } msleep(10); return 0; } -#ifdef HAVE_READLINE -static void flush_history(void) { - if (g_session.history_path) { - write_history(g_session.history_path); - free(g_session.history_path); - g_session.history_path = NULL; - } -} - -# if defined(_WIN32) -/* -static bool WINAPI terminate_handler(DWORD t) { - if (t == CTRL_C_EVENT) { - flush_history(); - return true; - } - return false; -} -*/ -# else -static struct sigaction gs_old_sigint_action; -static void sigint_handler(int signum) { - sigaction(SIGINT, &gs_old_sigint_action, NULL); - flush_history(); - kill(0, SIGINT); -} -#endif - -#endif #if defined(_WIN32) static bool DetectWindowsAnsiSupport(void) { @@ -278,30 +240,22 @@ main_loop(char *script_cmds_file, char *script_cmd, bool stayInCommandLoop) { } } -#ifdef HAVE_READLINE g_session.history_path = NULL; if (g_session.incognito) { PrintAndLogEx(INFO, "No history will be recorded"); } else { + bool loaded_history = false; if (searchHomeFilePath(&g_session.history_path, NULL, PROXHISTORY, true) != PM3_SUCCESS) { - PrintAndLogEx(ERR, "No history will be recorded"); g_session.history_path = NULL; } else { - -# if defined(_WIN32) - // SetConsoleCtrlHandler((PHANDLER_ROUTINE)terminate_handler, true); -# else - struct sigaction action; - memset(&action, 0, sizeof(action)); - action.sa_handler = &sigint_handler; - sigaction(SIGINT, &action, &gs_old_sigint_action); -# endif - rl_catch_signals = 1; - rl_set_signals(); - read_history(g_session.history_path); + loaded_history = (pm3line_load_history(g_session.history_path) == PM3_SUCCESS); + } + if (loaded_history) { + pm3line_install_signals(); + } else { + PrintAndLogEx(ERR, "No history will be recorded"); } } -#endif // loops every time enter is pressed... while (1) { @@ -378,19 +332,14 @@ check_script: strcleanrn(script_cmd, script_cmd_len); goto check_script; } else { -#ifdef HAVE_READLINE - rl_event_hook = check_comm; -#else - check_comm(); -#endif + pm3line_check(check_comm); prompt_ctx = PROXPROMPT_CTX_INTERACTIVE; char prompt[PROXPROMPT_MAX_SIZE] = {0}; prompt_compose(prompt, sizeof(prompt), prompt_ctx, prompt_dev); char prompt_filtered[PROXPROMPT_MAX_SIZE] = {0}; memcpy_filter_ansi(prompt_filtered, prompt, sizeof(prompt_filtered), !g_session.supports_colors); g_pendingPrompt = true; -#ifdef HAVE_READLINE - script_cmd = readline(prompt_filtered); + cmd = pm3line_read(prompt_filtered); #if defined(_WIN32) //Check if color support needs to be enabled again in case the window buffer did change g_session.supports_colors = DetectWindowsAnsiSupport(); @@ -405,18 +354,6 @@ check_script: strcleanrn(script_cmd, script_cmd_len); goto check_script; } -#else - printf("%s", prompt_filtered); - cmd = NULL; - size_t len = 0; - int ret; - if ((ret = getline(&cmd, &len, stdin)) < 0) { - // TODO this happens also when kbd_enter_pressed() is used, with a key pressed or not - printf("GETLINE ERR %i", ret); - free(cmd); - cmd = NULL; - } -#endif fflush(NULL); } } @@ -455,16 +392,10 @@ check_script: PrintAndLogEx(NORMAL, "%s%s", prompt_filtered, cmd); g_printAndLog = old_printAndLog; -#ifdef HAVE_READLINE // add to history if not from a script if (!current_cmdscriptfile()) { - HIST_ENTRY *entry = history_get(history_length); - // add if not identical to latest recorded cmd - if ((!entry) || (strcmp(entry->line, cmd) != 0)) { - add_history(cmd); - } + pm3line_add_history(cmd); } -#endif // process cmd g_pendingPrompt = false; int ret = CommandReceived(cmd); @@ -495,9 +426,7 @@ check_script: while (current_cmdscriptfile()) pop_cmdscriptfile(); -#ifdef HAVE_READLINE - flush_history(); -#endif + pm3line_flush_history(); if (cmd) { free(cmd); @@ -780,17 +709,7 @@ int main(int argc, char *argv[]) { char *port = NULL; uint32_t speed = 0; -#ifdef HAVE_READLINE - /* initialize history */ - using_history(); - - rl_readline_name = "PM3"; - rl_attempted_completion_function = rl_command_completion; - -#ifdef RL_STATE_READCMD - rl_extend_line_buffer(1024); -#endif // RL_STATE_READCMD -#endif // HAVE_READLINE + pm3line_init(); char exec_name[100] = {0}; strncpy(exec_name, basename(argv[0]), sizeof(exec_name) - 1); diff --git a/client/src/ui.c b/client/src/ui.c index 5dab29d1f..b5b1fc0f4 100644 --- a/client/src/ui.c +++ b/client/src/ui.c @@ -28,7 +28,7 @@ #include <stdarg.h> #include <stdlib.h> -#ifdef HAVE_READLINE +#if defined(HAVE_READLINE) //Load readline after stdio.h #include <readline/readline.h> #endif @@ -643,7 +643,7 @@ void iceSimple_Filter(int *data, const size_t len, uint8_t k) { void print_progress(size_t count, uint64_t max, barMode_t style) { int cols = 100 + 35; -#ifdef HAVE_READLINE +#if defined(HAVE_READLINE) static int prev_cols = 0; int rows; rl_reset_screen_size(); // refresh Readline idea of the actual screen width From 41b273e9f71463e221969aa27564a3d0d9002463 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Thu, 13 Jan 2022 17:07:34 +0200 Subject: [PATCH 66/73] added mode for delete file --- client/src/mifare/desfiresecurechan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/mifare/desfiresecurechan.c b/client/src/mifare/desfiresecurechan.c index 1f2c11645..39787242f 100644 --- a/client/src/mifare/desfiresecurechan.c +++ b/client/src/mifare/desfiresecurechan.c @@ -71,6 +71,7 @@ static const AllowedChannelModes_t AllowedChannelModes[] = { {MFDES_CREATE_VALUE_FILE, DACd40, DCCNative, DCMMACed}, {MFDES_CREATE_LINEAR_RECORD_FILE, DACd40, DCCNative, DCMMACed}, {MFDES_CREATE_CYCLIC_RECORD_FILE, DACd40, DCCNative, DCMMACed}, + {MFDES_DELETE_FILE, DACd40, DCCNative, DCMMACed}, {MFDES_COMMIT_TRANSACTION, DACd40, DCCNative, DCMMACed}, {MFDES_CLEAR_RECORD_FILE, DACd40, DCCNative, DCMMACed}, {MFDES_GET_FILE_SETTINGS, DACd40, DCCNative, DCMMACed}, @@ -118,6 +119,7 @@ static const AllowedChannelModes_t AllowedChannelModes[] = { {MFDES_CREATE_VALUE_FILE, DACEV1, DCCNative, DCMMACed}, {MFDES_CREATE_LINEAR_RECORD_FILE, DACEV1, DCCNative, DCMMACed}, {MFDES_CREATE_CYCLIC_RECORD_FILE, DACEV1, DCCNative, DCMMACed}, + {MFDES_DELETE_FILE, DACEV1, DCCNative, DCMMACed}, {MFDES_GET_VALUE, DACEV1, DCCNative, DCMMACed}, {MFDES_CREDIT, DACEV1, DCCNative, DCMMACed}, {MFDES_LIMITED_CREDIT, DACEV1, DCCNative, DCMMACed}, From 025d4e895a2cf434102821dce38dc04be09bbb11 Mon Sep 17 00:00:00 2001 From: Iceman <iceman@iuse.se> Date: Thu, 13 Jan 2022 21:27:33 +0100 Subject: [PATCH 67/73] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45ee9d99b..443f96c0d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# RRG / Iceman - Proxmark3 +# Iceman - Proxmark3 | Latest Release | Coverity | Contributors | From 53aa95c5c9184b6a3eee532de22db507fce5d0c5 Mon Sep 17 00:00:00 2001 From: Iceman <iceman@iuse.se> Date: Thu, 13 Jan 2022 21:27:50 +0100 Subject: [PATCH 68/73] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 443f96c0d..561b26fea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Iceman - Proxmark3 +# Proxmark3 | Latest Release | Coverity | Contributors | From 78628cbe0c5a7286c78ed4487211f5981967784a Mon Sep 17 00:00:00 2001 From: Iceman <iceman@iuse.se> Date: Thu, 13 Jan 2022 21:42:44 +0100 Subject: [PATCH 69/73] Update README.md --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 561b26fea..7182d68ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Proxmark3 +# Iceman - Proxmark3 a RFID / NFC project. + +The Proxmark3 is the swiss-army tool of RFID, allowing for interactions with the vast majority of RFID tags on a global scale. Originally built by Jonathan Westhues, the device is now the goto tool for RFID Analysis for the enthusiast. Iceman repository is considered to be the pinnacle of features and functionality, enabling a huge range of extremely useful and convenient commands and LUA scripts to automate chip identification, penetration testing, and programming | Latest Release | Coverity | Contributors | @@ -79,9 +81,11 @@ We define generic Proxmark3 platforms as following devices. - **Note**: unknown pin assignments. - โš  Ryscorp Proxmark3 Pro - **Note**: device has different fpga and unknown pin assignments. + - **Note**: Company have dissappared, leaving their customers in the dark. - โš  iCopy-X - **Note**: experimental support, currently incompatible with iCopy-X GUI as Proxmark client commands are now using cliparser. - **Note**: see also [icopyx-community repos](https://github.com/iCopy-X-Community/) for upstream sources, reversed hw etc. + - **Note**: Uses DRM to lock down tags, ignores the open source licences. Use on your own risk. **Unknown support status** - โš  VX @@ -114,6 +118,7 @@ Proxmark3 RDV4 hardware modifications: This repo vs official Proxmark3 repo: see the [Changelog file](CHANGELOG.md) which we try to keep updated. In short this repo gives you a completely different user experience when it comes to Proxmark3. + * Supports command tab complete * richer CLI with use of colors / emojis * help text system implemented everywhere * hints system @@ -179,14 +184,13 @@ See [Proxmark3 precompiled builds](https://www.proxmarkbuilds.org/) The official PM3-GUI from Gaucho will not work. Not to mention is quite old and not maintained any longer. - [Proxmark3 Universal GUI](https://github.com/burma69/PM3UniversalGUI) will work more or less. - - [Proxmark3 GUI cross-compiled](https://github.com/wh201906/Proxmark3GUI/) which is recently updated and claims to support latest source of this repo. - [Proxmark3_GUI](https://github.com/Phreak87/Proxmark3_GUI) simple gui in vb.net ## Official channels Where do you find the community? - - [RFID Hacking community discord server](https://discord.gg/QfPvGFRQxH) + - [RFID Hacking community discord server](https://discord.gg/iceman) - [Proxmark3 IRC channel](https://web.libera.chat/?channels=#proxmark3) - [Proxmark3 sub reddit](https://www.reddit.com/r/proxmark3/) - [Proxmark3 forum](http://www.proxmark.org/forum/index.php) @@ -205,9 +209,9 @@ This document will be helpful for you ## Citation Use this bibtex to cite this repository globally: ``` -@misc{proxmark3rrg, +@misc{proxmark3, author = {C. {Herrmann} and P. {Teuwen} and O. {Moiseenko} and M. {Walker} and others}, - title = {{Proxmark3 -- RRG / Iceman repo}}, + title = {{Proxmark3 -- Iceman repo}}, howpublished = {\url{https://github.com/RfidResearchGroup/proxmark3}}, keywords = {rfid nfc iceman proxmark3 125khz 134khz 13.56mhz}, } From 08719839b56677c70de0eef865bc4c71c5ff32d9 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Fri, 14 Jan 2022 17:47:48 +0100 Subject: [PATCH 70/73] remove unused src files prng.c and tea.c Note that there is a clean public domain implementation of tea on wikipedia... --- client/CMakeLists.txt | 2 - client/Makefile | 2 - client/experimental_lib/CMakeLists.txt | 2 - client/src/cmdanalyse.c | 51 ----------------- client/src/prng.c | 53 ----------------- client/src/prng.h | 40 ------------- client/src/tea.c | 79 -------------------------- client/src/tea.h | 30 ---------- 8 files changed, 259 deletions(-) delete mode 100644 client/src/prng.c delete mode 100644 client/src/prng.h delete mode 100644 client/src/tea.c delete mode 100644 client/src/tea.h diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index a84415814..e377616f8 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -341,10 +341,8 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/pm3_binlib.c ${PM3_ROOT}/client/src/pm3_bitlib.c ${PM3_ROOT}/client/src/pm3line.c - ${PM3_ROOT}/client/src/prng.c ${PM3_ROOT}/client/src/scandir.c ${PM3_ROOT}/client/src/scripting.c - ${PM3_ROOT}/client/src/tea.c ${PM3_ROOT}/client/src/ui.c ${PM3_ROOT}/client/src/util.c ${PM3_ROOT}/client/src/wiegand_formats.c diff --git a/client/Makefile b/client/Makefile index 1a11b2fe2..905609b36 100644 --- a/client/Makefile +++ b/client/Makefile @@ -634,14 +634,12 @@ SRCS = mifare/aiddesfire.c \ pm3_binlib.c \ pm3_bitlib.c \ preferences.c \ - prng.c \ pm3line.c \ proxmark3.c \ scandir.c \ uart/uart_posix.c \ uart/uart_win32.c \ scripting.c \ - tea.c \ ui.c \ util.c \ version_pm3.c \ diff --git a/client/experimental_lib/CMakeLists.txt b/client/experimental_lib/CMakeLists.txt index ac455eaec..a31a3110d 100644 --- a/client/experimental_lib/CMakeLists.txt +++ b/client/experimental_lib/CMakeLists.txt @@ -342,10 +342,8 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/pm3_binlib.c ${PM3_ROOT}/client/src/pm3_bitlib.c ${PM3_ROOT}/client/src/pm3line.c - ${PM3_ROOT}/client/src/prng.c ${PM3_ROOT}/client/src/scandir.c ${PM3_ROOT}/client/src/scripting.c - ${PM3_ROOT}/client/src/tea.c ${PM3_ROOT}/client/src/ui.c ${PM3_ROOT}/client/src/util.c ${PM3_ROOT}/client/src/wiegand_formats.c diff --git a/client/src/cmdanalyse.c b/client/src/cmdanalyse.c index 5de3bc063..a2ebf9d23 100644 --- a/client/src/cmdanalyse.c +++ b/client/src/cmdanalyse.c @@ -29,7 +29,6 @@ #include "crc.h" #include "crc16.h" // crc16 ccitt #include "crc32.h" // crc32_ex -#include "tea.h" #include "legic_prng.h" #include "cmddata.h" // g_DemodBuffer #include "graph.h" @@ -489,55 +488,6 @@ static int CmdAnalyseDates(const char *Cmd) { return PM3_SUCCESS; } -static int CmdAnalyseTEASelfTest(const char *Cmd) { - CLIParserContext *ctx; - CLIParserInit(&ctx, "analyse tea", - "Crypto TEA self tests", - "analyse tea -d 1122334455667788" - ); - - void *argtable[] = { - arg_param_begin, - arg_str1("d", "data", "<hex>", "bytes to encrypt ( 8 hex bytes )"), - arg_param_end - }; - CLIExecWithReturn(ctx, Cmd, argtable, true); - int dlen = 0; - uint8_t data[8] = {0x00}; - int res = CLIParamHexToBuf(arg_get_str(ctx, 1), data, sizeof(data), &dlen); - CLIParserFree(ctx); - if (res) { - PrintAndLogEx(FAILED, "Error parsing bytes"); - return PM3_EINVARG; - } - - uint8_t v_le[8]; - memset(v_le, 0x00, sizeof(v_le)); - uint8_t *v_ptr = v_le; - - SwapEndian64ex(data, 8, 4, v_ptr); - - // ENCRYPTION KEY: - uint8_t key[16] = {0x55, 0xFE, 0xF6, 0x30, 0x62, 0xBF, 0x0B, 0xC1, 0xC9, 0xB3, 0x7C, 0x34, 0x97, 0x3E, 0x29, 0xFB }; - uint8_t keyle[16]; - uint8_t *key_ptr = keyle; - SwapEndian64ex(key, sizeof(key), 4, key_ptr); - - PrintAndLogEx(INFO, "TEA crypto testing"); - PrintAndLogEx(INFO, "-----------------------------------+---------"); - PrintAndLogEx(INFO, "LE enc.... %s", sprint_hex_ascii(v_ptr, 8)); - - tea_decrypt(v_ptr, key_ptr); - PrintAndLogEx(INFO, "LE dec.... %s", sprint_hex_ascii(v_ptr, 8)); - - tea_encrypt(v_ptr, key_ptr); - PrintAndLogEx(INFO, "enc1...... %s", sprint_hex_ascii(v_ptr, 8)); - tea_encrypt(v_ptr, key_ptr); - PrintAndLogEx(INFO, "enc2...... %s", sprint_hex_ascii(v_ptr, 8)); - PrintAndLogEx(NORMAL, ""); - return PM3_SUCCESS; -} - static int CmdAnalyseA(const char *Cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "analyse a", @@ -1205,7 +1155,6 @@ static command_t CommandTable[] = { {"crc", CmdAnalyseCRC, AlwaysAvailable, "Stub method for CRC evaluations"}, {"chksum", CmdAnalyseCHKSUM, AlwaysAvailable, "Checksum with adding, masking and one's complement"}, {"dates", CmdAnalyseDates, AlwaysAvailable, "Look for datestamps in a given array of bytes"}, - {"tea", CmdAnalyseTEASelfTest, AlwaysAvailable, "Crypto TEA test"}, {"lfsr", CmdAnalyseLfsr, AlwaysAvailable, "LFSR tests"}, {"a", CmdAnalyseA, AlwaysAvailable, "num bits test"}, {"nuid", CmdAnalyseNuid, AlwaysAvailable, "create NUID from 7byte UID"}, diff --git a/client/src/prng.c b/client/src/prng.c deleted file mode 100644 index bfea60504..000000000 --- a/client/src/prng.c +++ /dev/null @@ -1,53 +0,0 @@ -//----------------------------------------------------------------------------- -// Borrowed initially from http://burtleburtle.net/bob/rand/smallprng.html -// Copyright (C) Bob Jenkins -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- -// Burtle Prng - Modified. 42iterations instead of 20. -//----------------------------------------------------------------------------- -#include "prng.h" - -#define rot(x,k) (((x)<<(k))|((x)>>(32-(k)))) -uint32_t burtle_get_mod(prng_ctx_t *x) { - uint32_t e = x->a - rot(x->b, 21); - x->a = x->b ^ rot(x->c, 19); - x->b = x->c + rot(x->d, 6); - x->c = x->d + e; - x->d = e + x->a; - return x->d; -} - -void burtle_init_mod(prng_ctx_t *x, uint32_t seed) { - x->a = 0xf1ea5eed; - x->b = x->c = x->d = seed; - for (uint8_t i = 0; i < 42; ++i) { - (void)burtle_get_mod(x); - } -} - -void burtle_init(prng_ctx_t *x, uint32_t seed) { - uint32_t i; - x->a = 0xf1ea5eed, x->b = x->c = x->d = seed; - for (i = 0; i < 20; ++i) { - (void)burtle_get_mod(x); - } -} - - -uint32_t GetSimplePrng(uint32_t seed) { - seed *= 0x19660D; - seed += 0x3C6EF35F; - return seed; -} diff --git a/client/src/prng.h b/client/src/prng.h deleted file mode 100644 index 97bd83ac7..000000000 --- a/client/src/prng.h +++ /dev/null @@ -1,40 +0,0 @@ -//----------------------------------------------------------------------------- -// Borrowed initially from http://burtleburtle.net/bob/rand/smallprng.html -// Copyright (C) Bob Jenkins -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- -// Burtle Prng - Modified. 42iterations instead of 20. -//----------------------------------------------------------------------------- - -#ifndef __PRNG_H -#define __PRNG_H - -#include "common.h" - -typedef struct { - uint32_t a; - uint32_t b; - uint32_t c; - uint32_t d; -} prng_ctx_t; - -//uint32_t burtle_get( prng_ctx_t *x ); -uint32_t burtle_get_mod(prng_ctx_t *x); -void burtle_init_mod(prng_ctx_t *x, uint32_t seed); -void burtle_init(prng_ctx_t *x, uint32_t seed); - -uint32_t GetSimplePrng(uint32_t seed); - -#endif /* __PRNG_H */ diff --git a/client/src/tea.c b/client/src/tea.c deleted file mode 100644 index ae5aa366d..000000000 --- a/client/src/tea.c +++ /dev/null @@ -1,79 +0,0 @@ -//----------------------------------------------------------------------------- -// Borrowed initially from -// https://web.archive.org/web/20070920142755/http://www.simonshepherd.supanet.com:80/source.htm#ansi -// Copyright (C) Simon Shepherd 2003 -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- -// Generic TEA crypto code. -//----------------------------------------------------------------------------- -#include "tea.h" - -#include "commonutil.h" // bytes_to_num etc - -#define ROUNDS 32 -#define DELTA 0x9E3779B9 -#define SUM 0xC6EF3720 - -void tea_encrypt(uint8_t *v, uint8_t *key) { - - uint32_t a = 0, b = 0, c = 0, d = 0, y = 0, z = 0; - uint32_t sum = 0; - uint8_t n = ROUNDS; - - //key - a = bytes_to_num(key, 4); - b = bytes_to_num(key + 4, 4); - c = bytes_to_num(key + 8, 4); - d = bytes_to_num(key + 12, 4); - - //input - y = bytes_to_num(v, 4); - z = bytes_to_num(v + 4, 4); - - while (n-- > 0) { - sum += DELTA; - y += ((z << 4) + a) ^ (z + sum) ^ ((z >> 5) + b); - z += ((y << 4) + c) ^ (y + sum) ^ ((y >> 5) + d); - } - - num_to_bytes(y, 4, v); - num_to_bytes(z, 4, v + 4); -} - -void tea_decrypt(uint8_t *v, uint8_t *key) { - - uint32_t a = 0, b = 0, c = 0, d = 0, y = 0, z = 0; - uint32_t sum = SUM; - uint8_t n = ROUNDS; - - //key - a = bytes_to_num(key, 4); - b = bytes_to_num(key + 4, 4); - c = bytes_to_num(key + 8, 4); - d = bytes_to_num(key + 12, 4); - - //input - y = bytes_to_num(v, 4); - z = bytes_to_num(v + 4, 4); - - /* sum = delta<<5, in general sum = delta * n */ - while (n-- > 0) { - z -= ((y << 4) + c) ^ (y + sum) ^ ((y >> 5) + d); - y -= ((z << 4) + a) ^ (z + sum) ^ ((z >> 5) + b); - sum -= DELTA; - } - num_to_bytes(y, 4, v); - num_to_bytes(z, 4, v + 4); -} diff --git a/client/src/tea.h b/client/src/tea.h deleted file mode 100644 index 62a67fa7b..000000000 --- a/client/src/tea.h +++ /dev/null @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// Borrowed initially from -// https://web.archive.org/web/20070920142755/http://www.simonshepherd.supanet.com:80/source.htm#ansi -// Copyright (C) Simon Shepherd 2003 -// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// See LICENSE.txt for the text of the license. -//----------------------------------------------------------------------------- -// Generic TEA crypto code. -//----------------------------------------------------------------------------- - -#ifndef __TEA_H -#define __TEA_H - -#include "common.h" - -void tea_encrypt(uint8_t *v, uint8_t *key); -void tea_decrypt(uint8_t *v, uint8_t *key); - -#endif /* __TEA_H */ From 1f0e59148d593bd045112a1cd5e38ad7703c6302 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Fri, 14 Jan 2022 20:58:56 +0100 Subject: [PATCH 71/73] atr update --- client/atr_scrap_pcsctools.py | 20 ++++++-- client/src/atrs.h | 96 ++++++++++++++++++++++++++--------- 2 files changed, 89 insertions(+), 27 deletions(-) diff --git a/client/atr_scrap_pcsctools.py b/client/atr_scrap_pcsctools.py index 7b395fc84..a3bb2cd98 100755 --- a/client/atr_scrap_pcsctools.py +++ b/client/atr_scrap_pcsctools.py @@ -8,13 +8,25 @@ import unidecode ATR_URL='https://raw.githubusercontent.com/LudovicRousseau/pcsc-tools/master/smartcard_list.txt' C_HEADER="""//----------------------------------------------------------------------------- -// List scraped from +// Borrowed initially from // """ + ATR_URL + """ // Copyright (C) 2002-2021 Ludovic Rousseau +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // -// This code is licensed to you under the terms of the GNU GPL, version 2 or, -// at your option, any later version. See the LICENSE.txt file for the text of -// the license. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// *DO NOT EDIT MANUALLY* +// Autogenerated with atr_scrap_pcsctools.py //----------------------------------------------------------------------------- #ifndef ATRS_H__ diff --git a/client/src/atrs.h b/client/src/atrs.h index dd160b17d..e61f7279a 100644 --- a/client/src/atrs.h +++ b/client/src/atrs.h @@ -16,6 +16,9 @@ // // See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- +// *DO NOT EDIT MANUALLY* +// Autogenerated with atr_scrap_pcsctools.py +//----------------------------------------------------------------------------- #ifndef ATRS_H__ #define ATRS_H__ @@ -501,7 +504,7 @@ const static atr_t AtrTable[] = { { "3B6600FF4A434F503230", "UOB Preferred Platinum Visa Card (Bank)\nhttp://www.uob.com.sg/personal/cards/credit/preferred_platinum_visa_card.html" }, { "3B6600FF4A434F503231", "JCOP 21" }, { "3B6600FF4A434F503330", "JCOP30 'OP-DI 16k VISA v2 (JCOP30) ORGA'" }, - { "3B67000000000000009000", "Axa Bank (Belgium) Mastercard Gold / Axa Bank Belgium\nMisterCash & Proton card\nVISA Card (emitted by Bank Card Company - Belgium)" }, + { "3B67000000000000009000", "Axa Bank (Belgium) Mastercard Gold / Axa Bank Belgium\nMisterCash & Proton card\nVISA Card (emitted by Bank Card Company - Belgium)\nHellobank/BNP Paribas Fortis Belgium Bancontact Visa debit card (Bank)" }, { "3B67000000000000418684", "ezpu100 (Bank)" }, { "3B67000000002000009000", "BankID card from Sparebank1" }, { "3B67000000318071869000", "Swiss ZKB-Bancomat-Card" }, @@ -560,7 +563,7 @@ const static atr_t AtrTable[] = { { "3B6800000073C84010009000", "Icelandic Banking scheme Issued by the Ministry of Treasure in Iceland\nhttp://www.islandsrot.is/" }, { "3B6800000073C84011009000", "Woolworths Everyday Money prepaid Mastercard\nNordea Bank Norway Visa + national debet card [BankAxept]\nVISA Classic - Nordlandsbanken (Norway)\nCiti Double Cash MasterCard\nWescom Credit Union Visa Debit Card (Bank)\nhttps://www.wescom.org/CHECKING/CHECK-CARD.ASP" }, { "3B6800000073C84012009000", "Brazilian 'e-CPF' card" }, - { "3B6800000073C84013009000", "MASTERCARD issued by MLP (Marschollek, Lautenschlager and Partner)\nG&D 12696-GDM-10/11 DEBIT CARD issued by BANCO DE CREDITO DEL PERU\nVisa from Caisse populaire Desjardins (Canada) (Bank)\nhttps://www.desjardins.com/\nMasterCard issued by President's Choice Bank (Canada)\nhttp://pcfinancial.ca/mastercard\nMasterCard issued by CIBC (Canada)\nhttp://www.cibc.com/\nMasterCard issued by The Bank of Nova Scotia (Canada)\nhttp://www.scotiabank.com/\nMasterCard issued by JPMorgan Chase Bank, N.A.\nhttps://www.chase.com/\nCaixaBank Visa Electron (Bank)\nhttps://www.lacaixa.cat/" }, + { "3B6800000073C84013009000", "MASTERCARD issued by MLP (Marschollek, Lautenschlager and Partner)\nG&D 12696-GDM-10/11 DEBIT CARD issued by BANCO DE CREDITO DEL PERU\nVisa from Caisse populaire Desjardins (Canada) (Bank)\nhttps://www.desjardins.com/\nMasterCard issued by President's Choice Bank (Canada)\nhttp://pcfinancial.ca/mastercard\nMasterCard issued by CIBC (Canada)\nhttp://www.cibc.com/\nMasterCard issued by The Bank of Nova Scotia (Canada)\nhttp://www.scotiabank.com/\nMasterCard issued by JPMorgan Chase Bank, N.A.\nhttps://www.chase.com/\nCaixaBank Visa Electron (Bank)\nhttps://www.lacaixa.cat/\nAmerican Express Canada Credit Card (Bank)" }, { "3B6800000073C8401300907D", "NextCard - Mastercard Debit card - Intesa Sanpaolo Bank (Italy) (Bank)\nhttps://www.intesasanpaolo.com/it/persone-e-famiglie/prodotti/carte/carte-di-debito/next-card.html" }, { "3B68000000DE511001019000", "Itau Bank Mastercard Debit Card (Brazil) (Bank)\nhttps://www.itau.com.br" }, { "3B6800000101309600009000", "Edenred - French Restauration e-Ticket card (2013) (Other)\nhttps://www.edenred.fr/ticket-restaurant" }, @@ -602,7 +605,7 @@ const static atr_t AtrTable[] = { { "3B6900002494010000000001A9", "Kazakhstan Helios gas station debit card\nhttp://helios.kz/" }, { "3B6900002494010201000101A9", "Chipcard from SUN to be used in SunRay's\n370-4328-01 (31091)" }, { "3B6900002494010301000100A9", "Schlumberger MicroPayflex S card" }, - { "3B6900004944353056312E....", "eID Card to user authenticate and save paswords in the Card. Product ID50 Password manager from IDENTOS GmbH (eID)\nhttps://identos.com/id50-password-manager/" }, + { "3B6900004944353056312E....", "eID Card to user autheticate and save paswords in the Card. Product ID50 Password manager from IDENTOS GmbH (eID)\nhttps://identos.com/id50-password-manager/" }, { "3B6900004944363056312E....", "token appidkey ID60-USB (Other)\nhttps://identsmart.com/en/products/id60-datasafe/" }, { "3B6900004A434F503331563232", "Visa Europe Sample Card / Axalto" }, { "3B6900005001010401000101A9", "Sample card given to all attendees of the CTST 2004 SmartCard Conference" }, @@ -645,7 +648,7 @@ const static atr_t AtrTable[] = { { "3B6A0000813F017511010281010A", "Huada CIU9872B (Java Card 2.2.2) (JavaCard)" }, { "3B6A0000866500A758C046009000", "China Merchants Bank card (Bank)" }, { "3B6A0000866500A758C055009000", "Credit card (Bank)" }, - { "3B6A00FF0031C173C84000009000", "Paypal EMV debit card (Bank)" }, + { "3B6A00FF0031C173C84000009000", "Paypal EMV debit card (Bank)\nAmerican Express Canada Credit Card (Bank)\nhttps://www.americanexpress.com/ca/en/credit-cards/all-cards/?intlink=ca-en-hp-product1-cm-personalcards-03242021" }, { "3B6A00FF41424344324546474849", "Austria card - JCOP 31/36K" }, { "3B6A00FF4A434F50323156323331", "JCOP21 v2.3 Standard" }, { "3B6A00FF4A434F50343156323231", "JCOP41 Cards (not supported, but recognized by Classic Client)\nNHS hospital smartcard login key (HealthCare)" }, @@ -678,6 +681,7 @@ const static atr_t AtrTable[] = { { "3B6B00000031C064084403680F9000", "Credit card emitted by KBC Brussels, Belgium (Bank)\nAdvanzia Credit Card (Master Card gold), Germany (IDK if there is a difference between the german one and the other ones) (Bank)\nhttps://mastercard.gebuhrenfrei.com/\nItalian Intesa Sanpaolo Superflash Prepaid Mastercard (Bank)" }, { "3B6B00000031C06408440376079000", "Blu American Express Credit Card (Bank)\nhttps://www.americanexpress.com/it/content/carta-blu/" }, { "3B6B00000031C064084403760F9000", "Maestro debit card, issued by Caixa Geral de Depositos (Bank)\nhttps://www.cgd.pt/Particulares/Cartoes/Cartoes-de-Debito/Pages/Cartao-Debito-Cauxautomatica-Maestro.aspx" }, + { "3B6B00000031C064084841080F9000", "Monizze card. Card use to pay only meal. (Other)\nhttp://www.monizze.be" }, { "3B6B00000031C064131402000F9000", "UBA Card PREPAID (Bank)" }, { "3B6B00000031C0641F1801000F9000", "Portuguese Medical Association eID card (Cedula Profissional, Ordem dos Medicos, Portugal) (eID)\nhttp://www.omsul.pt/tabid/242/Default.aspx" }, { "3B6B00000031C0641F270100079000", "SOCCARDRT (HealthCare)" }, @@ -701,7 +705,9 @@ const static atr_t AtrTable[] = { { "3B6B00000031C1640860321F079000", "NMRC Card (Transport)" }, { "3B6B00000031C1640860321F0F9000", "Fio bank, Mastercard, credit (Bank)\nhttps://www.fio.cz/bankovni-sluzby/platebni-karty/kreditni-karty" }, { "3B6B00000031C164086032200F9000", "Twisto (Bank)" }, + { "3B6B00000031C16408603221079000", "DSK Bank Debit Mastercard (Bank)" }, { "3B6B00000031C164087771300F9000", "Apple Card (from launch) (Bank)\nhttps://www.apple.com/apple-card/" }, + { "3B6B00000031C16408777156079000", "American Express UK Euro ICC charge card (Bank)\nhttps://www.americanexpress.com/icc/cards/the-basic-international-currency-card.html" }, { "3B6B00000031C164089862010F9000", "Sodexo Czech Gastro/Multipass (Other)\nhttps://www.sodexo.cz/" }, { "3B6B000020900000000000B0A2BD69", "Fudan FM1280 (JavaCard)" }, { "3B6B0000426C756361726420344B42", "Blutronics Blucard 4K (Loyalty)\nhttp://blucard.blutronics.com" }, @@ -729,6 +735,7 @@ const static atr_t AtrTable[] = { { "3B6C00000F31C071D6643E6701015D84", "VISA GOLD or Maestro, issued by Swedbank Lithuania (Bank)\nVISA credit card, issued by HSBC Commercial Card UK (Bank)\nhttp://www.swedbank.lt/lt/pages/privatiems/auksine_kredito_kortele\nHSBC Commercial Card (UK) VISA\nCapital One UK Platinum MasterCard" }, { "3B6C0000101010300000000000000000", "Datacard Group Aptura Development Card V1.1b" }, { "3B6C0000426C756C6F676F6E20344B42", "eID Blutronics Blulogon 4K\nhttp://shop.blutronics.com/Prodotti.asp" }, + { "3B6C00004E5449433190560A4A030000", "Tsinghua Tongfang Company (Pay TV)" }, { "3B6C00004E544943339051024A030000", "Topas TV (Pay TV)" }, { "3B6C000080641134014873F741C08107", "Universal Electronic Card (UEC Russia) (eID)" }, { "3B6C0000806411650190730000008107", "Universal Electronic Card (UEC Russia) (eID)" }, @@ -770,12 +777,7 @@ const static atr_t AtrTable[] = { { "3B6D00005744285746035062136568541F", "Card for decrypt encrypted tv channels made in china (Pay TV)" }, { "3B6D00005744296C808693D1271F13323D", "SCSTA (Transport)" }, { "3B6D00005744296C808693D603EE082A3D", "SCSTA (Transport)" }, - { "3B6D000057443641018693073037373633", "Watchdata USB Key (PKI)" }, - { "3B6D000057443641018693073131323235", "Watchdata Proxkey (PKI)\nhttps://www.watchdata.com/" }, - { "3B6D000057443641018693073231343431", "Watchdata USB Key (PKI)" }, - { "3B6D000057443641018693073231363432", "Watchdata USB Key (Other)" }, - { "3B6D000057443641018693073332353530", "Watchdata Proxkey (PKI)\nhttps://www.watchdata.com/" }, - { "3B6D0000574436410186930739........", "WatchData Proxkey with VID:PID as 0x163C:0x0417 (PKI)\nhttp://www.watchdata.com/class.php?id=19" }, + { "3B6D000057443641018693............", "WatchData Proxkey (PKI)" }, { "3B6D000080318065495301000183079000", "Yandex money world card (Bank)\nhttps://money.yandex.ru" }, { "3B6D000080318065495301030183079000", "MTS Money Bank Card (Bank)" }, { "3B6D000080318065495302020183079000", "MasterCard SMP BANK (Bank)\nhttps://smpbank.ru/" }, @@ -806,6 +808,7 @@ const static atr_t AtrTable[] = { { "3B6E00000031807186654744240181839000", "MasterCard Card - Maximum - IS Bank / Turkey\nVisa Card - Axess - Akbank / Turkey" }, { "3B6E00000031C0650AD702008271D68C6133", "Lloyds (Bank)" }, { "3B6E00000031C0650AD702008271D68C6137", "MasterCard credit card issued by Citadele bank (Latvia) including e-Talons (public transportation system) (Bank)" }, + { "3B6E00000031C0650AD702008271D68C6139", "Desjardins Interac Debit Card (Bank)\nhttps://www.desjardins.com/ca/personal/accounts-services/access-card/index.jsp" }, { "3B6E00000031C0650AD702008271D68C615A", "mastercard (Bank)\nhttp://nickel.com" }, { "3B6E00000031C06554B601008471D68C612C", "Kazakhstan Centrcredit bank VISA electron card\nhttp://www.bcc.kz/en/" }, { "3B6E00000031C06554B601008471D68C6131", "UK BARCLAYS VISA Connect Debit card.\nThe chip is used for the Chip&PIN application common for all UK-issued cards\nhttp://www.chipandpin.co.uk/" }, @@ -930,11 +933,12 @@ const static atr_t AtrTable[] = { { "3B6F00000031C173C8211064474D3133009000", "Bank card from the Commonwealth Bank of Australia (Bank)\nhttps://www.commbank.com.au/business/pds/cbb127_eftpos_int_v7.pdf" }, { "3B6F00000031C173C8211064474D3134009000", "bancomat Banca Popolare Milano + maestro debit card + rfid (Bank)" }, { "3B6F00000031C173C8211064474D3331009000", "BBVA Antes Card (Spain) (VISA) prepaid card (Bank)\nhttps://www.bbva.es/eng/productos/ficha/tarjeta-antes-bbva/0T00000225" }, - { "3B6F00000031C173C8211064474D3332009000", "td debit visa card (Bank)" }, + { "3B6F00000031C173C8211064474D3332009000", "td debit visa card (Bank)\nScotiabank ScotiaCard Interac/Visa debit card (Bank)\nhttps://www.scotiabank.com/ca/en/personal/ways-to-bank/debit-credit-prepaid-cards/debit-cards/scotiacards.html" }, { "3B6F00000031C173C8211064474D3338009000", "ING Direct Debit Card (Bank)" }, { "3B6F00000031C173C8211064474D3341009000", "Fineco debit card (Bancomat, Visa Debit) (Bank)\nhttps://finecobank.com/it/online/conto-e-carte/carte-e-bancomat/" }, { "3B6F00000031C173C8211064474D3435009000", "VISA card, issued by OP Financial Group, Finland (Bank)" }, { "3B6F00000031C173C8211064474D3437009000", "Visa credit card, issued by Klarna (Bank) (Bank)\nhttps://www.klarna.com/se/kort/" }, + { "3B6F00000031C173C821106457493036009000", "neat MasterCard (Bank)\nhttps://www.neatcommerce.com/" }, { "3B6F00000031C173C821106457493131009000", "Banca Popolare Di Sondrio (IT) - Ateneo+ Card for University of Brescia (Bank)\nhttps://www.ateneopiu.it/home" }, { "3B6F00000031C173C8211064574B3037009000", "NatWest VISA Debit card (Bank)\nhttps://personal.natwest.com/personal/current-accounts/select_account.html" }, { "3B6F00000031C173C8211064574B3133009000", "Carta HYPE MasterCard (Italy) (Bank)\nhttps://www.hype.it/\nRACC Master (Bank)\nhttps://www.racc.cat/targeta-racc-master" }, @@ -987,7 +991,7 @@ const static atr_t AtrTable[] = { { "3B6F00008031E06B04310502AF555555555555", "debit card (Bank)\nhttps://www.usaa.com/inet/wc/banking" }, { "3B6F00008031E06B04310502D1555555555555", "Pockit Pre-Paid Mastercard (Contact Chip). (Bank)\nhttps://revolut.com/" }, { "3B6F00008031E06B04310502D6555555555555", "Bank IN - Slovenian bank (Bank)\nhttps://www.bankain.si/BIN/vstopna.seam" }, - { "3B6F00008031E06B04520502BB555555555555", "AlfaBROU - Mastercard (prepaid card emitted by Banco Republica - Uruguay) (Bank)\nhttps://www.brou.com.uy/personas/tarjetas/prepaga-alfabrou" }, + { "3B6F00008031E06B04520502BB555555555555", "AlfaBROU - Mastercard (prepaid card emited by Banco Republica - Uruguay) (Bank)\nhttps://www.brou.com.uy/personas/tarjetas/prepaga-alfabrou" }, { "3B6F00008031E06B04520502FD555555555555", "C6 Bank Mastercard Global Account (Bank)\nhttps://www.c6bank.com.br/conta-global\nC6 Bank Mastercard Brazil Account (Bank)\nhttps://www.c6bank.com.br/nossos-produtos" }, { "3B6F00008031E06B04520502FE555555555555", "CITIBanamex 'Perfiles' debit card (Bank)\nhttps://www.banamex.com/es/personas/cuentas/cuenta-perfiles.html" }, { "3B6F00008031E06B0505050280555555555555", "Banamex cuenta perfiles (Bank)\nhttp://banamex.com" }, @@ -1036,11 +1040,15 @@ const static atr_t AtrTable[] = { { "3B6F0000805A08060820022B934564EC829000", "OPUS Card (Transport)\nhttp://carteopus.info/" }, { "3B6F0000805A08060820022B9346A2C5829000", "Carte OPUS / OPUS Card - Transport Montreal, Laval, Longueuil, Quebec (Transport)\nhttp://carteopus.info/" }, { "3B6F0000805A08060820022B9349A83F829000", "Montreal OPUS Transportation Card for the STM, STL, RTM and RTL (Transport)\nhttp://www.stm.info/en/info/fares/opus-cards-and-other-fare-media" }, + { "3B6F0000805A080608201223C1D95A43829000", "Transport card for the Quebec Province in Canada, namely the ARTM Transport Agency and others... (Transport)\nhttps://opusenligne.ca/" }, { "3B6F0000805A080608201223C1E2F6C6829000", "STM Opus Card - Montreal Transit Pay Card (Other)\nhttps://en.wikipedia.org/wiki/OPUS_card" }, { "3B6F0000805A080608201223C1EA7F50829000", "Montreal transport Opus Card (Transport)" }, { "3B6F0000805A080608201223C1ECE24B829000", "STM (Transport)\nhttp://www.stm.info" }, { "3B6F0000805A080608201223C202795D829000", "OPUS is card for storing public transit passes and tickets (Transport)\nhttps://opusenligne.ca/" }, { "3B6F0000805A080608201223C2036347829000", "OPUS Card RTC Quebec's Bus system (Canada) (Transport)\nhttps://opusenligne.ca" }, + { "3B6F0000805A080608201223C204D07F829000", "OPUS Card (Transport)\nhttps://en.wikipedia.org/wiki/OPUS_card" }, + { "3B6F0000805A080608201223C21113A6829000", "OPUS (Montreal and Quebec transport card) (Transport) (Transport)\nhttps://www.stm.info/en/info/fares/opus-cards-and-other-fare-media/opus-card" }, + { "3B6F0000805A080608201223C21290FD829000", "OPUS Montreal Societe des Transports de Montreal Metro and Bus card. (Transport)\nhttps://www.stm.info/en/info/fares/opus-cards-and-other-fare-media" }, { "3B6F0000805A0A010120031103DCB31B829000", "Card Transport 'Lignes d'Azur' of 'Metropole Nice Cote d'Azur'" }, { "3B6F0000805A0A01012003119361D7D7829000", "Carte Tecely (Reseau TCL: metro, tramway, bus et funiculaire de Lyon) (Idemia)" }, { "3B6F0000805A0A0102200311........829000", "Card << Oura ! >> of region Rhone-Alpes, Calypso standard (TER, Transisere)" }, @@ -1091,7 +1099,7 @@ const static atr_t AtrTable[] = { { "3B6F0000805A28114210122B27558E85829000", "Stif Navigo Pass (French Syndicate of Transport in Ile de France) (Transport)" }, { "3B6F0000805A28114210122B275DCF41829000", "Pass navigo (Transport)" }, { "3B6F0000805A28114210122B276132D6829000", "Navigo (Transport)" }, - { "3B6F0000805A28114210122B2764E735829000", "Navigo pass, Paris (France) transport network (https://en.wikipedia.org/wiki/Navigo_pass) (Transport)" }, + { "3B6F0000805A28114210122B2764E735829000", "Navigo pass, Paris (France) trasport network (https://en.wikipedia.org/wiki/Navigo_pass) (Transport)" }, { "3B6F0000805A28114210122B276562F7829000", "French NAVIGO Card (simple Navigo model, not annual or Imagin'R) (Transport)" }, { "3B6F0000805A28114210122B276780D9829000", "Navigo (Transport)\nhttps://www.navigo.fr/" }, { "3B6F0000805A28114210122B276D6BB5829000", "Navigo (Transport)" }, @@ -1110,6 +1118,7 @@ const static atr_t AtrTable[] = { { "3B6F0000805A28130210122B03EF5400829000", "Korrigo Ter French card for train travels (Transport)\nhttps://www.ter.sncf.com/bretagne/offres/carte-korrigo" }, { "3B6F0000805A28130210122B03F7E432829000", "KorriGo, smart transport card in France region Brittany (Transport)\nhttps://www.ter.sncf.com/bretagne/offres/carte-korrigo" }, { "3B6F0000805A28130210122B03F80BC3829000", "Korrigo Card (Transport in Rennes Area in France ) (Transport)\nhttps://www.star.fr/titres-tarifs/carte-korrigo/" }, + { "3B6F0000805A28130210122B7500559A829000", "Contact card to handle personal travel tickets in the Britany area. Used by several travel operators like SNCF TER Bretagne, STAR in Rennes, BIBUS in Brest,.... (Transport)" }, { "3B6F0000805A28130210122B75021B8A829000", "KorriGo, smart transport card in France region Brittany (Transport)\nhttps://www.ter.sncf.com/bretagne/offres/carte-korrigo" }, { "3B6F0000805A28130210122B9292E642829000", "Transport card in cote d'or France (mobigo)" }, { "3B6F0000805A28130210122B9292E829829000", "French transport card of the city of Dijon and Cote d'or department. (Transport)\nhttps://www.viamobigo.fr/fr/acheter-mes-titres-de-transport-mobigo-en-cote-dor/176" }, @@ -1144,6 +1153,7 @@ const static atr_t AtrTable[] = { { "3B6F0000805A2C23EA00030503BD09B2829000", "TEC MoBIB Transportation Card (Transport)\nhttps://www.infotec.be/fr-be/acheteruntitre/mobib.aspx" }, { "3B6F0000805A2C23EA00030503BF9E2B829000", "MOBIB - TEC (Transport)\nhttps://www.infotec.be/fr-be/acheteruntitre/mobib.aspx" }, { "3B6F0000805A2D0608101002782BB4A4829000", "Lisboa Viva, Lisbon public transport card (Transport)\nhttps://www.portalviva.pt/" }, + { "3B6F0000805A2D060810100278324D6F829000", "Lisboa Viva card, public transport card of Lisbon (Portugal) (Transport)\nhttps://www.portalviva.pt" }, { "3B6F0000805A2D06081010027835EDCE829000", "Lisbon Transportation SmartCard (Transport)" }, { "3B6F0000805A2D06081010027848BBCC829000", "Lisbon Metro Monthly Student Pass (Transport)\nhttps://www.metrolisboa.pt/" }, { "3B6F0000805A3407061500017917A7E2829000", "Rav-Kav multi-line travel ticket used in the public transportation system in Israel (Transport)\nhttps://www.gov.il/en/departments/guides/multi_line_card" }, @@ -1153,9 +1163,11 @@ const static atr_t AtrTable[] = { { "3B6F0000805A3C0608140101C3805E38829000", "Lisboa VIVA - Lisbon public transport card (Transport)\nhttps://www.portalviva.pt/" }, { "3B6F0000805A3C1142141001274AC890829000", "Gemalto Celego G1 (Transport)" }, { "3B6F0000805A3C114214100127A46D02829000", "Navigo decouverte Paris (Transport)\nhttp://www.navigo.fr/titres/le-forfait-navigo-semaine-presentation/" }, + { "3B6F0000805A3C114214100127B3C81B829000", "Transport card for Paris (France) and its region. Market name is Navigo (Transport)" }, { "3B6F0000805A3C1142141001C12954D4829000", "Public transportation card (navigo) for Paris and Ile-de-France region, France (Transport)\nhttps://www.iledefrance-mobilites.fr/en/tickets-fares/detail/navigo-monthly-ticket" }, { "3B6F0000805A3C1142141001C140E819829000", "France Ile de France Public Transport Card (Transport)" }, { "3B6F0000805A3C1142141001C1523E9D829000", "navigo (Transport)" }, + { "3B6F0000805A3C1142141001C17B89D9829000", "Navigo Easy (Paris Calypso transport card) (Transport)\nhttps://www.iledefrance-mobilites.fr/titres-et-tarifs/supports/passe-navigo-easy" }, { "3B6F0000805A3C1142141001C17BC3D4829000", "Navigo easy -- French (Paris region) transport card (Transport)" }, { "3B6F0000805A3C1142141001C17BC993829000", "Navigo Easy (Transport)\nhttps://www.ratp.fr/titres-et-tarifs/passe-navigo-easy" }, { "3B6F0000805A3C1142141001C17DA8CA829000", "Navigo Easy (France) transport card (Transport)\nhttps://www.ratp.fr/titres-et-tarifs/passe-navigo-easy" }, @@ -1175,6 +1187,7 @@ const static atr_t AtrTable[] = { { "3B6F0000805A3D0706150101792CB636829000", "RavKav (Transport)" }, { "3B6F0000805A3D23C41501027937D7AE829000", "MOBIB - Brussels (Transport)\nhttps://www.stib-mivb.be/article.html?_guid=d02c7fb6-3e9c-3810-248e-eec4ee5ebc8c&l=fr" }, { "3B6F0000805A3D23C41501027949789C829000", "MOBIB basic (Transport)\nhttp://www.stib-mivb.be/article.html?_guid=30af0085-2483-3410-5394-a71daf08acd1&l=en#contentBodyList1" }, + { "3B6F0000805A3D23C415010279748A25829000", "Mobib (Brussels transport card) for the STIB-MIVB network (Transport)\nhttps://www.stib-mivb.be/article.html?_guid=d02c7fb6-3e9c-3810-248e-eec4ee5ebc8c&l=fr" }, { "3B6F0000805A434F4C44000000000000829000", "LBB Berlin, MasterCard (ADAC branding?)" }, { "3B6F0000805A4880C1205001AEC00295829000", "Calypso SAM C1 (Transport)" }, { "3B6F0000806645460138180353023110829000", "Fabrica Nacional de Moneda y Timbre FNMT WG10\nhttp://www.fnmt.es/es/html/tage/fichaTarjeta/fp1_ta_01.asp" }, @@ -1221,6 +1234,7 @@ const static atr_t AtrTable[] = { { "3B7812000054C403008FF19000", "Skylink irdeto from Towercom a.s. company\nirdeto card for the ORF (Austrian national public television) HD channels" }, { "3B7812000065C405008FF19000", "Digiturk Cryptoworks" }, { "3B7812000065C405058FF19000", "Turkie Digiturk Cryptoworks" }, + { "3B7812000065C405FF8FF19000", "CRYPTOWORKS , CAID:0D22 ISSUER:TIVIDI id:04, bios: v5, pin: unknown, mfid:3F6A (Pay TV)" }, { "3B78120000A0C403068FF19000", "ORF Digital (Irdeto/Cryptoworks) (pay tv)" }, { "3B78120000A0C403078FF19000", "IRDETO-Smartcard for crytoworks for austrian television (ORF), DVB-s" }, { "3B78120000A0C406008FF19000", "Cryptoworks/Nagravision decoding card" }, @@ -1272,7 +1286,7 @@ const static atr_t AtrTable[] = { { "3B7A9600008065A20101013D72D643", "AGH University of Science and Technology (Poland) - Student Identity Card (ELS) (eID)\nWarsaw University of Technology (Poland) (eID)" }, { "3B7A9600008065A201200100303D72D641", "Oman eID (eID)" }, { "3B7A9600008065A20120013D72D641", "Oman eID (eID)" }, - { "3B7A9700008065B08520040272D641", "OMAN EID CARD (eID)" }, + { "3B7A9700008065B08520040272D64.", "OMAN EID CARD (eID)" }, { "3B7B..000080620.515646696E454944", "Setec SetCOS 5.1.0" }, { "3B7B..00008065B083......83009000", "IDClassic 3XX Cards (without MPCOS Applet - FIPS)" }, { "3B7B11000031FE45436F6D624F532000", "Debit card emmited by Societe Generale Morocco (Bank)" }, @@ -1624,6 +1638,7 @@ const static atr_t AtrTable[] = { { "3B88800100000000008187000F", "ING Bank Card (Bank)\nhttps://www.ing.nl/particulier/betalen/passen/betaalpas/contactloos-betalen-met-uw-betaalpas/index.html" }, { "3B888001000000000081911009", "Trenitalia (Italy) fidelity card 'CartaFreccia' (RFID)" }, { "3B88800100000000038191001A", "Italian healthcare card (TS) National Service Card (CNS) NFC Interface (eID)" }, + { "3B888001000000001171710018", "Contactless card to handle personal travel tickets in the Britany area. Used by several travel operators like SNCF TER Bretagne, STAR in Rennes, BIBUS in Brest,.... (Transport)" }, { "3B888001000000001181810018", "Rav Kav (Transport)\nhttps://ravkavonline.co.il/he/" }, { "3B88800100000000338181003A", "Interparking MOBIB basic - RFID/Smartcard car park and car wash token" }, { "3B88800100000000338191002A", "Regional services for Lombardy (Italy) (Other)\nhttp://www.crs.regione.lombardia.it/" }, @@ -1647,6 +1662,7 @@ const static atr_t AtrTable[] = { { "3B888001040200200071C140DF", "Seoul Citypass+ T-Money Card" }, { "3B8880011000000000817000E8", "Tap&Go MasterCard Sim Card (Bank)\nhttps://www.tapngo.com.hk" }, { "3B88800111000011008184000C", "OCBC bank card (Bank)" }, + { "3B888001110000113381A38098", "casatramway rechargeable card (Transport)\nhttps://www.casatramway.ma/" }, { "3B88800111000011778183007C", "Passport of citizen of Ukraine, Passport of citizen of Ukraine for traveling abroad (passport)" }, { "3B88800111223344808171003D", "FIME Card Emulator (Other)\nhttps://www.fime.com/products/terminal-integration/savvi.html" }, { "3B8880011BE1F35E11778100B9", "Uruguyan persona ID. Nowadays a eID. (eID)\nhttps://www.gub.uy/agencia-gobierno-electronico-sociedad-informacion-conocimiento/firma-digital/es-cedula-identidad-digital" }, @@ -1655,6 +1671,7 @@ const static atr_t AtrTable[] = { { "3B8880011CF0E111F771850016", "CEPAS Card (Concession card issued by Land Transport Authority Singapore) (Transport)" }, { "3B88800130415654000000077D", "Avtor ID Key (eID)\nhttp://avtor.ua/" }, { "3B888001304C47127783D50001", "elesec - TCOS 3.0 Signature Card (eID)\nhttps://www.telesec.de/de/tcos/support/downloadbereich/category/28-leistungsbeschreibung" }, + { "3B88800130ABAB017781B70079", "Italian healtcare card (TS) National Service Card (CNS) (HealthCare)" }, { "3B88800131CCCC017781C1000E", "Ideal v 1.4 (Transport)" }, { "3B88800131CCCC017783A1006C", "Chile RUT (eID)" }, { "3B88800131F35E110081950090", "Venez_Omnikey" }, @@ -1707,6 +1724,7 @@ const static atr_t AtrTable[] = { { "3B898001434C616972653220363C", "Fidor Smartcard Mastercard/Maestro (Bank)\nhttps://www.fidor.eu" }, { "3B898001434C616972653320363D", "MasterCard with PayPass issued by Commerbank AG (Germany) (Bank)\nhttps://www.commerzbank.de/portal/de/privatkunden/produkte/bezahlen/kreditkarten/mastercard-classic/mastercardclassic.html" }, { "3B898001454D5620303320200673", "Lufthansa Miles & More Gold MasterCard PayPass (old one)\nFound a reference pointing to NXP\nhttp://www.usingrfid.com/news/read.asp?lc=l17607hx1500zk" }, + { "3B8980014550434F5356352E3936", "EPCOSV5.9 (eID)" }, { "3B8980014A434F5032343252324A", "NXP JCOP J3D" }, { "3B8980014A434F5032343252334B", "Feitian ePass FIDO-NFC (passport)\nhttps://ftsafe.com/products/FIDO/NFC" }, { "3B8980014A434F5033315632324A", "JCOP 31 v22 72K (with Mifare 1K emulation) - RFID I/F" }, @@ -1784,6 +1802,7 @@ const static atr_t AtrTable[] = { { "3B8B8001209000000000001614CDAADF", "JCOP 41 IBM card for Guizhou Normal University (JavaCard)" }, { "3B8B800120900000000000C3A4CC0918", "ID card (Other)" }, { "3B8B80012A26A7A10C804100000709C3", "T-Mobilitat (Transport)\nhttps://t-mobilitat.cat/" }, + { "3B8B8001474841204A32343120503158", "Republic of Ghana eID (eID)\nhttps://nia.gov.gh/" }, { "3B8B80014E58502D4E46432032000038", "TouchandTravel Touchpoint NFC-Card.\nTrain-Station in Berlin. Use a NFC-compliant phone to check in for a ticket." }, { "3B8B800150333038473050335F31302B", "Indonesian ektp (eID)" }, { "3B8B8001536F6C6F4B65792074617027", "Solokeys Solo Tap: 2FA device with NFC (Other)\nhttps://solokeys.com/products/solo-tap-usb-a-preorder?variant=27688204271680" }, @@ -1862,9 +1881,11 @@ const static atr_t AtrTable[] = { { "3B8C800150C110BBA9000000009171710F", "Divia card (passport)" }, { "3B8C800150C11BA3F10000000091717144", "Tramway (PKI)" }, { "3B8C800150C14164E3000000000071715A", "Navigo Annuel (France) (Transport)\nhttps://www.iledefrance-mobilites.fr/titres-et-tarifs/detail/forfait-navigo-annuel" }, + { "3B8C800150C14CFD23000000000071710E", "Navigo (Transport)\nhttps://www.iledefrance-mobilites.fr/" }, { "3B8C800150C16A347200000000007171B0", "Navigo pass (RATP) (Transport)\nhttp://www.navigo.fr/" }, { "3B8C800150C17B55BA0000000000717108", "Navigo Easy (Paris public transportation) (Transport)\nhttps://parisbytrain.com/navigo-easy/" }, { "3B8C800150C17DA8CA0000000000717183", "Navigo Easy (France) transport card (Transport)\nhttps://www.ratp.fr/titres-et-tarifs/passe-navigo-easy" }, + { "3B8C800150C2B936860000000000717196", "Passe Navigo (Transport)\nhttps://www.iledefrance-mobilites.fr/titres-et-tarifs/supports/passe-navigo-decouverte" }, { "3B8C800150C7251C5A00000011F781811F", "MOBIB Belgian public transport Card (Transport)\nhttps://mobib.be/fr.html" }, { "3B8C800150CA24513E00000011F781813A", "belgian mobib transportation card (Transport)" }, { "3B8C800150CBFB077E000000008081E1F4", "Samsung Digital Center in Seul Access ID card for guests (eID)" }, @@ -1901,6 +1922,7 @@ const static atr_t AtrTable[] = { { "3B8D80010073C80013645437433500900045", "Student ID card in Poland (eID)" }, { "3B8D80010073C80013645437443300900044", "master cRD (Bank)\nTD MasterCard\nTangerine MasterCard" }, { "3B8D80010073C80013645437473100900045", "Tangerine ATM/ABM Card" }, + { "3B8D800100851410108501112002759000CF", "Sahl Payment Card (Other)\nhttps://www.english.sahlpay.app/" }, { "3B8D80010D788084020073C840130090FFF8", "Nokia 6212 phone seen as NFC device" }, { "3B8D80010D78F7B1024A434F50763234316A", "Electronic Identity For Students at university (eID)" }, { "3B8D80014946582D6A63333031677032325A", "Degussa Bank Corporate MasterCard (Bank)\nhttps://firmenkarten.degussa-bank.de/" }, @@ -1911,6 +1933,7 @@ const static atr_t AtrTable[] = { { "3B8D80018073C021C057597562694B6579F9", "Yubikey 5 NFC (via NFC) (Other)\nhttps://www.yubico.com/product/yubikey-5-nfc/#yubikey-5-nfc" }, { "3B8D80018073C021C057597562694B65FF7F", "Yubikey 5 NFC via ACR122U (Other)" }, { "3B8D80018091E1318065B0831111AC830034", "TOP DM GX4 Cards [TOP DM GX4 on Gemalto Prox]" }, + { "3B8D80018091E165023078011373D4414067", "passport (passport)" }, { "3B8D80018091E165D0005B010273D44140B7", "Portuguese Passport (passport)\nhttp://www.pep.pt/PagesPT/Caracteristicas.aspx" }, { "3B8D80018091E165D0005B010373D44140B6", "French passport (2010-2011)" }, { "3B8E8001005100631F6D01739F20C0C0900012", "Identity card (eID) Republic of Latvia (eID)\nhttps://www.pmlp.gov.lv/en/home/services/personal-certificates-%28eid%29/" }, @@ -1943,7 +1966,9 @@ const static atr_t AtrTable[] = { { "3B8F80010000000000000000000000000000000E", "Tangem card (Other)\nhttps://tangem.com/" }, { "3B8F80010000000000000000000000FF829000E3", "CIE (eID)" }, { "3B8F80010031B86404B0ECC1739401808290000E", "Contactless CPS v3 Card (Carte de Professionnel de Sante)" }, + { "3B8F80010031C173C800106457494943009000B5", "ICC Solutions Card for Certification (Other)\nhttps://www.iccsolutions.com/" }, { "3B8F80010031C173C8211064414D333007900088", "ING-VISA-Card (Bank)\nhttps://www.ing.de/girokonto/karten-bargeld/" }, + { "3B8F80010031C173C8211064474D343700900089", "SpareBank Visa Card, Norway (Bank)" }, { "3B8F80010031C173C8211064574B313400900099", "G&D Sm@rtCafe Card embedded in a wristband (Bank)\nhttps://www.gi-de.com/en/au/mobile-security/industries/financial-institutions/wearables/" }, { "3B8F800100664653051000FF71DF000000000039", "JavaCOS A40 dual interface Java card - 64K (JavaCard)" }, { "3B8F800100B85421000090000000000000000053", "netbank Germany, Mastercard (Bank)\nhttps://netbank.de" }, @@ -2035,7 +2060,7 @@ const static atr_t AtrTable[] = { { "3B8F8001804F0CA00000030601....00000000..", "RFID - ISO 14443 Type A Part 1 (as per PCSC std part3)" }, { "3B8F8001804F0CA00000030602....00000000..", "RFID - ISO 14443 Type A Part 2 (as per PCSC std part3)" }, { "3B8F8001804F0CA00000030603....00000000..", "RFID - ISO 14443 Type A Part 3 (as per PCSC std part3)" }, - { "3B8F8001804F0CA000000306030000000000006B", "buss/train pass for use with Skanetrafiken (www.skanetrafiken.se) busses and trains.\npublic library of Dusseldorf\nhttp://www.duesseldorf.de/stadtbuechereien/\nspecialized Mifare Ultralight card" }, + { "3B8F8001804F0CA000000306030000000000006B", "buss/train pass for use with Skanetrafiken (www.skanetrafiken.se) busses and trains.\npublic libary of Dusseldorf\nhttp://www.duesseldorf.de/stadtbuechereien/\nspecialized Mifare Ultralight card" }, { "3B8F8001804F0CA000000306030001000000006A", "NXP/Philips MIFARE Classic 1K (as per PCSC std part3)\nhttp://www.nxp.com/#/pip/pip=[pfp=41863]|pp=[t=pfp,i=41863]\nOyster card - Transport for London (first-gen)\nhttps://en.wikipedia.org/wiki/Oyster_card\nACOS5/1k Mirfare\nvivotech ViVOcard Contactless Test Card\nBangkok BTS Sky SmartPass\nMifare Classic 1K (block 0 re-writeable)\nElectic vehicle charging card of the German Telekom, acting as EMSP GetCharge\nElectic vehicle charging card of the EMSP Stadtwerke Muenchen (SWM), ladenetz.de, Germany\nElectic vehicle charging card of the EMSP EinfachStromLaden of Maingau-Energie, Germany\nScouter carsharing customer card in Germany\nhttps://scouter.de/" }, { "3B8F8001804F0CA0000003060300020000000069", "RFID - ISO 14443 Type A - NXP Mifare card with 4k EEPROM" }, { "3B8F8001804F0CA0000003060300030000000068", "RFID - ISO 14443 Type A - NXP Mifare Ultralight or UltralightC" }, @@ -2114,8 +2139,10 @@ const static atr_t AtrTable[] = { { "3B959640F00F100A096A", "Zain Usim Card (Telecommunication)\nwww.qariya.com" }, { "3B959680B1FE551FC7477261636513", "IClass SE Processor (Other)\nhttps://www.hidglobal.com/products/embedded-modules/iclass-se/sio-processor" }, { "3B9596C0F01FC20F100A0A16", "viettel (Telecommunication)" }, + { "3B959740F01A160A1941", "SG50 (Samsung Chip) (Telecommunication)" }, { "3B961880018051006110309F006110309E", "Atmel/Athena T0 PC/SC Compliance Test Card No. 1 (warm reset)" }, { "3B9695801FC3D007830254005D", "au IC-card ver.001 (for CDMA2000) (Telecommunication)\nhttps://ja.wikipedia.org/wiki/Au_IC%E3%82%AB%E3%83%BC%E3%83%89" }, + { "3B97110002020422003F03", "China Unicom (Telecommunication)" }, { "3B9711801F418031A073BE2100A6", "Comprion UT3 simulator SIM (Other)" }, { "3B9711801F428031A073BE2100A6", "ETSI 102 230 Test case 5.2.5.3. Comprion IT3 SIM emulator (Telecommunication)" }, { "3B9711C0FFB1FE351F83A505010102A3015F", "digital chronotachygraphe card: conducteur/driver, entreprise, controleur/controler et atelier/workshop, 2006-2010\nmanufactured by Imprimerie Nationale, distributed by Chronoservices" }, @@ -2170,6 +2197,7 @@ const static atr_t AtrTable[] = { { "3B9B95801F478031A073BE210053349905D0", "GSM-SIM EMT 'Diil', prepaid (Estonia)" }, { "3B9B96C00A31FE4580670567B6040100008105FF", "Business Card (eID)" }, { "3B9B97C00A31FE4580670567B6040100008105FE", "Company Card for Tachograph Data (Transport)" }, + { "3B9C110068868D0C86980256408B0500", "China Mobile (Telecommunication)" }, { "3B9C131181647265616D6372797074000408", "XPlusTV & INXCT Access Card-9 (FIRECrypt)" }, { "3B9C131181647265616D6372797074900599", "FireCrypt, access card 9 (Pay TV)" }, { "3B9C940068868D0A86980256C2000500", "G3 & GSM & Blank SIM card: to be programmed for OpenBTS with pySim-prog (Telecommunication)" }, @@ -2199,6 +2227,7 @@ const static atr_t AtrTable[] = { { "3B9D95801FC780731A211B63AF06A6830F9000F3", "Orange UK GSM/UMTS SIM" }, { "3B9D95801FC780731A211B63AF09A9830F9000F3", "Estonian GSM operator TELE2 (WPKI eID support)" }, { "3B9D95803FC7A08031A073BE21135105830590007C", "NTT docomo Xi(LTE) DN05(DNP) Pink SIM (Telecommunication)" }, + { "3B9D960053492303030020000400F59000", "shell (Transport)" }, { "3B9E94801F4280310073BE211066545953044C25CF", "MCI (Mobile Communication Company of Iran) SIM" }, { "3B9E94801F478031A073BE21136686880210421014", "Airspan USIM (Telecommunication)" }, { "3B9E94801F478031A073BE21136686880210731025", "module (JavaCard)" }, @@ -2400,6 +2429,7 @@ const static atr_t AtrTable[] = { { "3B9F94801FC78031E073FE211B573786609BA182109B", "U Mobile POWER Prepaid (Telecommunication)\nhttp://www.u.com.my/prepaid" }, { "3B9F94801FC78031E073FE211B573F86604D03000075", "Prepaid SIM card MOCHE (Portugal) (Telecommunication)" }, { "3B9F94801FC78031E073FE211B573F866083020000BA", "GSM-SIM Beeline RU (Telecommunication)\nhttp://beeline.ru" }, + { "3B9F94801FC78031E073FE211B573F866096A100000C", "Lycamobile UICC/SIM card. (Telecommunication)\nhttps://www.lycamobile.com.au" }, { "3B9F94801FC78031E073FE211B573F8660AF01000095", "Gotanet SE USIM (Telecommunication)" }, { "3B9F94801FC78031E073FE211B573F8660B803000080", "Zero1 SIM card, Singapore (Telecommunication)" }, { "3B9F94801FC78031E073FE211B6345431983009000DA", "Smartjac (Telecommunication)" }, @@ -2434,7 +2464,9 @@ const static atr_t AtrTable[] = { { "3B9F95801FC38031E073FE211B649B4D011182900000", "Singular (now AT&T) 3G GSM SIM Card" }, { "3B9F95801FC38031E073FE211BB3E20174830F900088", "Gemplus GemXplore 3G USIM" }, { "3B9F95801FC78031A073B6A10067CF1713C41D2D3649", "Idemia card (Telecommunication)" }, + { "3B9F95801FC78031A073B6A10067CF1794AA28993F28", "Glaier Programable LTE USIM Card (Telecommunication)" }, { "3B9F95801FC78031A073B6A10067CF3211B252C679F3", "open5gs (Telecommunication)" }, + { "3B9F95801FC78031A073B6A10067CF3215A98FD70950", "LTE Card (Telecommunication)" }, { "3B9F95801FC78031A073BE21005304D08083059000BE", "NTT_DoCoMo (Telecommunication)" }, { "3B9F95801FC78031A073BE211367D002040901000005", "T-Mobile SIM card issued in Germany 2012" }, { "3B9F95801FC78031E073F62113674D451500390102F4", "Vivo 4G LTE SIM Card (Telecommunication)" }, @@ -2503,6 +2535,7 @@ const static atr_t AtrTable[] = { { "3B9F96801F878031E073FE2119674A555473300948DB", "nano sim/usim card (Telecommunication)" }, { "3B9F96801F878031E073FE2119674A555475300662F8", "SIM Card (Telecommunication)" }, { "3B9F96801F878031E073FE2119674A557330310746BE", "Hologram Developer Global IoT SIM Card (Telecommunication)\nhttps://hologram.io/store/global-iot-sim-card/17" }, + { "3B9F96801F878031E073FE211B674A4C5275310451D5", "Test card provided with 4G/5G network from Amarisoft (Telecommunication)" }, { "3B9F96801F878031E073FE211B674A4C7530300248A9", "Cardcentrics (Telecommunication)" }, { "3B9F96801F878031E073FE211B674A4C753034054BA9", "Test Card (Telecommunication)" }, { "3B9F96801FC30068104405014649534531C80790001A", "SETEC SetCard 32K PKI Evaluated SetCOS 4.4.1" }, @@ -2551,7 +2584,7 @@ const static atr_t AtrTable[] = { { "3B9F96801FC78031E073FE2113574A330E1F33310082", "Sysmocom SIM Card (Telecommunication)" }, { "3B9F96801FC78031E073FE2113574A330E1F33320081", "Lidl Connect SIM Card (Vodafone) (Telecommunication)" }, { "3B9F96801FC78031E073FE2113574A330E20333100BD", "T-Mobile US USIM card (Telecommunication)" }, - { "3B9F96801FC78031E073FE2113574A330E20333200BE", "M2M2FF1-NONRUG-D - Verizon Non-Rugged M2M SIM Card (Telecommunication)" }, + { "3B9F96801FC78031E073FE2113574A330E20333200BE", "M2M2FF1-NONRUG-D - Verizon Non-Rugged M2M SIM Card (Telecommunication)\nTelus Mobility SIM card (Telecommunication)\nhttps://www.telus.com/en/mobility/" }, { "3B9F96801FC78031E073FE2113574A330E20333300BF", "Turk Telekom SIM card [4>5G] (Telecommunication)\nhttps://bireysel.turktelekom.com.tr/4-5G/index.html" }, { "3B9F96801FC78031E073FE2113574A330E22333200BC", "Project Fi (Telecommunication)\nhttps://fi.google.com" }, { "3B9F96801FC78031E073FE2113574A330E24333200BA", "GSM, Vodafone (Germany) (Telecommunication)" }, @@ -2595,6 +2628,7 @@ const static atr_t AtrTable[] = { { "3B9F96801FC78031E073FE2113679807021402010351", "LTE USIM (US) (Telecommunication)" }, { "3B9F96801FC78031E073FE2115574A330E3B333400A5", "O2 Spain phone SIM (Telecommunication)\nhttps://o2online.es/" }, { "3B9F96801FC78031E073FE2115574A330E3F333500A0", "Telefonica (Germany) SIM Card (Telecommunication)" }, + { "3B9F96801FC78031E073FE2117574A330E3F333400A3", "Telecommunication (SIM or USIM card) T-Mobile Communications (Telecommunication)" }, { "3B9F96801FC78031E073FE2117574A330E3F333600A1", "Bell Mobility MULTI SIM (Telecommunication)\nhttps://bell.ca" }, { "3B9F96801FC78031E073FE2117574A33810433360015", "HoT Austria SIM Card (Telecommunication)\nhttps://hot.at/" }, { "3B9F96801FC78031E073FE211B57318660B21A0C0C9F", "SIM CARD (JavaCard)" }, @@ -2643,9 +2677,11 @@ const static atr_t AtrTable[] = { { "3B9F96803FC7008031E073FE211B6408050300829000EF", "Multipurpose UICC card for 2G, 3G, 4G/LTE, CDMA, ISIM & NFC (Telecommunication)\nhttp://www.smartjac.biz/index.php/component/eshop/telecom/test-uicc-sim-cards/2ff-mini-sim-cards/4g-open-multipurpose-uicc-card-3ff?Itemid=0" }, { "3B9F96803FC7008031E073FE211F6441262100829000A3", "Smartjac SMAOT100A234FF (Telecommunication)\nhttps://smartjac.com" }, { "3B9F96803FC7828031E073F62157574A330581053000CE", "COMPRION M2M eUICC (Telecommunication)" }, + { "3B9F96803FC7828031E073F62157574A4D020B60010069", "eSIM GSMA Card (Telecommunication)\nhttps://www.gsma.com/newsroom/wp-content/uploads/SGP.22_v2.2.pdf" }, { "3B9F96803FC7A08031E073F62156574A4D020B3444005B", "Norwegian telenor (Telecommunication)\nhttp://www.telenor.no" }, { "3B9F96803FC7A08031E073F62157574A4D020B34546329", "Orange FR - opa (Telecommunication)" }, { "3B9F96803FC7A08031E073FE211B63F100E8830090005E", "UICC CARD (Telecommunication)" }, + { "3B9F96803FC7A08031E073FE211B6407689A00829000B4", "Orange SIM Card (Telecommunication)" }, { "3B9F96803FC7A08031E073FE211B64080503008290004F", "NFC-enabled SIM card of MTS Russia. (Telecommunication)" }, { "3B9F96803FC7A08031E073FE211F6441269100829000B3", "LTE Lab SIM Ver 1.3 (Telecommunication)" }, { "3B9F968131FE458065544312210831C073F6218081059A", "Scientific and Technological Research Council of Turkey (test card) (eID)" }, @@ -2725,6 +2761,7 @@ const static atr_t AtrTable[] = { { "3BB7110081319043A5..............", "Siemens CardOS/M V1.4 (SLE44C80S)" }, { "3BB7110081319043C517B09D19221E1F", "CryptoTech blank access/authentication card (Other)\nhttp://www.cryptotech.com.pl/" }, { "3BB7110081319053B5..............", "CardOS EM/V1.4 (SLE44CR80S)" }, + { "3BB711008131FE4320283FB50320313B", "Research Institute of Applied Information Technologies (Other)\nhttp://dodatok.osvita.net/" }, { "3BB718008131704310434E5452563253", "Avtor SecureToken (PKI)" }, { "3BB718008131FE6553504B323490005A", "Giesecke & Devrient Starcos 2.4" }, { "3BB71800C03E31FE6553504B3234900025", "G&D STARCOS SPK 2.4" }, @@ -2759,6 +2796,7 @@ const static atr_t AtrTable[] = { { "3BBC1800813120755A43332E313220524556204146", "ZeitControl BasicCard Enhanced 3.7\nhttp://www.basiccard.com/" }, { "3BBC1800813120755A43332E313420524556204445", "ZeitControl BasicCard Enhanced 3.14 Rev D\nhttp://www.basiccard.com/" }, { "3BBC1800813120755A43332E333220524556204247", "ZeitControl BasicCard (Other)\nhttps://ZeitControl" }, + { "3BBC1800813120755A43332E333420524556204447", "ZeitControl BasicCard Enhanced ZC3.34 (Other)\nhttps://www.zeitcontrol.de/en" }, { "3BBC94004014474733483335585332303030", "GSM-SIM Era-PL\nT-Mobile GSM SIM Card" }, { "3BBC94004014474733483335585632303030", "GSM SIM CARD 32K, Vodafone" }, { "3BBC94004014474733493539424332303030", "GSM SIM Vodafona NL prepaid" }, @@ -2767,6 +2805,7 @@ const static atr_t AtrTable[] = { { "3BBC94004014474733494231424331303020", "Telenor SIM (Telecommunication)" }, { "3BBC94004014474733494231424331303030", "SIM Card (Scarlet, Belgium) (Telecommunication)\nhttps://www.scarlet.be/nl/prepaid/" }, { "3BBC94004014474733533035315331303130", "GSM SIM (Tele2, Estonia)\nGSM SIM Elisa Estonia; 2007\nGSM SIM from 'fonic' Germany" }, + { "3BBC94004014474733533443454332303030", "Era-PL SIM Card (Telecommunication)" }, { "3BBD18008131FE45805102670414B10101020081053D", "Austrian 'e-Card' (=Health Card)\nspecial Version of Starcos 3.1" }, { "3BBD18008131FE45805102670518B102020201810531", "Austrian health insurance card 'e-card'" }, { "3BBD18008131FE45805103670414B10101020081053C", "Austrian Health insurance card 'eCard' (HealthCare)\nhttp://www.chipkarte.at" }, @@ -2887,6 +2926,7 @@ const static atr_t AtrTable[] = { { "3BDA9400004D4D41524A2B33399000", "SIM card from Vodafone Spain" }, { "3BDA9500400A2508004053434F535441", "Card used for issuing commodity to benificiary for rice, wheat and more (Other)" }, { "3BDA96FF8131FE45805631B85349434181057B", "STARCOS 3.5 ID ECC C1R (PKI)\nhttps://www.gi-de.com/fileadmin/user_upload/MS/Certificates/STARCOS35_ID_ECC_TABLES.pdf" }, + { "3BDA96FF81B1FE451F0780584943412056322E30E9", "Starcos chip card from Giesecke & Devrient (PKI)\nhttps://ica.cz/functionality-smart-card" }, { "3BDB11FF5000FF0000000000000007921603", "NEC V-WAY64 v2.1" }, { "3BDB1800801F030031C06477E303008290004F", "Oberthur ID-One Cosmo 64K V5.2" }, { "3BDB180080B1FE451F830031C064C7FC1000019000FA", "Oberthur Cosmo V7 64K Dual/128K" }, @@ -2939,7 +2979,7 @@ const static atr_t AtrTable[] = { { "3BDC18FF8191FE1FC38073C821136605036057000255", "NXP IDProtect (X) (JavaCard)" }, { "3BDC18FF8191FE1FC38073C821136605036351000250", "JCOP3 SecID P60 CS (JavaCard)" }, { "3BDC96FF8111FE8031C8544356300573FFA1C03B", "NXP Javacard with Athena SCS OS (JavaCard)" }, - { "3BDC96FF81B1FE431FC30B46415245474F53414D5632CC", "Penis (Pay TV)" }, + { "3BDC96FF81B1FE431FC30B46415245474F53414D5632CC", "Multismartcard SAM (used in proprietary Scheidt&Bachmann Smartcard Reader v2)" }, { "3BDD18008131FE4580F9A0000000770100700A90008B", "National ID Card of Peru issued by RENIEC from Oberthur" }, { "3BDD18008131FE4580F9A000000077010800079000FE", "Oberthur Cosmo v7 IAS ECC\nBrazilian 'e-CNPJ' card, issued by Certisign (Oberthur)" }, { "3BDD18008131FE45904C41545649412D65494490008C", "Identity card (eID) Republic of Latvia\nhttp://www.pmlp.gov.lv/lv/pakalpojumi/passes/eid.html" }, @@ -2977,7 +3017,7 @@ const static atr_t AtrTable[] = { { "3BDF18008131FE7D006B150C0180011101434E53103180E9", "Provider: Actalis S.p.A.\ncode: AT00006181\nhttp://www.actalis.it" }, { "3BDF18008131FE7D006B150C0181011101434E53103180E8", "Italian healthcare card (TS) National Service Card (CNS)\nCarta Regionale dei Servizi - Regione Lombardia\nTuscany TS-CNS\nhttp://www.regione.toscana.it/cartasanitaria" }, { "3BDF18FF8131FE4580590180484944433730307300011B33", "Crescendo C700 + MiFare 4K\nhttp://www.smartcardfocus.com/shop/ilp/id~265/p/index.shtml" }, - { "3BDF18FF8191FE1FC3003138644790ECC273140150829000BA", "Card store authentication and signature keys (JavaCard)\nhttps://ants.gouv.fr/Les-titres/Cartes-Agents/Adhesion/Telechargement-et-support" }, + { "3BDF18FF8191FE1FC3003138644790ECC273140150829000BA", "Card store authentification and signature keys (JavaCard)\nhttps://ants.gouv.fr/Les-titres/Cartes-Agents/Adhesion/Telechargement-et-support" }, { "3BDF18FF8191FE1FC30031B8640000EC0073940000829000FE", "NXP Jcop3 P60 ChipDoc v7b4 (JavaCard)\nhttps://www.javacardos.com/store/products/10029" }, { "3BDF18FF8191FE1FC30031B86404216010739401C005900001", "Dutch Governement Identity Card using physical (eID)\nhttps://nl.wikipedia.org/wiki/Rijkspas" }, { "3BDF18FF8191FE1FC30031B8640C01ECC173940180829000B3", "ebee card\nhttps://www.ebeeoffice.ca/ebee-home/public\nDigital Signature Costa Rica (issued since 09/2019) (eID)\nhttps://www.mifirmadigital.go.cr/" }, @@ -3045,6 +3085,7 @@ const static atr_t AtrTable[] = { { "3BE90000812145454D565F41545220066C", "VISA card, issued by HVB Bank Czech Republic or austrian BankAustria\nhttp://www.hvb.cz" }, { "3BE900008121454D435F5F494E46200665", "MasterCard Credit card issued by SpareBank1 in Norway\nhttp://www.sparebank1.no" }, { "3BE900008121455649535F494E46200678", "VISA card, issued by the Austrian 'Raiffeisen' bank\nhttp://www.raiffeisen.at/\nVisa Card - Maximum - Oyak Bank / Turkey\nVISA, issued by Austrian bank 'Erste Bank'\nVISA card, issued by the Latvian bank 'Latvijas Krajbanka'" }, + { "3BE900008131C345996374691999125610EC", "Compunicate Technologies Inc. (Pay TV)\nhttp://www.cti.com.cn/en/product.aspx?m=20140731165252850216" }, { "3BE900008131FE00FF506572736F53696D54", "German PersoSim (eID)\nhttps://persosim.secunet.com/en/" }, { "3BE900008131FE4543443169A90000000014", "Mastercard credit card, UBS Switzerland (Bank)" }, { "3BE900008131FE45434432690900000000B7", "Swiss UBS MasterCard Creditcard" }, @@ -3090,7 +3131,7 @@ const static atr_t AtrTable[] = { { "3BEE00008131804280318066B0840C016E01830090008E", "MultiApp Cards (Easy 72K Type B and Combi 72K Type B)\nE.SUN Commercial bank debit master card (Bank)\nTaiwan EasyCard (Transport)\nhttps://www.easycard.com.tw/english/index.asp" }, { "3BEE00008131804380318066B1A1110100F683009000", "Optelio/Desineo Cards (D72 FXR1)" }, { "3BEE00008131804380318066B1A11101A0F683009000", "Optelio D72 FXR1 (MD) T=1" }, - { "3BEE00008131FE45003180718665016702A00A8390001B", "IBM JCOP 'Java Card 2.1.1' et 'Open Platform 2.0.1'" }, + { "3BEE00008131FE45003180718665016702A00A8390001B", "IBM JCOP 'Java Card 2.1.1' et 'Open Plaform 2.0.1'" }, { "3BEE00008131FE4580318066409093060F1783019000FD", "Health insurance (HealthCare)" }, { "3BEE00008131FE4580318066409093060F17830F9000F3", "IC card for the National Health Insurance, Taiwan" }, { "3BEF..0040148025434552455357....0101039000", "Electronic Identification Card from the FNMT, the Spanish Official\nCertification Authority (Fabrica Nacional de Moneda y Timbre)\nFNMT-Ceres Siemens Infineon SLE 19" }, @@ -3163,14 +3204,17 @@ const static atr_t AtrTable[] = { { "3BEF00FF8131FE4565631114710528001F000C2024371074", "Debit card (Germany): ec-cash, GeldKarte(EUR), Maestro, Cirrus, ... (Bank)" }, { "3BEF00FF8131FE4565631114710528001F000C3D35371078", "Sparkasse KolnBonn Bank (Bank)\nhttps://www.sparkasse-koelnbonn.de" }, { "3BEF00FF8131FE4565631114710528001F0010142437105C", "Deutsche Kreditbank AG (Bank)\nhttps://www.dkb.de/" }, + { "3BEF00FF8131FE4565631114710528001F00112D4F37100F", "Bank card (Bank)\nhttps://www.commerzbank.de/" }, { "3BEF00FF8131FE4565631114710528001F00113B32371064", "DKB GiroCard (Bank)\nhttps://dkb.de" }, { "3BEF00FF8131FE4565631114710528001F00172846371005", "Sparkasse Zwickau Maestro card (Bank)\nhttps://www.spk-zwickau.de/de/home/privatkunden/girokonto/sparkassencard.html" }, { "3BEF00FF8131FE4565631114710528001F00180F48371023", "SparkassenCard (Bank)\nhttps://sparkasse.de" }, { "3BEF00FF8131FE4565631114710528001F0018242A37106A", "Sparkasse girocard (Bank)" }, { "3BEF00FF8131FE4565631114710528001F00182D1C371055", "Debit card (Germany): ec-cash, GeldKarte(EUR) (Bank)" }, { "3BEF00FF8131FE456563111562025000100A002B2107201E", "EC Card Sparkasse Mittelfranken Sued (Bank)\nhttps://www.spkmfrs.de" }, + { "3BEF00FF8131FE456563111562025000100A002EFC0720C6", "maestro BankCard (Bank)" }, { "3BEF00FF8131FE456563111562025000100A09AC030720B2", "Girocard Sparkasse Darmstadt (Bank)" }, { "3BEF00FF8131FE4565631901620280000F003500420620BB", "Credit card (Germany, Postbank AG): VISA" }, + { "3BEF00FF8131FE4565631D0284025000230509A0D9010182", "Debit card (Bank)" }, { "3BEF00FF8131FE4565631D028402500023180920E7010121", "Deutsche Kreditbank AG (DKB AG) bank card (Bank)\nhttps://www.dkb.de/info/tan-verfahren/chipTAN/" }, { "3BEF00FF8131FE458031C06B49424D204A65745A204D3239", "UBS Internet Card (IBM JetZ M2)" }, { "3BEF00FF8131FE458031E06B042105026B55555555555568", "MasterCard credit card for Mega International Commercial Bank, Taiwan (Bank)\nhttps://www.megabank.com.tw/creditcard/index.asp" }, @@ -3244,6 +3288,7 @@ const static atr_t AtrTable[] = { { "3BF81100008171FE4200544E051900000002A1", "Taiwan EasyCard (Transport)\nhttps://www.easycard.com.tw/english/index.asp" }, { "3BF811200340FF0303030312109000", "Bar Ilan KesefCard from Bezeq (Other)\nhttps://halemo.net/web/www.aurora.co.il/english/c_kesefcard.html" }, { "3BF811200340FFFFFFFFFF12109000", "G&D (STARCOS SV 1.1)" }, + { "3BF813000010000073C84011009000", "Vivid Money Visa Debit (Bank)\nhttps://vivid.money" }, { "3BF81300008131FE15597562696B657934D4", "Yubico Yubikey 4 OTP+CCID" }, { "3BF81300008131FE4546494445534D4F318E", "Fidesmo Card with Dual Interface (JavaCard)\nhttp://shop.fidesmo.com/product/fidesmo-card-dual-interface" }, { "3BF81300008131FE454A434F50763234....", "NXP JCOP v2.4.x (see hist bytes for more info)" }, @@ -3311,7 +3356,7 @@ const static atr_t AtrTable[] = { { "3BFA1300FF813180450031C173C00100009000B1", "OpenPGP" }, { "3BFA1800008031FE45FE654944202F20504B4903", "Estonian Identity Card (EstEID v3.5 (10.2014) cold) (eID)\nhttp://id.ee/" }, { "3BFA1800008131FE4506082A841001876E0805BC", "Dutch Rijkspas (eID)" }, - { "3BFA1800008131FE4506082A841001876E0807BE", "Rijkspas (identification card dutch government employees) (eID)\nhttps://nl.wikipedia.org/wiki/Rijkspas\nDutch government multifunctional smartcard (Other)\nhttps://nl.wikipedia.org/wiki/Rijkspas" }, + { "3BFA1800008131FE4506082A841001876E0807BE", "Rijkspas (identification card dutch government employees) (eID)\nhttps://nl.wikipedia.org/wiki/Rijkspas\nDutch goverment multifunctional smartcard (Other)\nhttps://nl.wikipedia.org/wiki/Rijkspas" }, { "3BFA1800008131FE45060860841001876F0602FE", "Card used by the Dutch health insurers to give medical personell access to patient insurance information" }, { "3BFA1800008131FE454A33413034305632343184", "NXP J3A 40K\nJava Card v2.2.2 - Global Platform v2.2.1\nDual-interface functionality (features 1K Mifare emulation)" }, { "3BFA1800008131FE454A33413038315632343189", "NXP JCOP CJ3A081\nhttp://www.usmartcards.com/media/downloads/492/NXP%20P5CX012%2002X%2040%2073%2080%20144%20%20%202011.pdf" }, @@ -3339,6 +3384,7 @@ const static atr_t AtrTable[] = { { "3BFB1300008131FE456368617269736D6174657884", "Charismathics smart card JCOP and Qualified electronic signature CHJCOP-xxx (PKI)\nhttps://www.stampit.org/en/page/808" }, { "3BFB1300FF10800031C164086032060F9000", "Stripe Issuing Card (Bank)" }, { "3BFB1300FF10800031C164086032100F9000", "Varo (Bank)" }, + { "3BFB1300FF10800031C164089862210F9000", "Visa Debit (Bank)" }, { "3BFB1300FF813180755A43352E3520524556204763", "ZeitControl BasicCard 5.5" }, { "3BFB1300FF813180755A43352E3620524556204D6A", "ZeitControl BasicCard ZC5.6 user-programmable smart card\nhttp://www.basiccard.com/index.html?overview.htm" }, { "3BFB1300FF813180755A43362E3520524556204364", "ZeitControl BasicCard 6.5, multiapplication with 30 kByte EEPROM" }, @@ -3377,6 +3423,7 @@ const static atr_t AtrTable[] = { { "3BFD1300008131FE4541373030364347203234325231D6", "YubiKey NEO (token)" }, { "3BFD1300008131FE454A434F50323176323331474454E1", "National Health Insurance Card, Taiwan" }, { "3BFD1300008131FE45543D314A323133364B56323331DC", "ic Card (JavaCard)" }, + { "3BFD1300FF10000031C173C8400052A1C5009000", "IBKR Prepaid MasterCard, Issued by Peoples Trust Company (Bank)\nhttps://www.interactivebrokers.com/en/index.php?f=26451" }, { "3BFD1800008031FE45003180718E6452D904008190005B", "Oberthur Card Systems, authentIC" }, { "3BFD1800008031FE4553434536302D43443038312D46C4", "Panama Electronic Signature (JavaCard)" }, { "3BFD1800008031FE45736674652063643134342D6E66D8", "SmartCafe Expert 3.2 144K Dual is a contact and contactless technology Java card from G&D with 144K on-board EEPROM for application and data storage. Certified to FIPS 140-2 Level 3 and Common Criteria EAL 5+. Supports specifications ISO 14443A T=CL and ISO 7816 T=1/0. (PKI)\nhttp://www.smartcardfocus.us/shop/ilp/id~523/smartcafe-expert-3-2-144k-dual/p/index.shtml" }, @@ -3437,6 +3484,8 @@ const static atr_t AtrTable[] = { { "3BFF1100008171404200002101314252000[05]63........9000.*", "Smart Card 'The Smart Way to Login'\nUsed on Acer TravelMate to secure boot" }, { "3BFF11000240648069A2070103570000FF0083009000", "Gemplus GemXpresso" }, { "3BFF1100FF8131FE9580F9D2760000255444010083000000A0", "GiroCard Haspa Hamburger Sparkasse (Bank)\nhttps://www.haspa.de/privatkunden/ihr-online-banking/unser-angebot/haspa-digital-services-96198/" }, + { "3BFF13000010003101F1564011001900000000000000", "BVG Guthabenkarte (Prepaid Payment Card for Berlin/Brandenburg Public Transport) (Transport)\nhttps://www.bvg.de/de/service-und-kontakt/guthabenkarte" }, + { "3BFF13000010003101F1564011001D00000000000000", "albo (Bank)\nhttps://www.albo.mx/" }, { "3BFF1300008131FE450031B9640404ECC17394018082900052", "AKD kID (eID)\nhttps://www.id.hr" }, { "3BFF1300008131FE450031B9640444ECC17394018082900012", "Croation personal ID card (eID)\nhttp://eid.hr/" }, { "3BFF1300008131FE4543443269A94100002020202020200053", "Visa credit card (Viseca Card Services SA, Switzerland) (Bank)\nhttps://www.viseca.ch/privatkunden/kreditkarten\nVisa credit card, UBS Switzerland (Bank)" }, @@ -3444,11 +3493,12 @@ const static atr_t AtrTable[] = { { "3BFF1300008131FE454F574F4B31302D4A................", "OWOK (One Web, One Key) login card\nhttp://www.reiner-sct.com/owok/\nReiner SCT loginCard\nhttps://cardlogin.reiner-sct.com/" }, { "3BFF1300008131FE4D8025A00000005657444B3333300600D2", "Datakey DCOS model 330 (DKCCOS 6.0 token)" }, { "3BFF1300FF10000031C173C821106441443533079000", "BRADESCO-CONTA SALARIO (Bank)" }, + { "3BFF1300FF10000031C173C8211064414D3130079000", "Tangerine MasterCard (Bank)\nhttps://www.tangerine.ca/en/products/spending/creditcard/money-back/" }, { "3BFF1300FF10000031C173C8211064414D3330079000", "VISA card issued by ING-DiBa AG (Germany) (Bank)" }, { "3BFF1300FF10000031C173C8211064414D3337079000", "VISA Credit Card (Postbank), Germany (Bank)" }, - { "3BFF1300FF10000031C173C8211064414D3341079000", "BBVA debit card Uruguay. MIFRE Plus compatible. (Bank)" }, + { "3BFF1300FF10000031C173C8211064414D3341079000", "BBVA debit card Uruguay. MIFRE Plus compatible. (Bank)\nScotiabank Passport Visa Infinite credit card (Bank)\nhttps://www.scotiabank.com/ca/en/personal/credit-cards/visa/passport-infinite-card.html" }, { "3BFF1300FF10000031C173C8211064414D3347079000", "Chase Visa Debit Card (Bank)\nhttps://www.chase.com/bankinghelp" }, - { "3BFF1300FF10000031C173C8211064414D3348079000", "BBVA blue VISA Debit Card (Bank)\nhttps://www.bbva.es/en/personas/productos/tarjetas/tarjeta-joven-ahora.html" }, + { "3BFF1300FF10000031C173C8211064414D3348079000", "BBVA blue VISA Debit Card (Bank)\nhttps://www.bbva.es/en/personas/productos/tarjetas/tarjeta-joven-ahora.html\nDesjardins Bonus Visa credit card (Bank)\nhttps://www.desjardins.com/ca/personal/loans-credit/credit-cards/bonus-visa/index.jsp" }, { "3BFF1300FF10808031E06B04310502AF555555555555", "USAA EMV Visa Debit Card (Bank)" }, { "3BFF1300FF10808031E06B071405028A555555555555", "Tangerine Debit Card (Bank)\nhttps://www.tangerine.ca" }, { "3BFF1300FF10808031E06B08240502B5555555555555", "Tangerine Canada Interac debit card (Bank)\nhttps://www.tangerine.ca/" }, @@ -3468,7 +3518,7 @@ const static atr_t AtrTable[] = { { "3BFF1800008131FE45006B04050100012101434E5310318059", "CNS - Carta Nazionale dei Servizi (Italia)\nPA emittente: Regione Autonoma della Sardegna\nCarta del Servizio Sanitario Regionale - Emilia Romagna" }, { "3BFF1800008131FE45006B05051017012101434E531031805E", "Regional Card - Regione Liguria, Veneto - Italy (eID)\nTessera Sanitaria - Carta Regionale dei Servizi" }, { "3BFF1800008131FE45006B05052000012101434E5310318079", "health card (HealthCare)\nhttps://tscns.regione.sardegna.it/" }, - { "3BFF1800008131FE45006B11050700011101434E531131807B", "Italian National Fire Corps -special identification card (eID)" }, + { "3BFF1800008131FE45006B11050700011101434E531131807B", "Italian National Fire Corps -special indentification card (eID)" }, { "3BFF1800008131FE45006B11050700012101434E531031804A", "Oberthur ID-One Cosmo V7-n it's a java card 2.2.2\nIzenpe Certificado Ciudadano (eID)\nhttps://www.izenpe.eus/informacion/certificado-ciudadano/s15-content/es/" }, { "3BFF1800008131FE4D8025A00000005657444B3430300600DD", "DataKey 400 (DK400)" }, { "3BFF1800008131FE55006B02090403010101434E5310318065", "Italian Chambers of Commerce CNS (PKI)\nhttp://www.card.infocamere.it/infocard/pub/" }, From 1d05eebd28c01576801a4691a07e73729362188a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Fri, 14 Jan 2022 21:08:14 +0100 Subject: [PATCH 72/73] emoji update --- client/emojis_scrap_github.py | 53 ++++++++++++++++++++++++----------- client/src/emojis.h | 47 +++---------------------------- 2 files changed, 41 insertions(+), 59 deletions(-) diff --git a/client/emojis_scrap_github.py b/client/emojis_scrap_github.py index 1d808e13a..9eb31a171 100755 --- a/client/emojis_scrap_github.py +++ b/client/emojis_scrap_github.py @@ -8,16 +8,32 @@ import json EMOJI_JSON_URL = 'https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json' -def print_emoji(emoji_json): +def string_emoji(emoji_json): for alias in emoji_json['aliases']: - print(' {{":{0}:", "{1}"}}, // {2}'.format(alias, + return(' {{":{0}:", "{1}"}}, // {2}\n'.format(alias, + ''.join('\\x{:02x}'.format(b) for b in emoji_json['emoji'].encode('utf8')), + emoji_json['emoji'])) -''.join('\\x{:02x}'.format(b) for b in emoji_json['emoji'].encode('utf8')), - -emoji_json['emoji'])) - -print( -"""#ifndef EMOJIS_H__ +C_HEADER="""//----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/github/gemoji +// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// See LICENSE.txt for the text of the license. +//----------------------------------------------------------------------------- +// *DO NOT EDIT MANUALLY* +// Autogenerated with emojis_scrap_github.py +//----------------------------------------------------------------------------- +#ifndef EMOJIS_H__ #define EMOJIS_H__ typedef struct emoji_s { @@ -26,13 +42,18 @@ typedef struct emoji_s { } emoji_t; // emoji_t array are expected to be NULL terminated -static emoji_t EmojiTable[] = {""") +static emoji_t EmojiTable[] = { +""" -with urlopen(EMOJI_JSON_URL) as conn: - emojis_json = json.loads(conn.read().decode('utf-8')) - for emoji_json in emojis_json: - print_emoji(emoji_json) - -print(""" {NULL, NULL} +C_FOOTER=""" {NULL, NULL} }; -#endif""") +#endif +""" + +with open('src/emojis.h','w') as femoji: + with urlopen(EMOJI_JSON_URL) as conn: + emojis_json = json.loads(conn.read().decode('utf-8')) + femoji.write(C_HEADER) + for emoji_json in emojis_json: + femoji.write(string_emoji(emoji_json)) + femoji.write(C_FOOTER) diff --git a/client/src/emojis.h b/client/src/emojis.h index 5f8dde675..d6c464441 100644 --- a/client/src/emojis.h +++ b/client/src/emojis.h @@ -1,4 +1,5 @@ //----------------------------------------------------------------------------- +// Borrowed initially from https://github.com/github/gemoji // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. // // This program is free software: you can redistribute it and/or modify @@ -13,6 +14,9 @@ // // See LICENSE.txt for the text of the license. //----------------------------------------------------------------------------- +// *DO NOT EDIT MANUALLY* +// Autogenerated with emojis_scrap_github.py +//----------------------------------------------------------------------------- #ifndef EMOJIS_H__ #define EMOJIS_H__ @@ -28,7 +32,6 @@ static emoji_t EmojiTable[] = { {":smile:", "\xf0\x9f\x98\x84"}, // ๐Ÿ˜„ {":grin:", "\xf0\x9f\x98\x81"}, // ๐Ÿ˜ {":laughing:", "\xf0\x9f\x98\x86"}, // ๐Ÿ˜† - {":satisfied:", "\xf0\x9f\x98\x86"}, // ๐Ÿ˜† {":sweat_smile:", "\xf0\x9f\x98\x85"}, // ๐Ÿ˜… {":rofl:", "\xf0\x9f\xa4\xa3"}, // ๐Ÿคฃ {":joy:", "\xf0\x9f\x98\x82"}, // ๐Ÿ˜‚ @@ -117,7 +120,6 @@ static emoji_t EmojiTable[] = { {":yawning_face:", "\xf0\x9f\xa5\xb1"}, // ๐Ÿฅฑ {":triumph:", "\xf0\x9f\x98\xa4"}, // ๐Ÿ˜ค {":rage:", "\xf0\x9f\x98\xa1"}, // ๐Ÿ˜ก - {":pout:", "\xf0\x9f\x98\xa1"}, // ๐Ÿ˜ก {":angry:", "\xf0\x9f\x98\xa0"}, // ๐Ÿ˜  {":cursing_face:", "\xf0\x9f\xa4\xac"}, // ๐Ÿคฌ {":smiling_imp:", "\xf0\x9f\x98\x88"}, // ๐Ÿ˜ˆ @@ -125,8 +127,6 @@ static emoji_t EmojiTable[] = { {":skull:", "\xf0\x9f\x92\x80"}, // ๐Ÿ’€ {":skull_and_crossbones:", "\xe2\x98\xa0\xef\xb8\x8f"}, // โ˜ ๏ธ {":hankey:", "\xf0\x9f\x92\xa9"}, // ๐Ÿ’ฉ - {":poop:", "\xf0\x9f\x92\xa9"}, // ๐Ÿ’ฉ - {":shit:", "\xf0\x9f\x92\xa9"}, // ๐Ÿ’ฉ {":clown_face:", "\xf0\x9f\xa4\xa1"}, // ๐Ÿคก {":japanese_ogre:", "\xf0\x9f\x91\xb9"}, // ๐Ÿ‘น {":japanese_goblin:", "\xf0\x9f\x91\xba"}, // ๐Ÿ‘บ @@ -172,7 +172,6 @@ static emoji_t EmojiTable[] = { {":100:", "\xf0\x9f\x92\xaf"}, // ๐Ÿ’ฏ {":anger:", "\xf0\x9f\x92\xa2"}, // ๐Ÿ’ข {":boom:", "\xf0\x9f\x92\xa5"}, // ๐Ÿ’ฅ - {":collision:", "\xf0\x9f\x92\xa5"}, // ๐Ÿ’ฅ {":dizzy:", "\xf0\x9f\x92\xab"}, // ๐Ÿ’ซ {":sweat_drops:", "\xf0\x9f\x92\xa6"}, // ๐Ÿ’ฆ {":dash:", "\xf0\x9f\x92\xa8"}, // ๐Ÿ’จ @@ -188,7 +187,6 @@ static emoji_t EmojiTable[] = { {":raised_back_of_hand:", "\xf0\x9f\xa4\x9a"}, // ๐Ÿคš {":raised_hand_with_fingers_splayed:", "\xf0\x9f\x96\x90\xef\xb8\x8f"}, // ๐Ÿ–๏ธ {":hand:", "\xe2\x9c\x8b"}, // โœ‹ - {":raised_hand:", "\xe2\x9c\x8b"}, // โœ‹ {":vulcan_salute:", "\xf0\x9f\x96\x96"}, // ๐Ÿ–– {":ok_hand:", "\xf0\x9f\x91\x8c"}, // ๐Ÿ‘Œ {":pinched_fingers:", "\xf0\x9f\xa4\x8c"}, // ๐ŸคŒ @@ -202,18 +200,12 @@ static emoji_t EmojiTable[] = { {":point_right:", "\xf0\x9f\x91\x89"}, // ๐Ÿ‘‰ {":point_up_2:", "\xf0\x9f\x91\x86"}, // ๐Ÿ‘† {":middle_finger:", "\xf0\x9f\x96\x95"}, // ๐Ÿ–• - {":fu:", "\xf0\x9f\x96\x95"}, // ๐Ÿ–• {":point_down:", "\xf0\x9f\x91\x87"}, // ๐Ÿ‘‡ {":point_up:", "\xe2\x98\x9d\xef\xb8\x8f"}, // โ˜๏ธ {":+1:", "\xf0\x9f\x91\x8d"}, // ๐Ÿ‘ - {":thumbsup:", "\xf0\x9f\x91\x8d"}, // ๐Ÿ‘ {":-1:", "\xf0\x9f\x91\x8e"}, // ๐Ÿ‘Ž - {":thumbsdown:", "\xf0\x9f\x91\x8e"}, // ๐Ÿ‘Ž {":fist_raised:", "\xe2\x9c\x8a"}, // โœŠ - {":fist:", "\xe2\x9c\x8a"}, // โœŠ {":fist_oncoming:", "\xf0\x9f\x91\x8a"}, // ๐Ÿ‘Š - {":facepunch:", "\xf0\x9f\x91\x8a"}, // ๐Ÿ‘Š - {":punch:", "\xf0\x9f\x91\x8a"}, // ๐Ÿ‘Š {":fist_left:", "\xf0\x9f\xa4\x9b"}, // ๐Ÿค› {":fist_right:", "\xf0\x9f\xa4\x9c"}, // ๐Ÿคœ {":clap:", "\xf0\x9f\x91\x8f"}, // ๐Ÿ‘ @@ -266,7 +258,6 @@ static emoji_t EmojiTable[] = { {":bald_woman:", "\xf0\x9f\x91\xa9\xe2\x80\x8d\xf0\x9f\xa6\xb2"}, // ๐Ÿ‘ฉโ€๐Ÿฆฒ {":person_bald:", "\xf0\x9f\xa7\x91\xe2\x80\x8d\xf0\x9f\xa6\xb2"}, // ๐Ÿง‘โ€๐Ÿฆฒ {":blond_haired_woman:", "\xf0\x9f\x91\xb1\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ‘ฑโ€โ™€๏ธ - {":blonde_woman:", "\xf0\x9f\x91\xb1\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ‘ฑโ€โ™€๏ธ {":blond_haired_man:", "\xf0\x9f\x91\xb1\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ‘ฑโ€โ™‚๏ธ {":older_adult:", "\xf0\x9f\xa7\x93"}, // ๐Ÿง“ {":older_man:", "\xf0\x9f\x91\xb4"}, // ๐Ÿ‘ด @@ -279,18 +270,13 @@ static emoji_t EmojiTable[] = { {":pouting_woman:", "\xf0\x9f\x99\x8e\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ™Žโ€โ™€๏ธ {":no_good:", "\xf0\x9f\x99\x85"}, // ๐Ÿ™… {":no_good_man:", "\xf0\x9f\x99\x85\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ™…โ€โ™‚๏ธ - {":ng_man:", "\xf0\x9f\x99\x85\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ™…โ€โ™‚๏ธ {":no_good_woman:", "\xf0\x9f\x99\x85\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ™…โ€โ™€๏ธ - {":ng_woman:", "\xf0\x9f\x99\x85\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ™…โ€โ™€๏ธ {":ok_person:", "\xf0\x9f\x99\x86"}, // ๐Ÿ™† {":ok_man:", "\xf0\x9f\x99\x86\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ™†โ€โ™‚๏ธ {":ok_woman:", "\xf0\x9f\x99\x86\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ™†โ€โ™€๏ธ {":tipping_hand_person:", "\xf0\x9f\x92\x81"}, // ๐Ÿ’ - {":information_desk_person:", "\xf0\x9f\x92\x81"}, // ๐Ÿ’ {":tipping_hand_man:", "\xf0\x9f\x92\x81\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ’โ€โ™‚๏ธ - {":sassy_man:", "\xf0\x9f\x92\x81\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ’โ€โ™‚๏ธ {":tipping_hand_woman:", "\xf0\x9f\x92\x81\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ’โ€โ™€๏ธ - {":sassy_woman:", "\xf0\x9f\x92\x81\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ’โ€โ™€๏ธ {":raising_hand:", "\xf0\x9f\x99\x8b"}, // ๐Ÿ™‹ {":raising_hand_man:", "\xf0\x9f\x99\x8b\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ™‹โ€โ™‚๏ธ {":raising_hand_woman:", "\xf0\x9f\x99\x8b\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ™‹โ€โ™€๏ธ @@ -355,7 +341,6 @@ static emoji_t EmojiTable[] = { {":man_firefighter:", "\xf0\x9f\x91\xa8\xe2\x80\x8d\xf0\x9f\x9a\x92"}, // ๐Ÿ‘จโ€๐Ÿš’ {":woman_firefighter:", "\xf0\x9f\x91\xa9\xe2\x80\x8d\xf0\x9f\x9a\x92"}, // ๐Ÿ‘ฉโ€๐Ÿš’ {":police_officer:", "\xf0\x9f\x91\xae"}, // ๐Ÿ‘ฎ - {":cop:", "\xf0\x9f\x91\xae"}, // ๐Ÿ‘ฎ {":policeman:", "\xf0\x9f\x91\xae\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ‘ฎโ€โ™‚๏ธ {":policewoman:", "\xf0\x9f\x91\xae\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ‘ฎโ€โ™€๏ธ {":detective:", "\xf0\x9f\x95\xb5\xef\xb8\x8f"}, // ๐Ÿ•ต๏ธ @@ -381,7 +366,6 @@ static emoji_t EmojiTable[] = { {":person_with_veil:", "\xf0\x9f\x91\xb0"}, // ๐Ÿ‘ฐ {":man_with_veil:", "\xf0\x9f\x91\xb0\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ‘ฐโ€โ™‚๏ธ {":woman_with_veil:", "\xf0\x9f\x91\xb0\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ‘ฐโ€โ™€๏ธ - {":bride_with_veil:", "\xf0\x9f\x91\xb0\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ‘ฐโ€โ™€๏ธ {":pregnant_woman:", "\xf0\x9f\xa4\xb0"}, // ๐Ÿคฐ {":breast_feeding:", "\xf0\x9f\xa4\xb1"}, // ๐Ÿคฑ {":woman_feeding_baby:", "\xf0\x9f\x91\xa9\xe2\x80\x8d\xf0\x9f\x8d\xbc"}, // ๐Ÿ‘ฉโ€๐Ÿผ @@ -443,11 +427,9 @@ static emoji_t EmojiTable[] = { {":man_in_manual_wheelchair:", "\xf0\x9f\x91\xa8\xe2\x80\x8d\xf0\x9f\xa6\xbd"}, // ๐Ÿ‘จโ€๐Ÿฆฝ {":woman_in_manual_wheelchair:", "\xf0\x9f\x91\xa9\xe2\x80\x8d\xf0\x9f\xa6\xbd"}, // ๐Ÿ‘ฉโ€๐Ÿฆฝ {":runner:", "\xf0\x9f\x8f\x83"}, // ๐Ÿƒ - {":running:", "\xf0\x9f\x8f\x83"}, // ๐Ÿƒ {":running_man:", "\xf0\x9f\x8f\x83\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿƒโ€โ™‚๏ธ {":running_woman:", "\xf0\x9f\x8f\x83\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿƒโ€โ™€๏ธ {":woman_dancing:", "\xf0\x9f\x92\x83"}, // ๐Ÿ’ƒ - {":dancer:", "\xf0\x9f\x92\x83"}, // ๐Ÿ’ƒ {":man_dancing:", "\xf0\x9f\x95\xba"}, // ๐Ÿ•บ {":business_suit_levitating:", "\xf0\x9f\x95\xb4\xef\xb8\x8f"}, // ๐Ÿ•ด๏ธ {":dancers:", "\xf0\x9f\x91\xaf"}, // ๐Ÿ‘ฏ @@ -477,9 +459,7 @@ static emoji_t EmojiTable[] = { {":swimming_woman:", "\xf0\x9f\x8f\x8a\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐ŸŠโ€โ™€๏ธ {":bouncing_ball_person:", "\xe2\x9b\xb9\xef\xb8\x8f"}, // โ›น๏ธ {":bouncing_ball_man:", "\xe2\x9b\xb9\xef\xb8\x8f\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // โ›น๏ธโ€โ™‚๏ธ - {":basketball_man:", "\xe2\x9b\xb9\xef\xb8\x8f\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // โ›น๏ธโ€โ™‚๏ธ {":bouncing_ball_woman:", "\xe2\x9b\xb9\xef\xb8\x8f\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // โ›น๏ธโ€โ™€๏ธ - {":basketball_woman:", "\xe2\x9b\xb9\xef\xb8\x8f\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // โ›น๏ธโ€โ™€๏ธ {":weight_lifting:", "\xf0\x9f\x8f\x8b\xef\xb8\x8f"}, // ๐Ÿ‹๏ธ {":weight_lifting_man:", "\xf0\x9f\x8f\x8b\xef\xb8\x8f\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f"}, // ๐Ÿ‹๏ธโ€โ™‚๏ธ {":weight_lifting_woman:", "\xf0\x9f\x8f\x8b\xef\xb8\x8f\xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f"}, // ๐Ÿ‹๏ธโ€โ™€๏ธ @@ -616,7 +596,6 @@ static emoji_t EmojiTable[] = { {":kangaroo:", "\xf0\x9f\xa6\x98"}, // ๐Ÿฆ˜ {":badger:", "\xf0\x9f\xa6\xa1"}, // ๐Ÿฆก {":feet:", "\xf0\x9f\x90\xbe"}, // ๐Ÿพ - {":paw_prints:", "\xf0\x9f\x90\xbe"}, // ๐Ÿพ {":turkey:", "\xf0\x9f\xa6\x83"}, // ๐Ÿฆƒ {":chicken:", "\xf0\x9f\x90\x94"}, // ๐Ÿ” {":rooster:", "\xf0\x9f\x90\x93"}, // ๐Ÿ“ @@ -647,7 +626,6 @@ static emoji_t EmojiTable[] = { {":whale:", "\xf0\x9f\x90\xb3"}, // ๐Ÿณ {":whale2:", "\xf0\x9f\x90\x8b"}, // ๐Ÿ‹ {":dolphin:", "\xf0\x9f\x90\xac"}, // ๐Ÿฌ - {":flipper:", "\xf0\x9f\x90\xac"}, // ๐Ÿฌ {":seal:", "\xf0\x9f\xa6\xad"}, // ๐Ÿฆญ {":fish:", "\xf0\x9f\x90\x9f"}, // ๐ŸŸ {":tropical_fish:", "\xf0\x9f\x90\xa0"}, // ๐Ÿ  @@ -660,7 +638,6 @@ static emoji_t EmojiTable[] = { {":bug:", "\xf0\x9f\x90\x9b"}, // ๐Ÿ› {":ant:", "\xf0\x9f\x90\x9c"}, // ๐Ÿœ {":bee:", "\xf0\x9f\x90\x9d"}, // ๐Ÿ - {":honeybee:", "\xf0\x9f\x90\x9d"}, // ๐Ÿ {":beetle:", "\xf0\x9f\xaa\xb2"}, // ๐Ÿชฒ {":lady_beetle:", "\xf0\x9f\x90\x9e"}, // ๐Ÿž {":cricket:", "\xf0\x9f\xa6\x97"}, // ๐Ÿฆ— @@ -699,8 +676,6 @@ static emoji_t EmojiTable[] = { {":melon:", "\xf0\x9f\x8d\x88"}, // ๐Ÿˆ {":watermelon:", "\xf0\x9f\x8d\x89"}, // ๐Ÿ‰ {":tangerine:", "\xf0\x9f\x8d\x8a"}, // ๐ŸŠ - {":orange:", "\xf0\x9f\x8d\x8a"}, // ๐ŸŠ - {":mandarin:", "\xf0\x9f\x8d\x8a"}, // ๐ŸŠ {":lemon:", "\xf0\x9f\x8d\x8b"}, // ๐Ÿ‹ {":banana:", "\xf0\x9f\x8d\x8c"}, // ๐ŸŒ {":pineapple:", "\xf0\x9f\x8d\x8d"}, // ๐Ÿ @@ -825,7 +800,6 @@ static emoji_t EmojiTable[] = { {":fork_and_knife:", "\xf0\x9f\x8d\xb4"}, // ๐Ÿด {":spoon:", "\xf0\x9f\xa5\x84"}, // ๐Ÿฅ„ {":hocho:", "\xf0\x9f\x94\xaa"}, // ๐Ÿ”ช - {":knife:", "\xf0\x9f\x94\xaa"}, // ๐Ÿ”ช {":amphora:", "\xf0\x9f\x8f\xba"}, // ๐Ÿบ {":earth_africa:", "\xf0\x9f\x8c\x8d"}, // ๐ŸŒ {":earth_americas:", "\xf0\x9f\x8c\x8e"}, // ๐ŸŒŽ @@ -915,7 +889,6 @@ static emoji_t EmojiTable[] = { {":taxi:", "\xf0\x9f\x9a\x95"}, // ๐Ÿš• {":oncoming_taxi:", "\xf0\x9f\x9a\x96"}, // ๐Ÿš– {":car:", "\xf0\x9f\x9a\x97"}, // ๐Ÿš— - {":red_car:", "\xf0\x9f\x9a\x97"}, // ๐Ÿš— {":oncoming_automobile:", "\xf0\x9f\x9a\x98"}, // ๐Ÿš˜ {":blue_car:", "\xf0\x9f\x9a\x99"}, // ๐Ÿš™ {":pickup_truck:", "\xf0\x9f\x9b\xbb"}, // ๐Ÿ›ป @@ -944,7 +917,6 @@ static emoji_t EmojiTable[] = { {":construction:", "\xf0\x9f\x9a\xa7"}, // ๐Ÿšง {":anchor:", "\xe2\x9a\x93"}, // โš“ {":boat:", "\xe2\x9b\xb5"}, // โ›ต - {":sailboat:", "\xe2\x9b\xb5"}, // โ›ต {":canoe:", "\xf0\x9f\x9b\xb6"}, // ๐Ÿ›ถ {":speedboat:", "\xf0\x9f\x9a\xa4"}, // ๐Ÿšค {":passenger_ship:", "\xf0\x9f\x9b\xb3\xef\xb8\x8f"}, // ๐Ÿ›ณ๏ธ @@ -1001,7 +973,6 @@ static emoji_t EmojiTable[] = { {":waxing_crescent_moon:", "\xf0\x9f\x8c\x92"}, // ๐ŸŒ’ {":first_quarter_moon:", "\xf0\x9f\x8c\x93"}, // ๐ŸŒ“ {":moon:", "\xf0\x9f\x8c\x94"}, // ๐ŸŒ” - {":waxing_gibbous_moon:", "\xf0\x9f\x8c\x94"}, // ๐ŸŒ” {":full_moon:", "\xf0\x9f\x8c\x95"}, // ๐ŸŒ• {":waning_gibbous_moon:", "\xf0\x9f\x8c\x96"}, // ๐ŸŒ– {":last_quarter_moon:", "\xf0\x9f\x8c\x97"}, // ๐ŸŒ— @@ -1136,7 +1107,6 @@ static emoji_t EmojiTable[] = { {":safety_vest:", "\xf0\x9f\xa6\xba"}, // ๐Ÿฆบ {":necktie:", "\xf0\x9f\x91\x94"}, // ๐Ÿ‘” {":shirt:", "\xf0\x9f\x91\x95"}, // ๐Ÿ‘• - {":tshirt:", "\xf0\x9f\x91\x95"}, // ๐Ÿ‘• {":jeans:", "\xf0\x9f\x91\x96"}, // ๐Ÿ‘– {":scarf:", "\xf0\x9f\xa7\xa3"}, // ๐Ÿงฃ {":gloves:", "\xf0\x9f\xa7\xa4"}, // ๐Ÿงค @@ -1157,7 +1127,6 @@ static emoji_t EmojiTable[] = { {":school_satchel:", "\xf0\x9f\x8e\x92"}, // ๐ŸŽ’ {":thong_sandal:", "\xf0\x9f\xa9\xb4"}, // ๐Ÿฉด {":mans_shoe:", "\xf0\x9f\x91\x9e"}, // ๐Ÿ‘ž - {":shoe:", "\xf0\x9f\x91\x9e"}, // ๐Ÿ‘ž {":athletic_shoe:", "\xf0\x9f\x91\x9f"}, // ๐Ÿ‘Ÿ {":hiking_boot:", "\xf0\x9f\xa5\xbe"}, // ๐Ÿฅพ {":flat_shoe:", "\xf0\x9f\xa5\xbf"}, // ๐Ÿฅฟ @@ -1206,7 +1175,6 @@ static emoji_t EmojiTable[] = { {":iphone:", "\xf0\x9f\x93\xb1"}, // ๐Ÿ“ฑ {":calling:", "\xf0\x9f\x93\xb2"}, // ๐Ÿ“ฒ {":phone:", "\xe2\x98\x8e\xef\xb8\x8f"}, // โ˜Ž๏ธ - {":telephone:", "\xe2\x98\x8e\xef\xb8\x8f"}, // โ˜Ž๏ธ {":telephone_receiver:", "\xf0\x9f\x93\x9e"}, // ๐Ÿ“ž {":pager:", "\xf0\x9f\x93\x9f"}, // ๐Ÿ“Ÿ {":fax:", "\xf0\x9f\x93\xa0"}, // ๐Ÿ“  @@ -1238,12 +1206,10 @@ static emoji_t EmojiTable[] = { {":bulb:", "\xf0\x9f\x92\xa1"}, // ๐Ÿ’ก {":flashlight:", "\xf0\x9f\x94\xa6"}, // ๐Ÿ”ฆ {":izakaya_lantern:", "\xf0\x9f\x8f\xae"}, // ๐Ÿฎ - {":lantern:", "\xf0\x9f\x8f\xae"}, // ๐Ÿฎ {":diya_lamp:", "\xf0\x9f\xaa\x94"}, // ๐Ÿช” {":notebook_with_decorative_cover:", "\xf0\x9f\x93\x94"}, // ๐Ÿ“” {":closed_book:", "\xf0\x9f\x93\x95"}, // ๐Ÿ“• {":book:", "\xf0\x9f\x93\x96"}, // ๐Ÿ“– - {":open_book:", "\xf0\x9f\x93\x96"}, // ๐Ÿ“– {":green_book:", "\xf0\x9f\x93\x97"}, // ๐Ÿ“— {":blue_book:", "\xf0\x9f\x93\x98"}, // ๐Ÿ“˜ {":orange_book:", "\xf0\x9f\x93\x99"}, // ๐Ÿ“™ @@ -1270,7 +1236,6 @@ static emoji_t EmojiTable[] = { {":chart:", "\xf0\x9f\x92\xb9"}, // ๐Ÿ’น {":envelope:", "\xe2\x9c\x89\xef\xb8\x8f"}, // โœ‰๏ธ {":email:", "\xf0\x9f\x93\xa7"}, // ๐Ÿ“ง - {":e-mail:", "\xf0\x9f\x93\xa7"}, // ๐Ÿ“ง {":incoming_envelope:", "\xf0\x9f\x93\xa8"}, // ๐Ÿ“จ {":envelope_with_arrow:", "\xf0\x9f\x93\xa9"}, // ๐Ÿ“ฉ {":outbox_tray:", "\xf0\x9f\x93\xa4"}, // ๐Ÿ“ค @@ -1289,7 +1254,6 @@ static emoji_t EmojiTable[] = { {":paintbrush:", "\xf0\x9f\x96\x8c\xef\xb8\x8f"}, // ๐Ÿ–Œ๏ธ {":crayon:", "\xf0\x9f\x96\x8d\xef\xb8\x8f"}, // ๐Ÿ–๏ธ {":memo:", "\xf0\x9f\x93\x9d"}, // ๐Ÿ“ - {":pencil:", "\xf0\x9f\x93\x9d"}, // ๐Ÿ“ {":briefcase:", "\xf0\x9f\x92\xbc"}, // ๐Ÿ’ผ {":file_folder:", "\xf0\x9f\x93\x81"}, // ๐Ÿ“ {":open_file_folder:", "\xf0\x9f\x93\x82"}, // ๐Ÿ“‚ @@ -1496,7 +1460,6 @@ static emoji_t EmojiTable[] = { {":grey_question:", "\xe2\x9d\x94"}, // โ” {":grey_exclamation:", "\xe2\x9d\x95"}, // โ• {":exclamation:", "\xe2\x9d\x97"}, // โ— - {":heavy_exclamation_mark:", "\xe2\x9d\x97"}, // โ— {":wavy_dash:", "\xe3\x80\xb0\xef\xb8\x8f"}, // ใ€ฐ๏ธ {":currency_exchange:", "\xf0\x9f\x92\xb1"}, // ๐Ÿ’ฑ {":heavy_dollar_sign:", "\xf0\x9f\x92\xb2"}, // ๐Ÿ’ฒ @@ -1689,7 +1652,6 @@ static emoji_t EmojiTable[] = { {":es:", "\xf0\x9f\x87\xaa\xf0\x9f\x87\xb8"}, // ๐Ÿ‡ช๐Ÿ‡ธ {":ethiopia:", "\xf0\x9f\x87\xaa\xf0\x9f\x87\xb9"}, // ๐Ÿ‡ช๐Ÿ‡น {":eu:", "\xf0\x9f\x87\xaa\xf0\x9f\x87\xba"}, // ๐Ÿ‡ช๐Ÿ‡บ - {":european_union:", "\xf0\x9f\x87\xaa\xf0\x9f\x87\xba"}, // ๐Ÿ‡ช๐Ÿ‡บ {":finland:", "\xf0\x9f\x87\xab\xf0\x9f\x87\xae"}, // ๐Ÿ‡ซ๐Ÿ‡ฎ {":fiji:", "\xf0\x9f\x87\xab\xf0\x9f\x87\xaf"}, // ๐Ÿ‡ซ๐Ÿ‡ฏ {":falkland_islands:", "\xf0\x9f\x87\xab\xf0\x9f\x87\xb0"}, // ๐Ÿ‡ซ๐Ÿ‡ฐ @@ -1698,7 +1660,6 @@ static emoji_t EmojiTable[] = { {":fr:", "\xf0\x9f\x87\xab\xf0\x9f\x87\xb7"}, // ๐Ÿ‡ซ๐Ÿ‡ท {":gabon:", "\xf0\x9f\x87\xac\xf0\x9f\x87\xa6"}, // ๐Ÿ‡ฌ๐Ÿ‡ฆ {":gb:", "\xf0\x9f\x87\xac\xf0\x9f\x87\xa7"}, // ๐Ÿ‡ฌ๐Ÿ‡ง - {":uk:", "\xf0\x9f\x87\xac\xf0\x9f\x87\xa7"}, // ๐Ÿ‡ฌ๐Ÿ‡ง {":grenada:", "\xf0\x9f\x87\xac\xf0\x9f\x87\xa9"}, // ๐Ÿ‡ฌ๐Ÿ‡ฉ {":georgia:", "\xf0\x9f\x87\xac\xf0\x9f\x87\xaa"}, // ๐Ÿ‡ฌ๐Ÿ‡ช {":french_guiana:", "\xf0\x9f\x87\xac\xf0\x9f\x87\xab"}, // ๐Ÿ‡ฌ๐Ÿ‡ซ From 327231b060585bc421bca56118cc04212bba9938 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen <phil@teuwen.org> Date: Fri, 14 Jan 2022 21:22:26 +0100 Subject: [PATCH 73/73] license --- client/atr_scrap_pcsctools.py | 16 ++++++++++++++++ client/emojis_scrap_github.py | 18 +++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/client/atr_scrap_pcsctools.py b/client/atr_scrap_pcsctools.py index a3bb2cd98..9c4d1b4be 100755 --- a/client/atr_scrap_pcsctools.py +++ b/client/atr_scrap_pcsctools.py @@ -1,5 +1,21 @@ #!/usr/bin/env python3 +#----------------------------------------------------------------------------- +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- + # python3 -m pip install urllib unidecode import urllib.request diff --git a/client/emojis_scrap_github.py b/client/emojis_scrap_github.py index 9eb31a171..330e40c21 100755 --- a/client/emojis_scrap_github.py +++ b/client/emojis_scrap_github.py @@ -1,6 +1,22 @@ #!/usr/bin/env python3 -# Mostly derived from https://github.com/mrowa44/emojify Copyright (c) 2015 Justyna Rachowicz +#----------------------------------------------------------------------------- +# Borrowed initially from https://github.com/mrowa44/emojify +# Copyright (c) 2015 Justyna Rachowicz +# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See LICENSE.txt for the text of the license. +#----------------------------------------------------------------------------- from urllib.request import urlopen import json