Proxmark3 community

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.

Announcement

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.

#1 2020-12-23 12:35:09

changetotower
Contributor
Registered: 2020-12-22
Posts: 8

[Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

Hi

Just tried to read a LEGIC Prime Tag with the pre-compiled Win64-Version of the RRG / Iceman repo but I am always getting "ERROR input file: \s6ko.x.bin not found", where x is increasing with every attempt to run the "rt" command.

I've already read the quick intro in the script file, but could not find anything related to this error.

Any guidance in the right direction would be highly appreciated.

Thanks!

Last edited by changetotower (2021-08-31 08:28:08)

Offline

#2 2020-12-23 14:14:13

iceman
Administrator
Registered: 2013-04-25
Posts: 9,537
Website

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

that input filename looks quite off.   It should follow some kind of template style
hf_legic_XXXXX_dump.bin  ->  where xxxxx is UID.

Offline

#3 2020-12-23 14:36:22

changetotower
Contributor
Registered: 2020-12-22
Posts: 8

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

iceman wrote:

that input filename looks quite off.   It should follow some kind of template style
hf_legic_XXXXX_dump.bin  ->  where xxxxx is UID.

Thanks, appreciated. Noob question (I am completely new to proxmark3, although I have some knowledge about LEGIC from my professional background):
I guess first of all I'd have to make a dump with "hf legic dump", start hf_legic.lua and then visualize this dump with "rt .."? But how to specify the file here, could you please make an example? Thanks.

Offline

#4 2020-12-23 17:19:52

tcprst
Contributor
Registered: 2020-09-27
Posts: 10

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

I just checked out the Lua script and tested with my own LEGIC tags.  The Lua script uses os.tmpname() to get a temporary file with which it supplies to the dump command just so that it can read the tag in memory and then it deletes those files.  It attempts to delete those files regardless of if they were actually created or not.  If you run the `rt` command from Lua script without a tag on the proxmark3 you will always see this error message, this is by design of the Lua script. 

If you place a tag on the proxmark3 and run `rt` you should see something like:

 > rt
[+] TYPE: MIM256 card (234 bytes)
[+] Reading tag memory 256 b...

[+] saved 256 bytes to binary file /tmp/lua_R0yq2I.bin
[+] saved 32 blocks to text file /tmp/lua_R0yq2I.eml
[+] saved to json file /tmp/lua_R0yq2I.json

256 bytes from /tmp/lua_R0yq2I.bin loaded
create virtual tag from 256 bytes

Tag-Type: SAM
1 Segment(s) found
256 bytes for Tag processed

If you do not see that, is there a chance that your tag isn't a LEGIC?  If you use the `hf legic` series of commands in the client itself do you get data?

Offline

#5 2020-12-23 18:32:22

changetotower
Contributor
Registered: 2020-12-22
Posts: 8

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

tcprst wrote:

I just checked out the Lua script and tested with my own LEGIC tags.  The Lua script uses os.tmpname() to get a temporary file with which it supplies to the dump command just so that it can read the tag in memory and then it deletes those files.  It attempts to delete those files regardless of if they were actually created or not.  If you run the `rt` command from Lua script without a tag on the proxmark3 you will always see this error message, this is by design of the Lua script. 

If you place a tag on the proxmark3 and run `rt` you should see something like:

 > rt
[+] TYPE: MIM256 card (234 bytes)
[+] Reading tag memory 256 b...

[+] saved 256 bytes to binary file /tmp/lua_R0yq2I.bin
[+] saved 32 blocks to text file /tmp/lua_R0yq2I.eml
[+] saved to json file /tmp/lua_R0yq2I.json

256 bytes from /tmp/lua_R0yq2I.bin loaded
create virtual tag from 256 bytes

Tag-Type: SAM
1 Segment(s) found
256 bytes for Tag processed

If you do not see that, is there a chance that your tag isn't a LEGIC?  If you use the `hf legic` series of commands in the client itself do you get data?

Thanks for your reply!

Yes, I am 100% sure it is a MIM1024 tag (crosschecked with a commercial reader at work). After entering the "rt" command, I get the first two lines, but then the above mentioned ERROR appears. Strange.

Yes, hf legic is working without a problem.

Offline

#6 2020-12-23 18:43:42

tcprst
Contributor
Registered: 2020-09-27
Posts: 10

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

Is there a chance you've pulled recently without compiling?  I made some changes to the LEGIC commands and the associated script but they have to be in sync for everything to work properly.  Feel free to join the Discord server and we can work on this issue in real time if you'd like.

Offline

#7 2020-12-23 19:33:02

tcprst
Contributor
Registered: 2020-09-27
Posts: 10

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

Never mind, I reread your initial post about using pre-compiled Windows binaries (which I've never tested).  It appears that Lua's os.tmpname() doesn't work properly in the pre-compiled environment.  I tested on WSL1 and MacOS without problem.  I'll keep looking into this and see if I can find a fix.

Offline

#8 2020-12-23 19:34:35

changetotower
Contributor
Registered: 2020-12-22
Posts: 8

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

I am using the pre-compiled x64 version of the RRG/Iceman repo, yesterday's upload. Just installed the Discord app on my mobile phone, but the proxmark3 is at my workplace. Tomorrow I could test whatever.

Offline

#9 2020-12-23 19:35:48

changetotower
Contributor
Registered: 2020-12-22
Posts: 8

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

tcprst wrote:

Never mind, I reread your initial post about using pre-compiled Windows binaries (which I've never tested).  It appears that Lua's os.tmpname() doesn't work properly in the pre-compiled environment.  I tested on WSL1 and MacOS without problem.  I'll keep looking into this and see if I can find a fix.

Thanks, appreciate your help!

Offline

#10 2020-12-23 22:05:51

tcprst
Contributor
Registered: 2020-09-27
Posts: 10

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

Just closing the loop here as well, the Lua script has been updated to just generate a random filename which should work in all environments.

Offline

#11 2020-12-24 22:01:41

tcprst
Contributor
Registered: 2020-09-27
Posts: 10

Re: [Solved] hf_legic.lua - "ERROR input file: \s6ko.x.bin not found"

Since you've confirmed this is now working can you edit your title to include [Solved]?  Thanks!

Offline

Board footer

Powered by FluxBB