HWBTutorials/hwb1/tests/MyApplet.txt

68 lines
1.5 KiB
Plaintext
Raw Normal View History

// test my applet
establish_context
enable_trace
enable_timer
card_connect
// select
send_apdu -sc 0 -APDU 00A40400080102030405060809
2023-11-03 00:43:37 +00:00
// Public Command
send_apdu -sc 0 -APDU 80000000
2023-10-24 21:13:13 +00:00
// Locked Commands
send_apdu -sc 0 -APDU 8002000002FFFE
2023-10-24 21:22:27 +00:00
// Send Wrong PIN
send_apdu -sc 0 -APDU 802000000431313131
// Still Locked Commands
2023-11-03 00:43:18 +00:00
send_apdu -sc 0 -APDU 8004000000
2023-10-24 21:13:13 +00:00
2023-10-24 21:22:27 +00:00
// Unlock Card With Correct PIN
send_apdu -sc 0 -APDU 802000000431323334
// Now Unlocked Commands
send_apdu -sc 0 -APDU 8002000002FFFE
2023-11-03 00:43:18 +00:00
send_apdu -sc 0 -APDU 8004000001
2023-10-24 21:13:13 +00:00
// Query Author Name
send_apdu -sc 0 -APDU 80000000
// Store Data
send_apdu -sc 0 -APDU 8002000002FFFE
// Querying Data
2023-11-03 00:43:18 +00:00
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
2023-11-03 00:43:18 +00:00
send_apdu -sc 0 -APDU 8004000003
2023-11-03 01:01:31 +00:00
// 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