This commit is contained in:
iceman1001 2024-01-01 21:52:05 +01:00
commit 238572c337
14 changed files with 81 additions and 82 deletions

View file

@ -3516,7 +3516,7 @@ void ReaderMifare(bool first_try, uint8_t block, uint8_t keytype) {
*/ */
void DetectNACKbug(void) { void DetectNACKbug(void) {
uint8_t mf_auth[4] = { MIFARE_AUTH_KEYA, 0x00, 0xF5, 0x7B }; uint8_t mf_auth[4] = { MIFARE_AUTH_KEYA, 0x00, 0xF5, 0x7B };
uint8_t mf_nr_ar[8]= { 0x00 }; uint8_t mf_nr_ar[8] = { 0x00 };
uint8_t uid[10] = { 0x00 }; uint8_t uid[10] = { 0x00 };
uint8_t receivedAnswer[MAX_MIFARE_FRAME_SIZE] = { 0x00 }; uint8_t receivedAnswer[MAX_MIFARE_FRAME_SIZE] = { 0x00 };
uint8_t receivedAnswerPar[MAX_MIFARE_PARITY_SIZE] = { 0x00 }; uint8_t receivedAnswerPar[MAX_MIFARE_PARITY_SIZE] = { 0x00 };

View file

@ -3416,7 +3416,7 @@ static int CmdNumCon(const char *Cmd) {
continue; continue;
} }
switch(i) { switch (i) {
case 0: case 0:
// MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(&N, &N, &base)); // MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(&N, &N, &base));
break; break;

View file

@ -1285,7 +1285,7 @@ static void emrtd_print_issuance(char *data, bool ascii) {
} }
static void emrtd_print_personalization_timestamp(uint8_t *data, size_t datalen) { static void emrtd_print_personalization_timestamp(uint8_t *data, size_t datalen) {
if (datalen < 7 ) { if (datalen < 7) {
return; return;
} }

View file

@ -1682,7 +1682,7 @@ static int CmdHFMFPDump(const char *Cmd) {
PrintAndLogEx(INFO, " To be implemented, feel free to contribute!"); PrintAndLogEx(INFO, " To be implemented, feel free to contribute!");
return PM3_ENOTIMPL; return PM3_ENOTIMPL;
/* /*
mfpSetVerboseMode(verbose); mfpSetVerboseMode(verbose);
// read card // read card
@ -1693,12 +1693,12 @@ static int CmdHFMFPDump(const char *Cmd) {
} }
// iso14a_card_select_t card ; // iso14a_card_select_t card ;
// int res = mfp_read_tag(&card, mem, key_fn); // int res = mfp_read_tag(&card, mem, key_fn);
// if (res != PM3_SUCCESS) { // if (res != PM3_SUCCESS) {
// free(mem); // free(mem);
// return res; // return res;
// } // }
// Skip saving card data to file // Skip saving card data to file
@ -1709,19 +1709,19 @@ static int CmdHFMFPDump(const char *Cmd) {
} }
// Save to file // Save to file
// if (strlen(data_fn) < 1) { // if (strlen(data_fn) < 1) {
// char *fptr = calloc(sizeof(char) * (strlen("hf-mfp-") + strlen("-dump")) + card.uidlen * 2 + 1, sizeof(uint8_t)); // char *fptr = calloc(sizeof(char) * (strlen("hf-mfp-") + strlen("-dump")) + card.uidlen * 2 + 1, sizeof(uint8_t));
// strcpy(fptr, "hf-mfp-"); // strcpy(fptr, "hf-mfp-");
// FillFileNameByUID(fptr, card.uid, "-dump", card.uidlen); // FillFileNameByUID(fptr, card.uid, "-dump", card.uidlen);
// strcpy(data_fn, fptr); // strcpy(data_fn, fptr);
// free(fptr); // free(fptr);
// } // }
// pm3_save_mf_dump(filename, dump, MIFARE_4K_MAX_BYTES, jsfCardMemory); // pm3_save_mf_dump(filename, dump, MIFARE_4K_MAX_BYTES, jsfCardMemory);
free(mem); free(mem);
return PM3_SUCCESS; return PM3_SUCCESS;
*/ */
} }

View file

@ -1916,12 +1916,12 @@ int CmdLFfind(const char *Cmd) {
PrintAndLogEx(INFO, _CYAN_("Checking for unknown tags...") "\n"); PrintAndLogEx(INFO, _CYAN_("Checking for unknown tags...") "\n");
uint8_t ones[] = { uint8_t ones[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
}; };
// FSK // FSK

View file

@ -378,7 +378,7 @@ static int CmdUsartBtFactory(const char *Cmd) {
} else { } else {
memset(data, 0, sizeof(data)); memset(data, 0, sizeof(data));
len=0; len = 0;
string = "AT+BAUD=115200,N"; string = "AT+BAUD=115200,N";
PrintAndLogEx(SUCCESS, "TX (%3zu):%.*s", strlen(string), (int)strlen(string), string); PrintAndLogEx(SUCCESS, "TX (%3zu):%.*s", strlen(string), (int)strlen(string), string);

View file

@ -108,8 +108,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed, bool slient) {
bool isUDP = false; bool isUDP = false;
bool isBluetooth = false; bool isBluetooth = false;
bool isUnixSocket = false; bool isUnixSocket = false;
if (strlen(prefix) > 4) if (strlen(prefix) > 4) {
{
isTCP = (memcmp(prefix, "tcp:", 4) == 0); isTCP = (memcmp(prefix, "tcp:", 4) == 0);
isUDP = (memcmp(prefix, "udp:", 4) == 0); isUDP = (memcmp(prefix, "udp:", 4) == 0);
} }

View file

@ -4709,7 +4709,7 @@
}, },
"hf mf info": { "hf mf info": {
"command": "hf mf info", "command": "hf mf info",
"description": "Information and check vulnerabilities in a MIFARE Classic card Some cards in order to extract information you need to specify key and/or specific keys in the copmmand line", "description": "Information and check vulnerabilities in a MIFARE Classic card Some cards in order to extract information you need to specify key and/or specific keys in the command line",
"notes": [ "notes": [
"hf mf info", "hf mf info",
"hf mf info -k FFFFFFFFFFFF -n -v" "hf mf info -k FFFFFFFFFFFF -n -v"
@ -7257,7 +7257,7 @@
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help This help", "-h, --help This help",
"-1 Use data from Graphbuffer", "-1 Use data from Graphbuffer (offline mode)",
"-v, --verbose Verbose scan and output", "-v, --verbose Verbose scan and output",
"-@ optional - continuous reader mode" "-@ optional - continuous reader mode"
], ],
@ -10105,16 +10105,16 @@
"description": "Read and search for valid known tag. For offline mode, you can `data load` first then search.", "description": "Read and search for valid known tag. For offline mode, you can `data load` first then search.",
"notes": [ "notes": [
"lf search -> try reading data from tag & search for known tag", "lf search -> try reading data from tag & search for known tag",
"lf search -1 -> use data from the GraphBuffer & search for known tag",
"lf search -u -> try reading data from tag & search for known and unknown tag", "lf search -u -> try reading data from tag & search for known and unknown tag",
"lf search -1u -> use data from the GraphBuffer & search for known and unknown tag" "lf search -1 -> use data from the GraphBuffer & search for known tag",
"lf search -1uc -> use data from the GraphBuffer & search for known and unknown tag"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help This help", "-h, --help This help",
"-1 Use data from Graphbuffer to search", "-1 Use data from Graphbuffer to search (offline mode)",
"-c Continue searching even after a first hit", "-c Continue searching after successful match",
"-u Search for unknown tags. If not set, reads only known tags" "-u Search for unknown tags"
], ],
"usage": "lf search [-h1cu]" "usage": "lf search [-h1cu]"
}, },
@ -12160,6 +12160,6 @@
"metadata": { "metadata": {
"commands_extracted": 703, "commands_extracted": 703,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2023-12-18T09:05:00" "extracted_on": "2024-01-01T20:49:58"
} }
} }