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:
parent
a5e9ead166
commit
b56cd37306
|
@ -96,6 +96,7 @@ class Card_with_80_aa(Card_with_ls):
|
||||||
|
|
||||||
class Card_with_read_binary:
|
class Card_with_read_binary:
|
||||||
DATA_UNIT_SIZE=1
|
DATA_UNIT_SIZE=1
|
||||||
|
HEXDUMP_LINELEN=16
|
||||||
|
|
||||||
def read_binary_file(self, offset = 0):
|
def read_binary_file(self, offset = 0):
|
||||||
"""Read from the currently selected EF.
|
"""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)"
|
"Print a hexdump of the currently selected file (e.g. consecutive READ BINARY)"
|
||||||
contents = self.read_binary_file()
|
contents = self.read_binary_file()
|
||||||
self.last_result = R_APDU(contents + self.last_sw)
|
self.last_result = R_APDU(contents + self.last_sw)
|
||||||
print utils.hexdump(contents)
|
print utils.hexdump(contents,linelen=self.HEXDUMP_LINELEN)
|
||||||
|
|
||||||
COMMANDS = {
|
COMMANDS = {
|
||||||
"cat": cmd_cat,
|
"cat": cmd_cat,
|
||||||
|
|
|
@ -75,6 +75,7 @@ class Mifare_Classic_4k_Card(Mifare_Classic_Card):
|
||||||
|
|
||||||
class Mifare_Ultralight_Card(Mifare_Card):
|
class Mifare_Ultralight_Card(Mifare_Card):
|
||||||
DRIVER_NAME = ["Mifare Ultralight"]
|
DRIVER_NAME = ["Mifare Ultralight"]
|
||||||
|
HEXDUMP_LINELEN = 4
|
||||||
|
|
||||||
ATRS = [
|
ATRS = [
|
||||||
# Ultralight
|
# Ultralight
|
||||||
|
|
Loading…
Reference in New Issue