Can you post more details of what you’re trying to do? What are you trying to achieve? What cards or fobs are you working with? What tools are you using? (Ok, I assume a Proxmark3 Easy but more details could be helpful) What client and firmware versions are you using?
the goal is to have the sum on the key directly without going through the dump file. the client and firmware versions that use: version v4.18341
my original code:
— balance reading on the key
local function read_Data()
print(acgreen…‘balance reading’…acoff)
-- Reading blocks 5 and 9
local block5 = core.console('lf em 4x50 rdbl -b 5') -- Example command to read block 5
local block9 = core.console('lf em 4x50 rdbl -b 9') -- Example command to read block 9
-- Extracting hexadecimal data and converting to decimal
local hex_value = string.format("%s%s", block5, block9) -- Combine data if necessary
local saldo = tonumber(hex_value, 16) / 10 -- Divide by 10 to get the exact amount
print(acgreen..'The current balance is : '..saldo..' euros'..acoff)
return saldo
here is the result in core.console(‘lf em 4x50 rdbl -b 9’)
result :
[=] # | word (msb) | word (lsb) | desc
[=] ----±------------±------------±-------------------
[=] 9 | A4 80 00 00 | 00 00 01 25 | user data
[=] ----±------------±------------±-------------------