This commit is contained in:
iceman1001 committed 2025-07-28 15:45:04 +02:00
1 parent 0dacfb996f
commit 79d1e102af
3 files changed
+11 -11

No files matched your search

+7 -7
View File
@@ -24,10 +24,10 @@ command('clear')
author = ' Author: jareckib - 30.01.2025'
tutorial = ' Based on Equipter tutorial - Downgrade Paxton to EM4102'
version = ' version v1.20'
desc = [[
The script automates the copying of Paxton fobs read - write.
It also allows manual input of data for blocks 4-7.
The third option is reading data stored in the log file and create new fob.
desc = [[
The script automates the copying of Paxton fobs read - write.
It also allows manual input of data for blocks 4-7.
The third option is reading data stored in the log file and create new fob.
Additionally, the script calculates the ID for downgrading Paxton to EM4102.
]]
@@ -70,7 +70,7 @@ local function reset_log_file()
file:write("")
file:close()
end
local function read_log_file(logfile)
local file = io.open(logfile, "r")
if not file then
@@ -340,7 +340,7 @@ local function main(args)
print(ac.cyan .. ' 1' .. ac.reset .. ' - Read Paxton blocks 4-7 to make a copy')
print(ac.cyan .. ' 2' .. ac.reset .. ' - Manually input data for Paxton blocks 4-7')
print(ac.cyan .. " 3" .. ac.reset .. " - Search in Paxton_log by name and use the data")
print(dash)
print(dash)
while true do
io.write(' Your choice '..ac.cyan..'(1/2/3): ' .. ac.reset)
input_option = io.read()
@@ -437,7 +437,7 @@ local function main(args)
was_option_3 = true
local retries = 3
while retries > 0 do
io.write(' Enter the name to search ('..retries..' attempts) : '..ac.yellow)
io.write(' Enter the name to search ('..retries..' attempts) : '..ac.yellow)
local user_input = io.read()
io.write(ac.reset..'')
if user_input == nil or user_input:match("^%s*$") then
+2 -2
View File
@@ -1170,14 +1170,14 @@ int getIndalaBits(uint8_t fc, uint16_t cn, uint8_t *bits) {
bits[62] = 0;
bits[63] = 1;
}
// add parity
// bits[34] = 1; // p1 64 - 30 = 34
// bits[38] = 1; // p2 68 - 30 = 38
// 92 = 62
// 93 = 63
bits[34] = 0; // parity for odd bits
bits[38] = 0; // parity for even bits
uint8_t p1 = 1;
+2 -2
View File
@@ -2245,11 +2245,11 @@ int DesfireValueFileOperations(DesfireContext_t *dctx, uint8_t fid, uint8_t oper
PrintAndLogEx(INFO, "MAC mode failed with length error, retrying with plain mode");
DesfireCommunicationMode original_mode = dctx->commMode;
dctx->commMode = DCMPlain;
memset(resp, 0, sizeof(resp));
resplen = 0;
res = DesfireCommand(dctx, operation, data, datalen, resp, &resplen, -1);
// Restore original mode for future commands
dctx->commMode = original_mode;
}