mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 11:33:51 +08: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) {
|
||||
PrintAndLogEx(INFO, "apdu: %scase=%02x cla=%02x ins=%02x p1=%02x p2=%02x Lc=%d Le=%d\n",
|
||||
apdu.extended_apdu ? "[e]" : "", apdu.case_type, apdu.cla, apdu.ins, apdu.p1, apdu.p2, apdu.lc, apdu.le);
|
||||
APDUPrintEx(apdu, 0);
|
||||
}
|
||||
|
||||
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 APDUEncode(APDUStruct *apdu, uint8_t *data, int *len);
|
||||
extern void APDUPrint(APDUStruct apdu);
|
||||
extern void APDUPrintEx(APDUStruct apdu, size_t maxdatalen);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue