make style
This commit is contained in:
@@ -25,4 +25,4 @@ json_t *AIDSearchGetElm(json_t *root, int elmindx);
|
|||||||
bool AIDGetFromElm(json_t *data, uint8_t *aid, size_t aidmaxlen, int *aidlen);
|
bool AIDGetFromElm(json_t *data, uint8_t *aid, size_t aidmaxlen, int *aidlen);
|
||||||
int AIDSearchFree();
|
int AIDSearchFree();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1505,7 +1505,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_aid_search) {
|
if (do_aid_search) {
|
||||||
int elmindx = 0;
|
int elmindx = 0;
|
||||||
json_t *root = AIDSearchInit(verbose);
|
json_t *root = AIDSearchInit(verbose);
|
||||||
@@ -1517,7 +1517,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||||||
int vaidlen = 0;
|
int vaidlen = 0;
|
||||||
if (!AIDGetFromElm(data, vaid, sizeof(vaid), &vaidlen) || !vaidlen)
|
if (!AIDGetFromElm(data, vaid, sizeof(vaid), &vaidlen) || !vaidlen)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
uint16_t sw = 0;
|
uint16_t sw = 0;
|
||||||
uint8_t result[1024] = {0};
|
uint8_t result[1024] = {0};
|
||||||
size_t resultlen = 0;
|
size_t resultlen = 0;
|
||||||
@@ -1525,7 +1525,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||||||
ActivateField = false;
|
ActivateField = false;
|
||||||
if (res)
|
if (res)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
uint8_t dfname[200] = {0};
|
uint8_t dfname[200] = {0};
|
||||||
size_t dfnamelen = 0;
|
size_t dfnamelen = 0;
|
||||||
if (resultlen > 3) {
|
if (resultlen > 3) {
|
||||||
@@ -1540,7 +1540,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||||||
tlvdb_free(tlv);
|
tlvdb_free(tlv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sw == 0x9000 || sw == 0x6283 || sw == 0x6285) {
|
if (sw == 0x9000 || sw == 0x6283 || sw == 0x6285) {
|
||||||
if (sw == 0x9000) {
|
if (sw == 0x9000) {
|
||||||
if (verbose) PrintAndLogEx(NORMAL, "------------- Application OK -----------");
|
if (verbose) PrintAndLogEx(NORMAL, "------------- Application OK -----------");
|
||||||
@@ -1566,7 +1566,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
|
|||||||
if (verbose) PrintAndLogEx(INFO, "(DF) Name not found");
|
if (verbose) PrintAndLogEx(INFO, "(DF) Name not found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
DropField();
|
DropField();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,21 +59,21 @@ local function main(args)
|
|||||||
local keylength = 4
|
local keylength = 4
|
||||||
|
|
||||||
for o, a in getopt.getopt(args, 'f:h') do
|
for o, a in getopt.getopt(args, 'f:h') do
|
||||||
|
|
||||||
-- help
|
-- help
|
||||||
if o == 'h' then return help() end
|
if o == 'h' then return help() end
|
||||||
|
|
||||||
-- offset
|
-- offset
|
||||||
if o == 'f' then filename = a end
|
if o == 'f' then filename = a end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
data, length, err = core.GetFromFlashMemSpiffs(filename)
|
data, length, err = core.GetFromFlashMemSpiffs(filename)
|
||||||
if data == nil then return oops('Problem while reading file from SPIFFS') end
|
if data == nil then return oops('Problem while reading file from SPIFFS') end
|
||||||
|
|
||||||
--print('Filename', filename)
|
--print('Filename', filename)
|
||||||
--print('Filesize (B)', length)
|
--print('Filesize (B)', length)
|
||||||
|
|
||||||
_, s = bin.unpack('H'..length, data)
|
_, s = bin.unpack('H'..length, data)
|
||||||
|
|
||||||
local cnt = 0, i
|
local cnt = 0, i
|
||||||
|
|||||||
Reference in New Issue
Block a user