9 Commits
Author SHA1 Message Date
GameTec-liveandGitHub c6f37c80df Merge branch 'main' into clang-format 2025-09-02 19:44:58 +02:00
GameTec-liveandGitHub 964904fbfa Merge pull request #285 from jekkos/fix-senested-key-recovery
Fix for mf static nested key recovery
2025-09-02 19:44:25 +02:00
GameTec_live 07e7ed2abd fix: use proper trigger 2025-09-02 19:44:05 +02:00
GameTec-liveandGitHub ea2a9410b3 Merge branch 'main' into fix-senested-key-recovery 2025-09-02 19:40:39 +02:00
GameTec_live 3b0d14759b Revert "fix: run clang format"
This reverts commit 1e79e8bd43.
2025-09-02 19:32:34 +02:00
GameTec_live 9248223a39 doc: changelog 2025-09-02 19:27:42 +02:00
GameTec_live 1e79e8bd43 fix: run clang format 2025-09-02 19:26:13 +02:00
GameTec_live e0790f677b feat: clang formatter 2025-09-02 19:26:01 +02:00
jekkos 62e904f114 Fix for static nested key recovery
When runnin static nested recovery, we run into a sector auth faild
error that stops the recovery process. Add a try/execpt handler so we
can continue to try all possibitlities
2025-08-28 21:55:06 +02:00
6 changed files with 53 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
BreakBeforeBinaryOperators: All
ColumnLimit: 120
BasedOnStyle: Google
BreakBeforeBraces: Stroustrup
IndentWidth: 4
+35
View File
@@ -0,0 +1,35 @@
name: clang-format Check
on:
pull_request_target:
paths:
- '**.c'
- '**.h'
- '**.cpp'
workflow_dispatch:
jobs:
check-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt install -y clang-format
- name: Get files and check format
run: |
exit_code=0
while IFS= read -r -d '' f; do
if ! diff -u "$f" <(clang-format "$f"); then
echo "Formatting issue in $f"
exit_code=1
fi
done < <(find . -type f \( -name '*.c' -o -name '*.h' \) ! -path './firmware/nrf52_sdk/*' ! -path './firmware/nrf52_sdk/**' -print0)
if [ $exit_code -ne 0 ]; then
echo "Clang-format check failed."
exit 1
else
echo "All files are properly formatted."
fi
+2 -1
View File
@@ -1,10 +1,11 @@
name: Lint (pyrefly + ruff)
on:
pull_request:
pull_request_target:
paths:
- "software/**"
- ".github/workflows/**"
- "**.py"
workflow_dispatch:
jobs:
+2
View File
@@ -3,6 +3,8 @@ 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]
- Added clang formatter (@GameTec-live)
- Fix for static nested key recovery (@jekkos)
## [v2.1.0][2025-09-02]
- Added UV, formatter and linter. Contribution guidelines. (@GameTec-live)
+8
View File
@@ -0,0 +1,8 @@
#!/bin/env bash
# Make it a bit less prone to breaking
cd "$(dirname "$0")/.." || exit
while IFS= read -r -d '' f; do
clang-format --verbose -i "$f"
done < <(find . -type f \( -name '*.c' -o -name '*.h' \) ! -path './firmware/nrf52_sdk/*' ! -path './firmware/nrf52_sdk/**' -print0)
+1 -1
View File
@@ -341,7 +341,7 @@ class ChameleonCMD:
})
return resp
@expect_response([Status.HF_TAG_OK, Status.HF_TAG_NO])
@expect_response([Status.HF_TAG_OK, Status.HF_TAG_NO, Status.MF_ERR_AUTH])
def mf1_check_keys_on_block(self, block: int, key_type: int, keys: list[bytes]):
if key_type not in [0x60, 0x61]:
raise ValueError("Wrong key type")