67 lines
1.5 KiB
Text
67 lines
1.5 KiB
Text
// test my applet
|
|
establish_context
|
|
enable_trace
|
|
enable_timer
|
|
card_connect
|
|
// select
|
|
send_apdu -sc 0 -APDU 00A40400080102030405060809
|
|
|
|
// Public Command
|
|
send_apdu -sc 0 -APDU 80000000
|
|
|
|
// Locked Commands
|
|
send_apdu -sc 0 -APDU 8002000002FFFE
|
|
|
|
// Send Wrong PIN
|
|
send_apdu -sc 0 -APDU 802000000431313131
|
|
|
|
// Still Locked Commands
|
|
send_apdu -sc 0 -APDU 8004000000
|
|
|
|
// Unlock Card With Correct PIN
|
|
send_apdu -sc 0 -APDU 802000000431323334
|
|
|
|
// Now Unlocked Commands
|
|
send_apdu -sc 0 -APDU 8002000002FFFE
|
|
send_apdu -sc 0 -APDU 8004000001
|
|
|
|
// Query Author Name
|
|
send_apdu -sc 0 -APDU 80000000
|
|
|
|
// Store Data
|
|
send_apdu -sc 0 -APDU 8002000002FFFE
|
|
|
|
// Querying Data
|
|
send_apdu -sc 0 -APDU 8004000001
|
|
send_apdu -sc 0 -APDU 8004000002
|
|
|
|
// Triggering Unsupported Instruction Error
|
|
send_apdu -sc 0 -APDU 8001000000
|
|
|
|
// Triggering Unsupported CLA Error
|
|
send_apdu -sc 0 -APDU 9001000000
|
|
|
|
// Sending Too Many Bytes (> 20)
|
|
send_apdu -sc 0 -APDU 80020000150102030405060708090A0B0C0D0E0F101112131415
|
|
|
|
// Querying Incorrect Amount of Bytes
|
|
send_apdu -sc 0 -APDU 8002000002FFFE
|
|
send_apdu -sc 0 -APDU 8004000003
|
|
|
|
// De- and re-select applet
|
|
card_disconnect
|
|
card_connect
|
|
send_apdu -sc 0 -APDU 00A40400080102030405060809
|
|
|
|
// Exceed maximum of PIN unlock trials
|
|
send_apdu -sc 0 -APDU 802000000431313131
|
|
send_apdu -sc 0 -APDU 802000000431313131
|
|
send_apdu -sc 0 -APDU 802000000431313131
|
|
|
|
// De- and re-select applet in locked state
|
|
card_disconnect
|
|
card_connect
|
|
send_apdu -sc 0 -APDU 00A40400080102030405060809
|
|
|
|
card_disconnect
|
|
release_context
|