mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-21 05:43:23 -07:00
ADD: added a lot of ic ids to cmdhf15.c Thanks to Asper for the list.
ADD: added a manufacturer list in "hf 14a reader", only viable when UID is double or triple size. Thanks to Asper for the list. ADD: detect chinese magic backdoor commands in "hf 14a reader" CHG: minor code clean up.
This commit is contained in:
parent
79544b28ad
commit
52ab55ab0d
18 changed files with 270 additions and 43 deletions
|
@ -18,7 +18,6 @@
|
|||
#include "util.h"
|
||||
#include "printf.h"
|
||||
#include "string.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "legicrf.h"
|
||||
|
|
|
@ -44,12 +44,12 @@ static void quicksort(uint32_t* const start, uint32_t* const stop)
|
|||
else if(*rit > *start)
|
||||
--rit;
|
||||
else
|
||||
*it ^= (*it ^= *rit, *rit ^= *it);
|
||||
*it ^= ( (*it ^= *rit ), *rit ^= *it);
|
||||
|
||||
if(*rit >= *start)
|
||||
--rit;
|
||||
if(rit != start)
|
||||
*rit ^= (*rit ^= *start, *start ^= *rit);
|
||||
*rit ^= ( (*rit ^= *start), *start ^= *rit);
|
||||
|
||||
quicksort(start, rit - 1);
|
||||
quicksort(rit + 1, stop);
|
||||
|
|
|
@ -1812,7 +1812,7 @@ int iso14443a_select_card(byte_t *uid_ptr, iso14a_card_select_t *p_hi14a_card, u
|
|||
if (!ReaderReceive(resp, resp_par)) return 0;
|
||||
sak = resp[0];
|
||||
|
||||
// Test if more parts of the uid are comming
|
||||
// Test if more parts of the uid are coming
|
||||
if ((sak & 0x04) /* && uid_resp[0] == 0x88 */) {
|
||||
// Remove first byte, 0x88 is not an UID byte, it CT, see page 3 of:
|
||||
// http://www.nxp.com/documents/application_note/AN10927.pdf
|
||||
|
|
|
@ -214,7 +214,6 @@ void MifareUReadCard(uint8_t arg0, uint8_t *datain)
|
|||
|
||||
// clear trace
|
||||
iso14a_clear_trace();
|
||||
// iso14a_set_tracing(false);
|
||||
|
||||
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mifaresniff.h"
|
||||
#include "apps.h"
|
||||
|
||||
|
||||
static int sniffState = SNF_INIT;
|
||||
static uint8_t sniffUIDType;
|
||||
static uint8_t sniffUID[8];
|
||||
|
|
|
@ -412,7 +412,8 @@ int mifare_ultra_special_writeblock(uint32_t uid, uint8_t blockNo, uint8_t *bloc
|
|||
if (MF_DBGLEVEL >= 1) Dbprintf("Cmd Send Error: %02x %d", receivedAnswer[0],len);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid)
|
||||
|
|
|
@ -48,6 +48,11 @@ int memcmp(const void *av, const void *bv, int len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void memxor(uint8_t * dest, uint8_t * src, size_t len) {
|
||||
for( ; len > 0; len--,dest++,src++)
|
||||
*dest ^= *src;
|
||||
}
|
||||
|
||||
int strlen(const char *str)
|
||||
{
|
||||
int l = 0;
|
||||
|
|
|
@ -19,6 +19,7 @@ int strlen(const char *str);
|
|||
RAMFUNC void *memcpy(void *dest, const void *src, int len);
|
||||
void *memset(void *dest, int c, int len);
|
||||
RAMFUNC int memcmp(const void *av, const void *bv, int len);
|
||||
void memxor(uint8_t * dest, uint8_t * src, size_t len);
|
||||
char *strncat(char *dest, const char *src, unsigned int n);
|
||||
char *strcat(char *dest, const char *src);
|
||||
void strreverse(char s[]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue