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 2015-01-10 12:55:08

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

Suggestion: Traces & demods luascripts

What if we made a luascript that took all trace-files inside the traces folder and did a "data load" "lf search" and saved the output to a file. Easy to see which traces that doesn't decode.  You could say its a "self-test" script.

The another lua-script I thought of would is one that would test a T55x7 tag which different configurations for PSK..

lf t55xx write 0 00088040
lf read
data samples
data pskdet
data psknrz
data pskindala
data psknrzraw

Where it iterates over 
  xxxx8xxx = PSK RF/2 with Manchester modulation
  xxxx1xxx = PSK RF/2 with PSK1 modulation (phase change when input changes)
  xxxx2xxx = PSK RF/2 with PSk2 modulation (phase change on bitclk if input high)
  xxxx3xxx = PSK RF/2 with PSk3 modulation (phase change on rising edge of input)
  and  underneath each and one about,  also this four 
        XXXXX0XX = PSK RF/2
        XXXXX4XX = PSK RF/4
       XXXXX8XX = PSK RF/8

The output could also be save to a file...

Someone up for it?

Offline

#2 2015-01-10 15:46:40

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Suggestion: Traces & demods luascripts

The lf search currently only searches for hid, em410x, ioprox, and indala.  If the trace isn't one of those it won't output.  Several traces are not actual tags, but modulation examples that can be demoded but not by lf search

Offline

#3 2015-01-10 16:45:29

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

Re: Suggestion: Traces & demods luascripts

I made a simple version of suggestion number 1,
It loads traces starting with EM* and MOD*
afterwards it runs "data load" | "lf search"  for each found file name.

https://github.com/iceman1001/proxmark3 … cetest.lua

Offline

#4 2015-01-10 16:57:08

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

Re: Suggestion: Traces & demods luascripts

however, the "lf search" must be modified to read from graphbuffer,    Marshmellows "!offline"  only works if the pm3-device in not connected.

	char cmdp = param_getchar(Cmd, 0);
	
	if (strlen(Cmd) > 1 || cmdp == 'h' || cmdp == 'H') {
		PrintAndLog("Usage:  lf search <0|1>");
		PrintAndLog("     <use data from Graphbuffer>, if not set, try reading data from tag.");
		PrintAndLog("");
		PrintAndLog("    sample: lf search");
		PrintAndLog("          : lf search 1");
		return 0;
	}

	if (cmdp != '1' ){
		ans = CmdLFRead("");
	} else if (GraphTraceLen < 1000) {
		PrintAndLog("Data in Graphbuffer was too small.");
		return 0;
	}

Offline

#5 2015-01-10 17:04:39

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Suggestion: Traces & demods luascripts

It is easy enough to unplug it.  smile

Offline

#6 2015-01-10 17:08:27

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Suggestion: Traces & demods luascripts

I did see in the next pull request you changed it to take input.  tongue

Offline

#7 2015-01-10 17:09:30

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Suggestion: Traces & demods luascripts

I have some modifications to clarify the output as well.

Offline

#8 2015-01-10 20:03:47

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

Re: Suggestion: Traces & demods luascripts

I had an idea of mixing your original with "offline" mode and as a inparameter.  Best of both worlds. 
But I think it is wrong in the pull request...

Offline

#9 2015-01-10 20:45:41

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

Re: Suggestion: Traces & demods luascripts

And here is a test for the psk idea with a T55x7 tag...

https://github.com/iceman1001/proxmark3 … x7_psk.lua

Offline

#10 2015-01-11 13:29:33

holiman
Contributor
Registered: 2013-05-03
Posts: 566

Re: Suggestion: Traces & demods luascripts

It's a great idea to add more self-test features to pm3. go for it!

Offline

#11 2015-03-17 18:01:46

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

Re: Suggestion: Traces & demods luascripts

Running my tracetest script against the now LF commands looks kind of cool

http://pastebin.com/QrM0b60S


I also think there is a problem inside the FSK demods, since my client crashes around there in the test.  smile

Offline

#12 2015-03-17 18:13:48

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

Re: Suggestion: Traces & demods luascripts

These commands crashes the client.  smile

data load ../traces/modulation-fsk1.pm3
lf search 1

Offline

#13 2015-03-17 20:46:14

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Suggestion: Traces & demods luascripts

i found it.

need to add one line to lfdemod.c - Em410xDecode(...)
after the preambleSearch call
    if (*size<64) return 0;

i will include this in my next pull request.

Offline

#14 2015-03-17 20:56:32

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

Re: Suggestion: Traces & demods luascripts

Can you change this also in CmdLFfind,     otherwise the commande  "lf search 1 u" doesn't work. 

change 2  into 3.

if (strlen(Cmd) > 3 || cmdp == 'h' || cmdp == 'H') {

Offline

#15 2015-03-17 21:00:22

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: Suggestion: Traces & demods luascripts

No problem

Offline

Board footer

Powered by FluxBB