Skip to content

Commit

Permalink
LF config file
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed Sep 20, 2021
1 parent d56c5f8 commit 24adc08
Show file tree
Hide file tree
Showing 7 changed files with 274 additions and 166 deletions.
56 changes: 56 additions & 0 deletions config/config_official.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"//": "Based on Proxmark3 official repo v3.1.0, commit 6116334",
"//": "You can change this file if the command format of client changes",
"mifare classic": {
"nested": {
"cmd": "hf mf nested <card type> *",
Expand Down Expand Up @@ -102,6 +104,7 @@
"cmd": "hf mf cgetsc <sector>",
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
},
"//": "When writing a block, if the result is not empty and doesn't contain the failed flag, the function will return true",
"normal write block": {
"cmd": "hf mf wrbl <block> <key type> <key> <data>",
"key type": {
Expand Down Expand Up @@ -135,5 +138,58 @@
"Magic Card set parameter": {
"cmd": "hf mf csetuid <uid> <atqa> <sak>"
}
},
"lf": {
"read": {
"cmd": "lf read",
"show cmd": "data plot"
},
"sniff": {
"cmd": "lf snoop",
"show cmd": "data plot"
},
"search": {
"cmd": "lf search u"
},
"tune": {
"cmd": "hw tune l"
},
"get config": {
"cmd": "hw status",
"field start": "LF Sampling config:",
"field end": "USB Speed:",
"divisor": {
"flag": "divisor:",
"pattern": "\\d+"
},
"bits per sample": {
"flag": "bps:",
"pattern": "\\d+"
},
"decimation": {
"flag": "decimation:",
"pattern": "\\d+"
},
"averaging": {
"flag": "averaging:",
"pattern": "\\d+"
},
"trigger threshold": {
"flag": "trigger threshold:",
"pattern": "\\d+"
},
"samples to skip": {
"flag": "samples to skip:",
"pattern": "\\d+"
},
"//": "execute 'cmd' then find parameters between 'field stard' and 'field end'",
"//": "for each line, if the line doesn't have any flag, skip",
"//": "otherwise, delete characters before 'flag' and 'flag' itself, then use 'pattern' to get the parameter",
"//": "If 'replace' dict exists, replace all keys with respective values before getting parameters"
},
"set config": {
"cmd": "lf config q <divisor> b <bits per sample> d <decimation> a <averaging> t <trigger threshold> s <samples to skip>",
"divisor cmd": "hw setlfdivisor <divisor>"
}
}
}
62 changes: 62 additions & 0 deletions config/config_rrgv4.13.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"//": "Based on Proxmark3 rrg repo v4.13441, commit 35ddebc",
"//": "You can change this file if the command format of client changes",
"mifare classic": {
"nested": {
"cmd": "hf mf nested --<card type> --blk <block> -<key type> -k <key>",
Expand Down Expand Up @@ -102,6 +104,7 @@
"cmd": "hf mf cgetsc --sec <sector>",
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
},
"//": "When writing a block, if the result is not empty and doesn't contain the failed flag, the function will return true",
"normal write block": {
"cmd": "hf mf wrbl --blk <block> -<key type> -k <key> -d <data>",
"key type": {
Expand Down Expand Up @@ -137,5 +140,64 @@
"Magic Card set parameter": {
"cmd": "hf mf csetuid --uid <uid> --atqa <atqa> --sak <sak>"
}
},
"lf": {
"read": {
"cmd": "lf read -v",
"show cmd": "data plot"
},
"sniff": {
"cmd": "lf sniff -v",
"show cmd": "data plot"
},
"search": {
"cmd": "lf search -u"
},
"tune": {
"cmd": "lf tune --divisor <divisor>"
},
"get config": {
"cmd": "hw status",
"field start": "LF Sampling config",
"field end": "LF Sampling Stack",
"divisor": {
"flag": "divisor",
"pattern": "\\d+"
},
"bits per sample": {
"flag": "bits per sample",
"pattern": "\\d+"
},
"decimation": {
"flag": "decimation",
"pattern": "\\d+"
},
"averaging": {
"flag": "averaging",
"pattern": "\\d+",
"replace": {
"yes": "1",
"no": "0",
"Yes": "1",
"No": "0"
}
},
"trigger threshold": {
"flag": "trigger threshold",
"pattern": "\\d+"
},
"samples to skip": {
"flag": "samples to skip",
"pattern": "\\d+"
},
"//": "execute 'cmd' then find parameters between 'field stard' and 'field end'",
"//": "for each line, if the line doesn't have any flag, skip",
"//": "otherwise, delete characters before 'flag' and 'flag' itself, then use 'pattern' to get the parameter",
"//": "If 'replace' dict exists, replace all keys with respective values before getting parameters"
},
"set config": {
"cmd": "lf config --divisor <divisor> --bps <bits per sample> --dec <decimation> --avg <averaging> --trig <trigger threshold> --skip <samples to skip>",
"divisor cmd": "hw setlfdivisor -d <divisor>"
}
}
}
Loading

0 comments on commit 24adc08

Please sign in to comment.