mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
fix conflit
This commit is contained in:
commit
de98e4e161
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Changed `mkversion.sh` - now regenerates version_pm3.c (and consequently the binaries) only when needed (@doegox)
|
||||
- Added `data atr` - a command to lookup ATR (@iceman1001)
|
||||
- Fixed bug in ATR lookup fct, thanks @DidierA (@iceman1001)
|
||||
- Updated ATR list (@iceman1001)
|
||||
|
|
4
Makefile
4
Makefile
|
@ -370,10 +370,10 @@ release:
|
|||
# - Tagging temporarily...
|
||||
@git tag -a -m "Release $(VERSION) - $(RELEASE_NAME)" $(VERSION)
|
||||
# - Changing default version information based on new tag
|
||||
@$(SH) tools/mkversion.sh > common/default_version_pm3.c.tmp && $(MV) common/default_version_pm3.c.tmp common/default_version_pm3.c
|
||||
@$(SH) tools/mkversion.sh --force common/default_version_pm3.c
|
||||
# - Removing mkversion calls
|
||||
@sed -i 's#^.*\.\./tools/mkversion.sh.*|| #\t$$(Q)#' client/Makefile bootrom/Makefile armsrc/Makefile
|
||||
@sed -i '/COMMAND/s/sh .*|| //' client/CMakeLists.txt
|
||||
@sed -i '/COMMAND/s/sh .*|| //' client/CMakeLists.txt client/experimental_lib/CMakeLists.txt
|
||||
# - Deleting tag...
|
||||
@git tag -d $(VERSION)
|
||||
# - Amending commit...
|
||||
|
|
|
@ -181,10 +181,10 @@ showinfo:
|
|||
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
# version_pm3.c should be remade on every time fullimage.stage1.elf should be remade
|
||||
# version_pm3.c should be checked on every time fullimage.stage1.elf should be remade
|
||||
version_pm3.c: default_version_pm3.c $(OBJDIR)/fpga_version_info.o $(OBJDIR)/fpga_all.o $(THUMBOBJ) $(ARMOBJ) .FORCE
|
||||
$(info [-] GEN $@)
|
||||
$(Q)$(SH) ../tools/mkversion.sh > $@ || $(CP) $< $@
|
||||
$(info [-] CHECK $@)
|
||||
$(Q)$(SH) ../tools/mkversion.sh $@ || $(CP) $< $@
|
||||
|
||||
fpga_version_info.c: $(FPGA_BITSTREAMS) $(FPGA_COMPRESSOR)
|
||||
$(info [-] GEN $@)
|
||||
|
|
|
@ -53,10 +53,10 @@ INSTALLFW = $(OBJDIR)/bootrom.elf
|
|||
|
||||
OBJS = $(OBJDIR)/bootrom.s19
|
||||
|
||||
# version_pm3.c should be remade on every compilation
|
||||
# version_pm3.c should be checked on every compilation
|
||||
version_pm3.c: default_version_pm3.c .FORCE
|
||||
$(info [=] GEN $@)
|
||||
$(Q)$(SH) ../tools/mkversion.sh > $@ || $(PERL) ../tools/mkversion.pl > $@ || $(CP) $< $@
|
||||
$(info [=] CHECK $@)
|
||||
$(Q)$(SH) ../tools/mkversion.sh $@ || $(CP) $< $@
|
||||
|
||||
all: showinfo $(OBJS)
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ set (TARGET_SOURCES
|
|||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/version_pm3.c
|
||||
COMMAND sh ${PM3_ROOT}/tools/mkversion.sh > ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c
|
||||
COMMAND sh ${PM3_ROOT}/tools/mkversion.sh ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c
|
||||
DEPENDS ${PM3_ROOT}/common/default_version_pm3.c
|
||||
)
|
||||
|
||||
|
|
|
@ -918,10 +918,10 @@ src/pm3_pywrap.c: pm3.i
|
|||
|
||||
.PHONY: all clean install uninstall tarbin .FORCE
|
||||
|
||||
# version_pm3.c should be remade on every compilation
|
||||
# version_pm3.c should be checked on every compilation
|
||||
src/version_pm3.c: default_version_pm3.c .FORCE
|
||||
$(info [=] GEN $@)
|
||||
$(Q)$(SH) ../tools/mkversion.sh > $@ || $(CP) $< $@
|
||||
$(info [=] CHECK $@)
|
||||
$(Q)$(SH) ../tools/mkversion.sh $@ || $(CP) $< $@
|
||||
|
||||
# easy printing of MAKE VARIABLES
|
||||
print-%: ; @echo $* = $($*)
|
||||
|
|
|
@ -397,7 +397,7 @@ set (TARGET_SOURCES
|
|||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/version_pm3.c
|
||||
COMMAND sh ${PM3_ROOT}/tools/mkversion.sh > ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c
|
||||
COMMAND sh ${PM3_ROOT}/tools/mkversion.sh ${CMAKE_BINARY_DIR}/version_pm3.c || ${CMAKE_COMMAND} -E copy ${PM3_ROOT}/common/default_version_pm3.c ${CMAKE_BINARY_DIR}/version_pm3.c
|
||||
DEPENDS ${PM3_ROOT}/common/default_version_pm3.c
|
||||
)
|
||||
|
||||
|
|
|
@ -3439,10 +3439,10 @@ static int CmdAtrLookup(const char *Cmd) {
|
|||
PrintAndLogEx(INFO, "ISO7816-3 ATR... " _YELLOW_("%s"), data);
|
||||
PrintAndLogEx(INFO, "Fingerprint...");
|
||||
|
||||
char *copy = str_dup(getAtrInfo((char*)data));
|
||||
char *copy = str_dup(getAtrInfo((char *)data));
|
||||
|
||||
char * token = strtok(copy, "\n");
|
||||
while ( token != NULL ) {
|
||||
char *token = strtok(copy, "\n");
|
||||
while (token != NULL) {
|
||||
PrintAndLogEx(INFO, " %s", token);
|
||||
token = strtok(NULL, "\n");
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ const static vocabulory_t vocabulory[] = {
|
|||
{ 1, "data convertbitstream" },
|
||||
{ 1, "data getbitstream" },
|
||||
{ 1, "data asn1" },
|
||||
{ 1, "data atr" },
|
||||
{ 1, "data bin2hex" },
|
||||
{ 0, "data bitsamples" },
|
||||
{ 1, "data clear" },
|
||||
|
|
|
@ -26,5 +26,7 @@ const struct version_information_t SECTVERSINFO g_version_information = {
|
|||
1, /* version 1 */
|
||||
0, /* version information not present */
|
||||
2, /* cleanliness couldn't be determined */
|
||||
/* Remaining fields: zero */
|
||||
"Iceman/master/unknown",
|
||||
"1970-01-01 00:00:00",
|
||||
"no sha256"
|
||||
};
|
||||
|
|
|
@ -140,15 +140,17 @@
|
|||
"command": "analyse units",
|
||||
"description": "experiments of unit conversions found in HF. ETU (1/13.56mhz), US or SSP_CLK (1/3.39MHz)",
|
||||
"notes": [
|
||||
"analyse uints --etu 10analyse uints --us 100"
|
||||
"analyse uints --etu 10",
|
||||
"analyse uints --us 100"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"--etu <dec> number in ETU",
|
||||
"--us <dec> number in micro seconds (us)"
|
||||
"--us <dec> number in micro seconds (us)",
|
||||
"-t, --selftest self tests"
|
||||
],
|
||||
"usage": "analyse units [-h] [--etu <dec>] [--us <dec>]"
|
||||
"usage": "analyse units [-ht] [--etu <dec>] [--us <dec>]"
|
||||
},
|
||||
"auto": {
|
||||
"command": "auto",
|
||||
|
@ -204,6 +206,20 @@
|
|||
],
|
||||
"usage": "data asn1 [-ht] [-d <hex>]"
|
||||
},
|
||||
"data atr": {
|
||||
"command": "data atr",
|
||||
"description": "look up ATR record from bytearray",
|
||||
"notes": [
|
||||
"data atr -d 3B6B00000031C064BE1B0100079000"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-d <hex> ASN1 encoded byte array",
|
||||
"-t, --test perform selftest"
|
||||
],
|
||||
"usage": "data atr [-ht] [-d <hex>]"
|
||||
},
|
||||
"data autocorr": {
|
||||
"command": "data autocorr",
|
||||
"description": "Autocorrelate over window is used to detect repeating sequences. We use it as detection of how long in bits a message inside the signal is",
|
||||
|
@ -1170,7 +1186,7 @@
|
|||
},
|
||||
"hf 14a list": {
|
||||
"command": "hf 14a list",
|
||||
"description": "Alias of `trace list -t 14a` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t 14a -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf 14a list --frame -> show frame delay times",
|
||||
"hf 14a list -1 -> use trace buffer"
|
||||
|
@ -3166,7 +3182,7 @@
|
|||
},
|
||||
"hf iclass list": {
|
||||
"command": "hf iclass list",
|
||||
"description": "Alias of `trace list -t iclass` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t iclass -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf iclass list --frame -> show frame delay times",
|
||||
"hf iclass list -1 -> use trace buffer"
|
||||
|
@ -3836,7 +3852,7 @@
|
|||
},
|
||||
"hf lto list": {
|
||||
"command": "hf lto list",
|
||||
"description": "Alias of `trace list -t lto` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t lto -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf lto list --frame -> show frame delay times",
|
||||
"hf lto list -1 -> use trace buffer"
|
||||
|
@ -4591,7 +4607,7 @@
|
|||
},
|
||||
"hf mf list": {
|
||||
"command": "hf mf list",
|
||||
"description": "Alias of `trace list -t mf` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t mf -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf mf list --frame -> show frame delay times",
|
||||
"hf mf list -1 -> use trace buffer"
|
||||
|
@ -5803,7 +5819,7 @@
|
|||
},
|
||||
"hf mfdes list": {
|
||||
"command": "hf mfdes list",
|
||||
"description": "Alias of `trace list -t des` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t des -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf mfdes list --frame -> show frame delay times",
|
||||
"hf mfdes list -1 -> use trace buffer"
|
||||
|
@ -6216,7 +6232,7 @@
|
|||
},
|
||||
"hf mfp list": {
|
||||
"command": "hf mfp list",
|
||||
"description": "Alias of `trace list -t mfp` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t mfp -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf mfp list --frame -> show frame delay times",
|
||||
"hf mfp list -1 -> use trace buffer"
|
||||
|
@ -6494,7 +6510,7 @@
|
|||
},
|
||||
"hf mfu list": {
|
||||
"command": "hf mfu list",
|
||||
"description": "Alias of `trace list -t 14a` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t 14a -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf 14a list --frame -> show frame delay times",
|
||||
"hf 14a list -1 -> use trace buffer"
|
||||
|
@ -7064,7 +7080,7 @@
|
|||
},
|
||||
"hf topaz list": {
|
||||
"command": "hf topaz list",
|
||||
"description": "Alias of `trace list -t topaz` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"description": "Alias of `trace list -t topaz -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
|
||||
"notes": [
|
||||
"hf topaz list --frame -> show frame delay times",
|
||||
"hf topaz list -1 -> use trace buffer"
|
||||
|
@ -11803,8 +11819,8 @@
|
|||
}
|
||||
},
|
||||
"metadata": {
|
||||
"commands_extracted": 684,
|
||||
"commands_extracted": 685,
|
||||
"extracted_by": "PM3Help2JSON v1.00",
|
||||
"extracted_on": "2023-07-27T21:41:37"
|
||||
"extracted_on": "2023-08-02T20:39:48"
|
||||
}
|
||||
}
|
|
@ -120,11 +120,12 @@ Check column "offline" for their availability.
|
|||
|`data zerocrossings `|Y |`Count time between zero-crossings`
|
||||
|`data convertbitstream `|Y |`Convert GraphBuffer's 0/1 values to 127 / -127`
|
||||
|`data getbitstream `|Y |`Convert GraphBuffer's >=1 values to 1 and <1 to 0`
|
||||
|`data asn1 `|Y |`asn1 decoder`
|
||||
|`data asn1 `|Y |`ASN1 decoder`
|
||||
|`data atr `|Y |`ATR lookup`
|
||||
|`data bin2hex `|Y |`Converts binary to hexadecimal`
|
||||
|`data bitsamples `|N |`Get raw samples as bitstring`
|
||||
|`data clear `|Y |`Clears bigbuf on deviceside and graph window`
|
||||
|`data diff `|Y |`diff of input files`
|
||||
|`data diff `|Y |`Diff of input files`
|
||||
|`data hexsamples `|N |`Dump big buffer as hex bytes`
|
||||
|`data hex2bin `|Y |`Converts hexadecimal to binary`
|
||||
|`data load `|Y |`Load contents of file into graph window`
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
if [ "$1" = "--help" ] || [ "$1" = "-h" ] || [ "$1" = "" ]; then
|
||||
echo "To report a short string about the current version:"
|
||||
echo " $0 --short"
|
||||
echo "To regenerate version_pm3.c if needed:"
|
||||
echo " $0 [--force] [--undecided] path/to/version_pm3.c"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Output a version_pm3.c file that includes information about the current build
|
||||
# From mkversion.pl
|
||||
# pure sh POSIX as now even on Windows we use WSL or ProxSpace with sh available
|
||||
|
@ -13,6 +21,27 @@ if [ "$1" = "--short" ]; then
|
|||
SHORT=true
|
||||
shift
|
||||
fi
|
||||
FORCE=false
|
||||
if [ "$1" = "--force" ]; then
|
||||
FORCE=true
|
||||
shift
|
||||
fi
|
||||
UNDECIDED=false
|
||||
if [ "$1" = "--undecided" ]; then
|
||||
UNDECIDED=true
|
||||
shift
|
||||
fi
|
||||
VERSIONSRC="$1"
|
||||
|
||||
if ! $SHORT && [ "$VERSIONSRC" = "" ]; then
|
||||
echo "Error: $0 is missing its destination filename"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if $SHORT && [ "$VERSIONSRC" != "" ]; then
|
||||
echo "Error: can't output a short string and generate file at the same time"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if you are making your own fork, change this line to reflect your fork-name
|
||||
fullgitinfo="Iceman"
|
||||
|
@ -27,7 +56,7 @@ if [ "$commandGIT" != "" ]; then
|
|||
# now avoiding the "fatal: No names found, cannot describe anything." error by fallbacking to abbrev hash in such case
|
||||
gitversion=$(git describe --dirty --always)
|
||||
gitbranch=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ "$1" != "--undecided" ]; then
|
||||
if $UNDECIDED; then
|
||||
if [ "$gitversion" != "${gitversion%-dirty}" ]; then
|
||||
clean=0
|
||||
else
|
||||
|
@ -68,7 +97,21 @@ sha=$(
|
|||
if [ "$sha" = "" ]; then
|
||||
sha="no sha256"
|
||||
fi
|
||||
cat <<EOF
|
||||
|
||||
REDO=true
|
||||
if ! $FORCE && [ -f "$VERSIONSRC" ]; then
|
||||
# version src file exists, check if it needs to be updated
|
||||
# file parser quite fragile, be careful if you edit VERSIONSRC template below...
|
||||
oldclean=$(sed '13s/.*\([0-9]\+\).*/\1/;13!d' "$VERSIONSRC")
|
||||
oldfullgitinfo=$(sed '14s/.*"\([^"]*\)".*/\1/;14!d' "$VERSIONSRC")
|
||||
oldsha=$(sed '16s/.*"\([^"]*\)".*/\1/;16!d' "$VERSIONSRC")
|
||||
if [ "$oldclean" = "$clean" ] && [ "$oldfullgitinfo" = "$fullgitinfo" ] && [ "$oldsha" = "$sha" ]; then
|
||||
REDO=false
|
||||
fi
|
||||
fi
|
||||
if $REDO; then
|
||||
# use a tmp file to avoid concurrent call to mkversion to parse a half-written file.
|
||||
cat > "${VERSIONSRC}.tmp" <<EOF
|
||||
#include "common.h"
|
||||
/* Generated file, do not edit */
|
||||
#ifndef ON_DEVICE
|
||||
|
@ -87,3 +130,5 @@ const struct version_information_t SECTVERSINFO g_version_information = {
|
|||
"$sha"
|
||||
};
|
||||
EOF
|
||||
mv "${VERSIONSRC}.tmp" "${VERSIONSRC}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue