mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-10 17:49:32 +08:00
style
This commit is contained in:
parent
ef348a2aa0
commit
0ff41fa652
10 changed files with 41 additions and 41 deletions
|
@ -304,15 +304,15 @@ void RunMod(void) {
|
||||||
LED_C_OFF();
|
LED_C_OFF();
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
|
|
||||||
// add loop visa
|
// add loop visa
|
||||||
// for (int i = 0; i < ARRAYLEN(AIDlist); i ++) {
|
// for (int i = 0; i < ARRAYLEN(AIDlist); i ++) {
|
||||||
// hexstr_to_byte_array("a0da02631a440a44000000a012ad10a00e800200048108", sam_apdu, &sam_len);
|
// hexstr_to_byte_array("a0da02631a440a44000000a012ad10a00e800200048108", sam_apdu, &sam_len);
|
||||||
uint8_t apdulen = iso14_apdu(apdus[i], (uint16_t) apduslen[i], false, apdubuffer, NULL);
|
uint8_t apdulen = iso14_apdu(apdus[i], (uint16_t) apduslen[i], false, apdubuffer, NULL);
|
||||||
|
|
||||||
if (apdulen > 0) {
|
if (apdulen > 0) {
|
||||||
DbpString("[ " _YELLOW_("Proxmark command") " ]");
|
DbpString("[ " _YELLOW_("Proxmark command") " ]");
|
||||||
Dbhexdump(apduslen[i], apdus[i], false);
|
Dbhexdump(apduslen[i], apdus[i], false);
|
||||||
DbpString("[ " _GREEN_( "Card answer") " ]");
|
DbpString("[ " _GREEN_("Card answer") " ]");
|
||||||
Dbhexdump(apdulen - 2, apdubuffer, false);
|
Dbhexdump(apdulen - 2, apdubuffer, false);
|
||||||
DbpString("-------------------------------");
|
DbpString("-------------------------------");
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ void RunMod(void) {
|
||||||
p_response = &responses[RESP_INDEX_RATS];
|
p_response = &responses[RESP_INDEX_RATS];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (g_dbglevel == DBG_DEBUG ) {
|
if (g_dbglevel == DBG_DEBUG) {
|
||||||
DbpString("[ "_YELLOW_("Card reader command") " ]");
|
DbpString("[ "_YELLOW_("Card reader command") " ]");
|
||||||
Dbhexdump(len, receivedCmd, false);
|
Dbhexdump(len, receivedCmd, false);
|
||||||
}
|
}
|
||||||
|
@ -461,12 +461,12 @@ void RunMod(void) {
|
||||||
if (receivedCmd[2] == 0xA4 && receivedCmd[6] == 0x32 && prevCmd == 0) {
|
if (receivedCmd[2] == 0xA4 && receivedCmd[6] == 0x32 && prevCmd == 0) {
|
||||||
// need to adapt lengths..
|
// need to adapt lengths..
|
||||||
uint8_t ppsea[39] = {
|
uint8_t ppsea[39] = {
|
||||||
// 0x23 = 35, skip two first bytes then the message - SW 2 is 35 = 0x23
|
// 0x23 = 35, skip two first bytes then the message - SW 2 is 35 = 0x23
|
||||||
0x6F, 0x23, 0x84, 0x0E, 0x32, 0x50, 0x41, 0x59,
|
0x6F, 0x23, 0x84, 0x0E, 0x32, 0x50, 0x41, 0x59,
|
||||||
0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46,
|
0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46,
|
||||||
0x30, 0x31, 0xA5, 0x11, 0xBF, 0x0C, 0x0E, 0x61,
|
0x30, 0x31, 0xA5, 0x11, 0xBF, 0x0C, 0x0E, 0x61,
|
||||||
0x0C, 0x4F,
|
0x0C, 0x4F,
|
||||||
// len aid0 aid1 aid2...
|
// len aid0 aid1 aid2...
|
||||||
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
|
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
|
||||||
0x87, 0x01, 0x01, 0x90, 0x00
|
0x87, 0x01, 0x01, 0x90, 0x00
|
||||||
};
|
};
|
||||||
|
@ -477,12 +477,12 @@ void RunMod(void) {
|
||||||
// respond Visa AID
|
// respond Visa AID
|
||||||
} else if (receivedCmd[2] == 0xA4 && receivedCmd[10] == 0x03 && receivedCmd[11] == 0x10 && prevCmd == 1) {
|
} else if (receivedCmd[2] == 0xA4 && receivedCmd[10] == 0x03 && receivedCmd[11] == 0x10 && prevCmd == 1) {
|
||||||
uint8_t visauid_long[34] = {
|
uint8_t visauid_long[34] = {
|
||||||
// 0x1E = 30, skip two first bytes then the message - SW 2 is 30 = 0x1E
|
// 0x1E = 30, skip two first bytes then the message - SW 2 is 30 = 0x1E
|
||||||
0x6F, 0x1E, 0x84,
|
0x6F, 0x1E, 0x84,
|
||||||
// len aid0 aid1 aid2....
|
// len aid0 aid1 aid2....
|
||||||
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
|
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
|
||||||
0xA5, 0x13, 0x50,
|
0xA5, 0x13, 0x50,
|
||||||
// len V I S A C R E D I T
|
// len V I S A C R E D I T
|
||||||
0x0B, 0x56, 0x49, 0x53, 0x41, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54,
|
0x0B, 0x56, 0x49, 0x53, 0x41, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54,
|
||||||
0x9F, 0x38, 0x03, 0x9F, 0x66, 0x02,
|
0x9F, 0x38, 0x03, 0x9F, 0x66, 0x02,
|
||||||
0x90, 0x00
|
0x90, 0x00
|
||||||
|
|
|
@ -357,7 +357,7 @@ void RunMod() {
|
||||||
DbpString(_YELLOW_("!!") " Avoiding request - Bluetooth data already in memory!!");
|
DbpString(_YELLOW_("!!") " Avoiding request - Bluetooth data already in memory!!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (g_dbglevel == DBG_DEBUG ) {
|
if (g_dbglevel == DBG_DEBUG) {
|
||||||
DbpString("[ "_YELLOW_("Card reader command") " ]");
|
DbpString("[ "_YELLOW_("Card reader command") " ]");
|
||||||
Dbhexdump(len - 2, &receivedCmd[1], false);
|
Dbhexdump(len - 2, &receivedCmd[1], false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2772,7 +2772,7 @@ static void detect_credential(uint8_t *iclass_dump, size_t dump_len, bool *is_le
|
||||||
picopass_hdr_t *hdr = (picopass_hdr_t *)iclass_dump;
|
picopass_hdr_t *hdr = (picopass_hdr_t *)iclass_dump;
|
||||||
|
|
||||||
if (!memcmp(hdr->app_issuer_area, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", PICOPASS_BLOCK_SIZE)) {
|
if (!memcmp(hdr->app_issuer_area, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", PICOPASS_BLOCK_SIZE)) {
|
||||||
// Legacy AIA
|
// Legacy AIA
|
||||||
*is_legacy = true;
|
*is_legacy = true;
|
||||||
|
|
||||||
if (dump_len < 11 * PICOPASS_BLOCK_SIZE) {
|
if (dump_len < 11 * PICOPASS_BLOCK_SIZE) {
|
||||||
|
|
|
@ -2018,7 +2018,7 @@ static int CmdEMVScan(const char *Cmd) {
|
||||||
bool paramLoadJSON = arg_get_lit(ctx, 4);
|
bool paramLoadJSON = arg_get_lit(ctx, 4);
|
||||||
|
|
||||||
enum TransactionType TrType = TT_MSD;
|
enum TransactionType TrType = TT_MSD;
|
||||||
if (arg_get_lit(ctx, 6)){
|
if (arg_get_lit(ctx, 6)) {
|
||||||
TrType = TT_QVSDCMCHIP;
|
TrType = TT_QVSDCMCHIP;
|
||||||
}
|
}
|
||||||
if (arg_get_lit(ctx, 7)) {
|
if (arg_get_lit(ctx, 7)) {
|
||||||
|
|
|
@ -205,14 +205,14 @@ int Iso7816Select(Iso7816CommandChannel channel, bool activate_field, bool leave
|
||||||
uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
|
uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
|
||||||
|
|
||||||
return Iso7816ExchangeEx(channel
|
return Iso7816ExchangeEx(channel
|
||||||
, activate_field
|
, activate_field
|
||||||
, leave_field_on
|
, leave_field_on
|
||||||
, (sAPDU_t) {0x00, 0xa4, 0x04, 0x00, aid_len, aid}
|
, (sAPDU_t) {0x00, 0xa4, 0x04, 0x00, aid_len, aid}
|
||||||
, (channel == CC_CONTACTLESS)
|
, (channel == CC_CONTACTLESS)
|
||||||
, 0
|
, 0
|
||||||
, result
|
, result
|
||||||
, max_result_len
|
, max_result_len
|
||||||
, result_len
|
, result_len
|
||||||
, sw
|
, sw
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,7 @@ const static vocabulary_t vocabulary[] = {
|
||||||
{ 0, "hf iclass esave" },
|
{ 0, "hf iclass esave" },
|
||||||
{ 0, "hf iclass esetblk" },
|
{ 0, "hf iclass esetblk" },
|
||||||
{ 0, "hf iclass eview" },
|
{ 0, "hf iclass eview" },
|
||||||
{ 1, "hf iclass configcard" },
|
{ 0, "hf iclass configcard" },
|
||||||
{ 1, "hf iclass calcnewkey" },
|
{ 1, "hf iclass calcnewkey" },
|
||||||
{ 1, "hf iclass encode" },
|
{ 1, "hf iclass encode" },
|
||||||
{ 1, "hf iclass encrypt" },
|
{ 1, "hf iclass encrypt" },
|
||||||
|
|
|
@ -11857,6 +11857,6 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 687,
|
"commands_extracted": 687,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2023-10-03T15:10:12"
|
"extracted_on": "2023-10-12T12:53:10"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -424,7 +424,7 @@ Check column "offline" for their availability.
|
||||||
|`hf iclass esave `|N |`Save emulator memory to file`
|
|`hf iclass esave `|N |`Save emulator memory to file`
|
||||||
|`hf iclass esetblk `|N |`Set emulator memory block data`
|
|`hf iclass esetblk `|N |`Set emulator memory block data`
|
||||||
|`hf iclass eview `|N |`View emulator memory`
|
|`hf iclass eview `|N |`View emulator memory`
|
||||||
|`hf iclass configcard `|Y |`Reader configuration card`
|
|`hf iclass configcard `|N |`Reader configuration card`
|
||||||
|`hf iclass calcnewkey `|Y |`Calc diversified keys (blocks 3 & 4) to write new keys`
|
|`hf iclass calcnewkey `|Y |`Calc diversified keys (blocks 3 & 4) to write new keys`
|
||||||
|`hf iclass encode `|Y |`Encode binary wiegand to block 7`
|
|`hf iclass encode `|Y |`Encode binary wiegand to block 7`
|
||||||
|`hf iclass encrypt `|Y |`Encrypt given block data`
|
|`hf iclass encrypt `|Y |`Encrypt given block data`
|
||||||
|
|
Loading…
Reference in a new issue