mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
make style
This commit is contained in:
parent
df1dd71d14
commit
d2a2acf69c
3 changed files with 24 additions and 17 deletions
|
@ -470,6 +470,12 @@ int APDUEncode(APDUStruct *apdu, uint8_t *data, int *len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void APDUPrint(APDUStruct apdu) {
|
void APDUPrint(APDUStruct apdu) {
|
||||||
PrintAndLogEx(INFO, "apdu: %scase=%02x cla=%02x ins=%02x p1=%02x p2=%02x Lc=%d Le=%d\n",
|
APDUPrintEx(apdu, 0);
|
||||||
apdu.extended_apdu ? "[e]" : "", apdu.case_type, apdu.cla, apdu.ins, apdu.p1, apdu.p2, apdu.lc, apdu.le);
|
}
|
||||||
|
|
||||||
|
void APDUPrintEx(APDUStruct apdu, size_t maxdatalen) {
|
||||||
|
PrintAndLogEx(INFO, "APDU: %scase=0x%02x cla=0x%02x ins=0x%02x p1=0x%02x p2=0x%02x Lc=0x%02x(%d) Le=0x%02x(%d)",
|
||||||
|
apdu.extended_apdu ? "[e]" : "", apdu.case_type, apdu.cla, apdu.ins, apdu.p1, apdu.p2, apdu.lc, apdu.lc, apdu.le, apdu.le);
|
||||||
|
if (maxdatalen > 0)
|
||||||
|
PrintAndLogEx(INFO, "data: %s%s", sprint_hex(apdu.data, MIN(apdu.lc, maxdatalen)), apdu.lc > maxdatalen ? "..." : "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,5 +55,6 @@ typedef struct {
|
||||||
extern int APDUDecode(uint8_t *data, int len, APDUStruct *apdu);
|
extern int APDUDecode(uint8_t *data, int len, APDUStruct *apdu);
|
||||||
extern int APDUEncode(APDUStruct *apdu, uint8_t *data, int *len);
|
extern int APDUEncode(APDUStruct *apdu, uint8_t *data, int *len);
|
||||||
extern void APDUPrint(APDUStruct apdu);
|
extern void APDUPrint(APDUStruct apdu);
|
||||||
|
extern void APDUPrintEx(APDUStruct apdu, size_t maxdatalen);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue