Project

General

Profile

Actions

Feature #5275

closed

"export" and "read_*" should include the SW if reading a file fails

Added by laforge about 2 months ago. Updated 29 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
Start date:
10/20/2021
Due date:
% Done:

100%

Spec Reference:

Description

When dumping files fails, it would be good if the comment would not just state "failed to read" but also the SW (hex and string-decoded) why it failed.

Example:

################################################################################
# MF/DF.SYSTEM/EF.CHV1                                                         #
################################################################################
# directory: MF/DF.SYSTEM (3f00/a515)
# file: EF.CHV1 (6f01)
# structure: transparent
select MF
select DF.SYSTEM
select EF.CHV1
# bad file: MF/DF.SYSTEM/EF.CHV1, Failed to read (offset 0)

The same actually also applies to the normal case, when "read_binary" or "read_binary_decoded":

pySIM-shell (MF/DF.SYSTEM/EF.CHV1)> read_binary
EXCEPTION of type 'ValueError' occurred with message: 'Failed to read (offset 0)'
To enable full traceback, run the following command: 'set debug true'

Where the SW is not printed and/or decoded in the exception.

Actions #1

Updated by dexter about 1 month ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 70

The reason for this is that we do not use send_apdu instead of send_apdu_checksw. The latter throws an exception that prints the status word.

See also: https://gerrit.osmocom.org/c/pysim/+/26055

Actions #2

Updated by dexter about 1 month ago

  • % Done changed from 70 to 90
Actions #3

Updated by dexter 29 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)