Change output of ultralight cat to the customary 4 bytes per line

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@209 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
hploetz 2007-06-02 06:58:48 +00:00
parent a5e9ead166
commit b56cd37306
2 changed files with 3 additions and 1 deletions

View File

@ -96,6 +96,7 @@ class Card_with_80_aa(Card_with_ls):
class Card_with_read_binary:
DATA_UNIT_SIZE=1
HEXDUMP_LINELEN=16
def read_binary_file(self, offset = 0):
"""Read from the currently selected EF.
@ -127,7 +128,7 @@ class Card_with_read_binary:
"Print a hexdump of the currently selected file (e.g. consecutive READ BINARY)"
contents = self.read_binary_file()
self.last_result = R_APDU(contents + self.last_sw)
print utils.hexdump(contents)
print utils.hexdump(contents,linelen=self.HEXDUMP_LINELEN)
COMMANDS = {
"cat": cmd_cat,

View File

@ -75,6 +75,7 @@ class Mifare_Classic_4k_Card(Mifare_Classic_Card):
class Mifare_Ultralight_Card(Mifare_Card):
DRIVER_NAME = ["Mifare Ultralight"]
HEXDUMP_LINELEN = 4
ATRS = [
# Ultralight