make style

This commit is contained in:
iceman1001 committed 2026-11-09 12:32:20 +07:00
1 parent e3ec14f437
commit 648cbf159c
8 files changed
+37 -31

No files matched your search

+3 -3
View File
@@ -258,13 +258,13 @@ def run_reset_step(counter_index: str, delay_bd: int, delay_00: int) -> None:
def tune_delay(delay_bd: int, previous_counter: int, current_counter: int, locked: bool) -> int:
"""Tune BD delay based on counter changes.
Args:
delay_bd: Current BD delay in microseconds
previous_counter: Previous counter value for comparison
current_counter: Current counter value
locked: If True, delay is locked and not adjusted
Returns:
Adjusted delay_bd value
"""
@@ -375,7 +375,7 @@ class StopListener:
def calibrate_bd_delay(counter_index: str, stop: StopListener) -> Tuple[Optional[int], Optional[int]]:
"""Auto-calibrate BD delay for tear-off.
Returns:
Tuple of (delay_bd, delay_00) where delay_00 is calculated as delay_bd - DELAY_00_OFFSET,
or (None, None) if calibration failed.
+3 -3
View File
@@ -5,7 +5,7 @@
# Tag contents (NTAG) are encrypted are contain a security record computed from card UUID,
# therefore cloning a card contents to another one will not work and such tag will be rejected by a printer.
# You need a Proxmark3 card dump in PM3 bin or json file. Patching will modify this dump so you need to
# You need a Proxmark3 card dump in PM3 bin or json file. Patching will modify this dump so you need to
# upload it again to a card.
# Note that Niimbot mobile app keeps copy of those values on their servers so resetting the tag print counter
@@ -184,7 +184,7 @@ class LabelTag:
field_value = pack("<B", value)
self.vendor_data[offset : offset + 1] = field_value
def uint32_to_field(self, offset, value: int) -> None:
def uint32_to_field(self, offset, value: int) -> None:
field_value = pack("<I", value)
self.vendor_data[offset : offset + 4] = field_value
@@ -279,7 +279,7 @@ class LabelTag:
@print_counter_crc32.setter
def print_counter_crc32(self, value:int):
return self.uint32_to_field(self.PRINT_COUNTER_CRC32_OFFSET, value)
@property
def print_limit(self) -> int:
+4 -4
View File
@@ -1840,7 +1840,7 @@ static int calypso_select_file_id_with_p1_fallback(uint16_t file_id, bool check_
sAPDU_t apdu = {0x00, ISO7816_SELECT_FILE, CALYPSO_SELECT_CURRENT_DF_P1, CALYPSO_SELECT_CURRENT_DF_P2, sizeof(file_id_data), file_id_data};
int res = calypso_exchange_select(apdu, response);
if (res != PM3_SUCCESS || (calypso_select_sw_has_file(response->sw) &&
(check_lid == false || calypso_fcp_matches_lid(response->data, response->len, file_id)))) {
(check_lid == false || calypso_fcp_matches_lid(response->data, response->len, file_id)))) {
return res;
}
@@ -1878,12 +1878,12 @@ static int calypso_select_file_path(const uint16_t *path, size_t path_len, calyp
static int calypso_select_file_path_then_id_fallback(const uint16_t *path, size_t path_len, uint16_t file_id, const calypso_dump_profile_t *profile, calypso_apdu_response_t *response) {
const calypso_dump_node_t *node = calypso_dump_profile_unique_lid_node(profile,
&(calypso_dump_node_t) {.has_select_lid = true, .select_lid = file_id});
&(calypso_dump_node_t) {.has_select_lid = true, .select_lid = file_id});
bool check_lid = node != NULL && node->select_aid_len > 0;
if (path != NULL && path_len > 0) {
int res = calypso_select_file_path(path, path_len, response);
if (res != PM3_SUCCESS || (calypso_select_sw_has_file(response->sw) &&
(check_lid == false || calypso_fcp_matches_lid(response->data, response->len, file_id)))) {
(check_lid == false || calypso_fcp_matches_lid(response->data, response->len, file_id)))) {
return res;
}
@@ -1893,7 +1893,7 @@ static int calypso_select_file_path_then_id_fallback(const uint16_t *path, size_
const uint16_t legacy_path[] = {file_id, file_id};
res = calypso_select_file_path(legacy_path, ARRAYLEN(legacy_path), response);
if (res != PM3_SUCCESS || (calypso_select_sw_has_file(response->sw) &&
(check_lid == false || calypso_fcp_matches_lid(response->data, response->len, file_id)))) {
(check_lid == false || calypso_fcp_matches_lid(response->data, response->len, file_id)))) {
return res;
}
}
+2 -2
View File
@@ -9217,7 +9217,7 @@ static void DesfireViewPrintApp(const desfire_dump_app_t *app) {
}
static int desfire_etest_probe_result(const PacketResponseNG *resp, bool json,
char *fields, size_t fields_len);
char *fields, size_t fields_len);
static int CmdHF14ADesSim(const char *Cmd) {
CLIParserContext *ctx;
@@ -9332,7 +9332,7 @@ static void desfire_etest_hex(char *dst, size_t dstlen, const uint8_t *src, size
}
static int desfire_etest_probe_result(const PacketResponseNG *resp, bool json,
char *fields, size_t fields_len) {
char *fields, size_t fields_len) {
if (resp->length != sizeof(desfire_sim_probe_result_t)) {
return PM3_EFAILED;
}