diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb4b7276..8a5985436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 `hw tearoff` - the device side message is now debug log controlled (@iceman1001) - Changed `pm3.sh` - Serial ports enumeration on Proxspace3.xx / MINGW environments, now using powershell.exe since wmic is deprecated (@iceman1001) - Fixed and updated `hf iclass trbl` to correctly use the credit key when passed and show partial tearoff results (@antiklesys) - Fixed `hf iclass legbrute` was not correctly parsin the index value diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 0929f80c5..30ac348a6 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -104,7 +104,7 @@ int tearoff_hook(void) { SpinDelayUsPrecision(g_tearoff_delay_us); FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); g_tearoff_enabled = false; - Dbprintf(_YELLOW_("Tear-off triggered!")); + if (g_dbglevel >= DBG_ERROR) Dbprintf(_YELLOW_("Tear-off triggered!")); return PM3_ETEAROFF; } else { return PM3_SUCCESS; // SUCCESS = the hook didn't do anything diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 13725b392..29ae77a75 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -3009,6 +3009,7 @@ static int CmdHFiClass_TearBlock(const char *Cmd) { int tearoff_loop = arg_get_int_def(ctx, 15, 1); int loop_count = 0; + if (tearoff_end <= tearoff_start) { PrintAndLogEx(ERR, "Tearoff end delay must be bigger than the start delay."); return PM3_EINVARG; diff --git a/doc/commands.json b/doc/commands.json index 4c173f86a..264bc4140 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -3738,11 +3738,11 @@ "--nr replay of NR/MAC", "-v, --verbose verbose output", "--shallow use shallow (ASK) reader modulation instead of OOK", - "--tdb tearoff delay start (in us) must be between 1 and 43000 (43ms). Precision is about 1/3us.", - "--incr tearoff delay increment (in us) - default 10.", - "--tde tearoff delay end (in us) must be a higher value than the start delay." + "--s tearoff delay start (in us) must be between 1 and 43000 (43ms). Precision is about 1/3us.", + "--i tearoff delay increment (in us) - default 10.", + "--e tearoff delay end (in us) must be a higher value than the start delay." ], - "usage": "hf iclass trbl [-hv] [-k ] [--ki ] --blk -d [-m ] [--credit] [--elite] [--raw] [--nr] [--shallow] --tdb [--incr ] [--tde ]" + "usage": "hf iclass trbl [-hv] [-k ] [--ki ] --blk -d [-m ] [--credit] [--elite] [--raw] [--nr] [--shallow] --s [--i ] [--e ]" }, "hf iclass unhash": { "command": "hf iclass unhash", @@ -13352,6 +13352,6 @@ "metadata": { "commands_extracted": 767, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2025-05-19T11:17:19" + "extracted_on": "2025-05-23T08:30:58" } } diff --git a/pm3 b/pm3 index ae87617b6..5122fe536 100755 --- a/pm3 +++ b/pm3 @@ -142,9 +142,9 @@ function get_pm3_list_Windows { #prevent soft bricking when using pm3-flash-all on an outdated bootloader if [ $(basename -- "$0") = "pm3-flash-all" ]; then - + line=$($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object {\$_.DeviceID -eq '$_comport'} | Select -expandproperty PNPDeviceID" 2>/dev/null); - + if [[ ! $line =~ ^"USB\VID_9AC4&PID_4B8F\ICEMAN" ]]; then echo -e "\033[0;31m[!] Using pm3-flash-all on an oudated bootloader, use pm3-flash-bootrom first!" exit 1 @@ -169,7 +169,7 @@ function get_pm3_list_Windows { #white BT dongle SERIAL PORTS (COM) if $FINDBTDONGLE; then - + for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object PNPDeviceID -like '*VID_10C4&PID_EA60*' | Select -expandproperty DeviceID" 2>/dev/null); do PM3LIST+=("$DEV") if [ ${#PM3LIST[*]} -ge "$N" ]; then