-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Update microel.c #4264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Update microel.c #4264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use English in code comments and variable names - for ease of further support.
Could you please provide a sample dump file to verify the parser?
|
||
#define KEY_LENGTH 6 | ||
#define UID_LENGTH 4 | ||
// Offset per la conversione dell'anno (5 bit: da 0 a 31, quindi range 2010–2041) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep all comments in English
} | ||
} else { | ||
//Key a is the same as sumHex | ||
// KeyA uguale a sumHex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here and everywhere
MfClassicKey key_default = {0}; | ||
memcpy(key_default.data, keyF, sizeof(keyF)); | ||
|
||
bool __attribute__((unused)) default_auth_works = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need that?
} | ||
|
||
bool keys_found = false; | ||
uint8_t chiaveA[6], chiaveB[6]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyA, keyB
void trea_calculateKeys( | ||
const uint8_t* uid, | ||
const uint8_t* codiceGestore, | ||
uint8_t* chiaveA, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyA, keyB
switch(service_indicator) { | ||
case 0x04: | ||
return "Autolavaggio"; | ||
// Altri tipi da aggiungere con nuovi dump: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use English please
Please un-draft when fixed |
What's new
This update enhances the Microel card parser by adding support for extracting additional data fields from the Mifare Classic 1K card, including:
Basic card information:
UID
ATQA
SAK
Extended data fields:
Vendor ID
Available credit
Last transaction details
Transaction date
Operation number
Operation type
Admission credit
Deposit status (Yes/No)
Points balance
Previous credit amount
Date of previous credit
These additions improve the accuracy and completeness of the parsed data.
Checklist (For Reviewer)