Research, development and trades concerning the powerful Proxmark3 device.
Remember; sharing is caring. Bring something back to the community.
"Learn the tools of the trade the hard way." +Fravia
You are not logged in.
Time changes and with it the technology
Proxmark3 @ discord
Users of this forum, please be aware that information stored on this site is not private.
Pages: 1
Hi everyone,
I'm trying to write a script which takes facility code, card number, and format as an argument and the script will encode the card. But I'm stuck at a point where I send the command and It says the number is malformed.
what I did is take FC, CN, and format. Creates three blocks data accordingly and trying to write each block one by one.
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 ="60107060", arg2 ="00", arg3 = "00", data = "00"}
local writecmd1 = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 ="01D55955", arg2 ="01", arg3 ="00" , data = "00"}
local writecmd2 = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 ="5569A569", arg2 ="02", arg3 ="00" , data = "00"}
local writecmd3 = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 ="5A956599", arg2 ="03", arg3 ="00" , data = "00"}
local err = core.SendCommand(writecmd:getBytes())
if err then return oops(err) end
err = core.SendCommand(writecmd1:getBytes())
if err then return oops(err) end
err = core.SendCommand(writecmd2:getBytes())
if err then return oops(err) end
err = core.SendCommand(writecmd3:getBytes())
if err then return oops(err) end
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
So, here I got error While writing block 1. Error says "number is Malformed"
I don't know what does it mean.
Offline
Now I'm trying it with this
core.console("lf t55xx wr b 0 d 60107060")
core.console("lf t55xx wr b 1 d 01D55955")
core.console("lf t55xx wr b 2 d 5569A569")
core.console("lf t55xx wr b 3 d 5A956599")
and now I want script to verify that is it correct or not. any help guys??
Offline
On your way, just need to understand the difference between strings and byte arrays regarding yr first post.
What is the purpose with the script besides the obvious "write to a t55x7 tag". With yr four core.console commands you archive it.
core.console mimics running a command on commandprompt in the client. So you see the feedback on screen as normal but you don't get "access" to the response inside the luascript. Concerning yr question about verify, it comes down to how to verify it. Do you mean to verfiy that the writes went well? or do you mean that the t55xx tag is mimicing a valid tag (ie test 'lf search') ? Do you want it to be automatic or human verification?
Offline
Thanks, @iceman for the response. I will convert a string to byte array.
Now regarding my question of verifying, I want to check that tag mimic specific tag that I want.
Offline
then I suggest
core.console("lf search")
It will easily show you if pm3 client does recoqnise it.. (which it doesnt since I tried it)
Offline
That's true, But I want it to automatically verify. and if I use core.console("lf search") I have to check it manually at each card.
Offline
If you want to do it automatically, you need to know what you are verifying against and how it all fits in together in the client code.
Not much I can help you with there.
Offline
Is there a way I can store the output of "core.console()" to any variable or file??
That will make it easy for me
Offline
check out the proxmark3.log file...
Offline
Thanks @iceman I will write with core.console("lf t55xx wr b d") and use core.console("lf search") to vrify it from log file.
thanks again
Offline
Pages: 1