When sending a raw APDU with the debug flag (-d) enabled, gp says Error: Index 4 out of bounds for length 4
java -jar tool/target/gp.jar --applet 0F00BA0000000101 -a "80 00 00 00" -d
# gp --applet 0F00BA0000000101 -a 80 00 00 00 -d
# GlobalPlatformPro v21.12.31-55-g52c3581
# Running on Mac OS X 14.2.1 aarch64, Java 17.0.7 by Oracle Corporation
# SCardConnect("ACS ACR1252 Dual Reader PICC", T=*) -> T=1, 3B8580018073C821100E
A>> T=1 (4+0008) 00A40400 08 0F00BA0000000101
A<< (0000+2) (18ms) 9000
Error: Index 4 out of bounds for length 4
# SCardDisconnect("ACS ACR1252 Dual Reader PICC", false) tx:13/rx:2 in 97ms
using the verbose -v flag works as expected
java -jar tool/target/gp.jar --applet 0F00BA0000000101 -a "80 00 00 00" -v
# gp --applet 0F00BA0000000101 -a 80 00 00 00 -v
# GlobalPlatformPro v21.12.31-55-g52c3581
# Running on Mac OS X 14.2.1 aarch64, Java 17.0.7 by Oracle Corporation
# Selecting 0F00BA0000000101
48656c6c6f
# Warning: no keys given, defaulting to 404142434445464748494A4B4C4D4E4F
other commands such as --list works as expected with the debug flag.
java -jar tool/target/gp.jar -l -key c212e073ff8b4bbfaff4de8ab655221f -d
# gp -l -key c212e073ff8b4bbfaff4de8ab655221f -d
# GlobalPlatformPro v21.12.31-55-g52c3581
# Running on Mac OS X 14.2.1 aarch64, Java 17.0.7 by Oracle Corporation
# SCardConnect("ACS ACR1252 Dual Reader PICC", T=*) -> T=1, 3B8580018073C821100E
...
ignored data
...
# SCardDisconnect("ACS ACR1252 Dual Reader PICC", false) tx:104/rx:276 in 239ms
Describe the bug
When sending a raw APDU with the debug flag (
-d
) enabled, gp saysError: Index 4 out of bounds for length 4
using the verbose
-v
flag works as expectedother commands such as
--list
works as expected with the debug flag.Information about your card and used reader
As much information as you have:
Full log
Re-run your command with
-d -v -i
switches and:Additional context