mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Fix was attempting to credential file when --noappcreate was passed
This commit is contained in:
parent
cb6a1db852
commit
aa6b74a08d
1 changed files with 10 additions and 11 deletions
|
@ -941,11 +941,10 @@ static int CmdGallagherClone(const char *cmd) {
|
||||||
HFGAL_RET_ERR(PM3_EFATAL, "Could not find an available AID, please specify with --aid");
|
HFGAL_RET_ERR(PM3_EFATAL, "Could not find an available AID, please specify with --aid");
|
||||||
if (verbose)
|
if (verbose)
|
||||||
PrintAndLogEx(INFO, "Using available AID: %06X", aid);
|
PrintAndLogEx(INFO, "Using available AID: %06X", aid);
|
||||||
} else {
|
|
||||||
// Check that AID is available
|
|
||||||
if (aid_exists(&dctx, aid, verbose))
|
|
||||||
HFGAL_RET_ERR(PM3_EINVARG, "AID already exists: %06X", aid);
|
|
||||||
}
|
}
|
||||||
|
// Check that AID is available
|
||||||
|
else if (!no_app_create && aid_exists(&dctx, aid, verbose))
|
||||||
|
HFGAL_RET_ERR(PM3_EINVARG, "AID already exists: %06X", aid);
|
||||||
|
|
||||||
// Update Card Application Directory
|
// Update Card Application Directory
|
||||||
if (!no_cad_update) {
|
if (!no_cad_update) {
|
||||||
|
@ -969,12 +968,12 @@ static int CmdGallagherClone(const char *cmd) {
|
||||||
|
|
||||||
res = hfgal_create_creds_app(&dctx, site_key, aid, verbose);
|
res = hfgal_create_creds_app(&dctx, site_key, aid, verbose);
|
||||||
HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher application");
|
HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher application");
|
||||||
}
|
|
||||||
|
|
||||||
// Create credential files
|
// Create credential files
|
||||||
// Don't need to set keys here, they're generated automatically
|
// Don't need to set keys here, they're generated automatically
|
||||||
res = hfgal_create_creds_file(&dctx, site_key, aid, &creds, verbose);
|
res = hfgal_create_creds_file(&dctx, site_key, aid, &creds, verbose);
|
||||||
HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher credential file");
|
HFGAL_RET_IF_ERR_WITH_MSG(res, "Failed creating Gallagher credential file");
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, "Done");
|
PrintAndLogEx(SUCCESS, "Done");
|
||||||
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf gallagher reader`") " to verify");
|
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`hf gallagher reader`") " to verify");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue