}
}
public static void execTestScript(CardChannel channel) throws Exception {
CommandAPDU select = new CommandAPDU(
0x00, // class
0xA4, // command
0x04, // op1
0x00, // op2
new byte[] {
//AID of applet
//(byte)0xA0, 0x00, 0x00, 0x00, 0x04, (byte)0x99, (byte)0x99, (byte)0xD6, 0x43, 0x07 //SOC
//(byte)0xA0, 0x00, 0x00, 0x00, 0x04, (byte)0x99, (byte)0x99, (byte)0xD6, 0x43, 0x01 //MED
//(byte)0xA0, 0x00, 0x00, 0x00, 0x04, (byte)0x99, (byte)0x99, (byte)0xD6, 0x43, 0x02 //DLO
//(byte)0x32, 0x50, 0x41, 0x59, 0x2E, (byte)0x53, (byte)0x59, (byte)0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31 //PSE
(byte)0xA0, 0x00, 0x00, 0x00, 0x04, (byte)0x10, (byte)0x10 //MASTERCARD
}
);
ResponseAPDU r = channel.transmit(select);
Messages msg = Messages.findMessage(r);
if (!msg.isOk()) {
System.out.println("Cannot select applet");
return;
}
for(int file = 0; file<16; file++) {
System.out.println("READ FILE:" + file);
for(int rec = 0; rec<16; rec++) {
int EF = getFile(file);
CommandAPDU command = new CommandAPDU(0x00, 0xB2, rec, EF, 256);
r = channel.transmit(command);
msg = Messages.findMessage(r);
if (msg.isOk()) {
System.out.println("\nFOUND RECORD OK: file:" + file + "rec:" + rec);
//System.out.println("REQUEST: " + Converter.hexDump(command.getBytes()));