Closed iceman1001 closed 5 years ago
I will take a look at that in a couple of days
Issue still open ? Might be able to have a look
still not working, have a go at it :)
Starting point :
function readFromPM3()
local tag, bytes, infile
infile="legic.temp"
core.console("hf legic reader")
- core.console("hf legic save "..infile)
+ core.console("hf legic dump o "..infile)
+ infile="legic.temp.bin"
-- function getInputBytes(infile) doesn't work yet for me, carrying on.
@akileos are you ready to merge your changes?
No sir, all crc calculations are still wrong on my tests and have no clue yet on what to include on CRC() to fix those. Advice welcome as you have one of those badge with exact same issue ;)
do you mean all crc calculations from the legic.lua script is wrong?
Those were I guess perfectly fine with mosci's segments but don't match mine at least. Need some more time to figure out what's wrong here, not a CRC master like some other folks here
ok... well, how about you post your progress on the forum and explain with samples / what you are trying to achive.
With @akileos latest PR, legic.lua now reads binary files, instead of ascii/eml hex files.
The script in general looks like it works. What doesn't work? Besides a unknown crc-16 algo for some legic-cash which needs to be identified. Time to close?
There are still a lot of things that still need to be ironed out. Token creation : Doesn't works except for SAM 'dlc' / 'd3p' : Only dumps last matching segment 'wt' uses old syntax to write the DCF thus fails. kgh doesn't seem to be working as expected aswell
Maybe I missed more, up to you to keep or close. Any help appreciated.
has fixed?
if you use @icsom (mosci) fork, then the legic.lua script works there fine.
here it still has some issues,
just to get it clear. legic segments can be designed in various ways - you even can design your own segment. the lua-script just covers a couple of segments, which I could have my hands on. d3p (dump third party) per example was a cash-segment from a 3rd party, which was used in a cantina - and the script works perfect on that particularly segment. And in fact: on those cards it was always the second (and last) segment. don't think the script is perfect - it was just perfect for me (mosci); and I shared it in hope it gets extended by others. all segments I could get my hand on have being described within the comments of the script. There could be millions of different segments, you can't cover them all, because if I would, I can create 100 different segments a day - The reader just checks the header and crc's. Per example: the 'd3p'-segment is in fact a cash-segment, but totally different to a legic-cash segment. It's part of the 3rd party to implement the verification of the data then - and part of the 'hacker' to reverse-engineer this layout. The script is not working for any kind of legic-segments - but it has some mapping features which makes it more easy to get them 'reverse-engineered'
You made a great script.
The main reason for this script not working in iceman fork is the "no decision" idea to support eml or bin dumps. I'm more leaning to support both but not got around to implement it. Once that is in place, the script generations will work.
There is some new improvements for legic prime support coming. Part of it got merged (@drandreas)
Hello @iceman1001 , may I ask why It was reverted ? Thanks
The old reading distance is still there.
the new pr was a work-in-progress, a missunderstanding between @drandreas and me.
He has gotting write / leds / tracelog to work since. So his refactoring is now better than what we have.
When he feels ok, he will make new PR.
@iceman1001 Gave it a test, can now read tags 1-2 cm from reader with @drandreas fork. Was a millimeter positioning job before.
Thats an improvement indeed :) Once @drandreas will push it, I merge it.
Only thing with legic.lua script is the acceptans of both binary / eml files...
I’m still ironing out some issues with handling various signal strength. There is a high chance that a distance of 4 or 5 cm works also. Currently a short distance behaves worse then long.
write works now too
The legic script in RRG repo saves bin / eml, I will close this issue.
With the remake of legic commands, the existing scripts from @mosci doesn't work anymore.