Eric-Bourry / pssi

PSSI (Python Simple Smartcard Interpreter) is a Python script that provides an abstract layer for smartcard reading. Thanks to it, it is possible to read a smartcard by simply adding its structure in the form of a plugin, without taking care of the communication layer. The tool comes with several plugins, namely SIM, EMV, Navigo and Belgian eID.
GNU General Public License v3.0
22 stars 4 forks source link

code = value[0] IndexError: list index out of range #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insert an old bank card
2. $ ./pssi.py plugins/emv
3.

What is the expected output?
  File "./pssi.py", line 108, in <module>
    main()
  File "./pssi.py", line 100, in main
    dumper.startDump()
  File "/Users/rousseau/Documents/sc/pssi/trunk/pssi/dumper.py", line 35, in startDump
    content = structure_parser.parseCard(card)
  File "/Users/rousseau/Documents/sc/pssi/trunk/pssi/structure_parser.py", line 338, in parseCard
    card["Content"] = parseCardStruct(connection, plugin.getRootStructure())
  File "/Users/rousseau/Documents/sc/pssi/trunk/pssi/structure_parser.py", line 229, in parseCardStruct
    entry[addr] = parseCardStruct(connection, field[3], [], sizeParsed, defaultStruct)
  File "/Users/rousseau/Documents/sc/pssi/trunk/pssi/structure_parser.py", line 136, in parseCardStruct
    entry[number] = parseCardStruct(connection, defaultStruct, cardData, sizeParsed, defaultStruct)
  File "/Users/rousseau/Documents/sc/pssi/trunk/pssi/structure_parser.py", line 310, in parseCardStruct
    interpretation = interpretFinalField(value, field[4], name)
  File "/Users/rousseau/Documents/sc/pssi/trunk/pssi/structure_parser.py", line 42, in interpretFinalField
    interpretation = interpreterTable[type](value)
  File "plugins/emv/interpreters.py", line 108, in interpretTransactionType
    code = value[0]
IndexError: list index out of range

What do you see instead?
no crash

What version of the product are you using? On what operating system?

Please provide any additional information below.
When the interpretTransactionType() crashes the variable value contains an 
empty array [].

Original issue reported on code.google.com by ludovic....@gmail.com on 11 Nov 2010 at 11:05

GoogleCodeExporter commented 9 years ago
Revision 40 should fix this issue. Could you please check ?

Original comment by eric.bou...@gmail.com on 11 Nov 2010 at 3:18

GoogleCodeExporter commented 9 years ago
I can't reproduce the problem. I think the problem is solved.

Original comment by ludovic....@gmail.com on 11 Nov 2010 at 7:25

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by eric.bou...@gmail.com on 11 Nov 2010 at 7:31