[Pcsclite-git-commit] [PCSC] 02/06: SCardGetAttrib.py: display the values in ASCII

Ludovic Rousseau rousseau at moszumanska.debian.org
Fri May 20 16:12:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit 88b2085b9c60c7a99aa1306187ad77ce1670a8eb
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Fri May 20 15:39:20 2016 +0200

    SCardGetAttrib.py: display the values in ASCII
    
    Display the attributes values also in ASCII.
    
    The output is now something like:
    PC/SC Readers: ['Gemalto PC Twin Reader (70D7E2EE) 00 00']
    reader: Gemalto PC Twin Reader (70D7E2EE) 00 00
    0x10103 [55, 48, 68, 55, 69, 50, 69, 69, 0] 37 30 44 37 45 32 45 45 00
    70D7E2EE
    0x90303 [59, 167, 0, 64, 24, 128, 101, 162, 8, 1, 1, 82] 3B A7 00 40 18
    80 65 A2 08 01 01 52 ;�@�eR
---
 UnitaryTests/SCardGetAttrib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UnitaryTests/SCardGetAttrib.py b/UnitaryTests/SCardGetAttrib.py
index 738bfa9..98b5472 100755
--- a/UnitaryTests/SCardGetAttrib.py
+++ b/UnitaryTests/SCardGetAttrib.py
@@ -23,7 +23,7 @@
 
 from smartcard.scard import *
 from smartcard.pcsc.PCSCExceptions import *
-from smartcard.util import toHexString
+from smartcard.util import toHexString, toASCIIString
 
 hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
 if hresult != SCARD_S_SUCCESS:
@@ -47,7 +47,7 @@ for reader in readers:
         if hresult != SCARD_S_SUCCESS:
             print SCardGetErrorMessage(hresult)
         else:
-            print attrib, toHexString(attrib)
+            print attrib, toHexString(attrib), toASCIIString(attrib)
 
     hresult = SCardDisconnect(hcard, SCARD_LEAVE_CARD)
     if hresult != SCARD_S_SUCCESS:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list