//(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()));
System.out.println("response: " + r.toString());
System.out.println("raw: " + Converter.hexDump(r.getData()));
System.out.println("cp1251: " + new String(r.getData(), "windows-1251"));