windows-nt/Source/XPSP1/NT/drivers/smartcrd/ifdtest/ifdtest.dat
2020-09-26 16:20:57 +08:00

203 lines
6.9 KiB
Plaintext

#
# Script file for smart card driver test program
#
# Structure of this file:
# Write the name of a card in square braces, e.g. [&MyCard]
# The character after '&' is the short cut letter in the menu (In this case 'M')
# All lines thereafter are considered commands for that particular card
# A command is: CommandName, Protocol (T0 or T1), TPDU
# The driver test program does not check the validity of any command.
# All TPDU bytes are in hex. Use the line continuation character '\' for
# commands that do not fit on one line.
#
#
# Siemens
#
[&SiCrypt]
&GetChallenge, 08, 84, 00, 00\
08
SelectFile &EFdir (a1), 00, A4, 00, 00, 02, 2f, 00, 00
ReadBinary &44h bytes (a2), 00, B0, 00, 00, 44
Verify &PwdG0 (b1), 00, 20, 00, 01, 08, "12345678"
SelectFile SiCrypt &WS (b2), 00, a4, 08, 04, 06, 31, 00, 33, 00, 33, 32, 40
WriteBinary Pattern &A (b3.1), 00, d6, 00, 00, 80 \
00, 01, 02, 03, 04, 05, 06, 07 \
08, 09, 0a, 0b, 0c, 0d, 0e, 0f \
10, 11, 12, 13, 14, 15, 16, 17 \
18, 19, 2a, 2b, 2c, 2d, 2e, 2f \
20, 21, 22, 23, 24, 25, 26, 27 \
28, 29, 2a, 2b, 2c, 2d, 2e, 2f \
30, 31, 32, 33, 34, 35, 36, 37 \
38, 39, 3a, 3b, 3c, 3d, 3e, 3f \
40, 41, 42, 43, 44, 45, 46, 47 \
48, 49, 4a, 4b, 4c, 4d, 4e, 4f \
50, 51, 52, 53, 54, 55, 56, 57 \
58, 59, 5a, 5b, 5c, 5d, 5e, 5f \
60, 61, 62, 63, 64, 65, 66, 67 \
68, 69, 6a, 6b, 6c, 6d, 6e, 6f \
70, 71, 72, 73, 74, 75, 76, 77 \
78, 79, 7a, 7b, 7c, 7d, 7e, 7f
WriteBinary Pattern &B (b3.2), 00, d6, 00, 00, 80 \
7f, 7e, 7d, 7c, 7b, 7a, 79, 78 \
77, 76, 75, 74, 73, 72, 71, 70 \
6f, 6e, 6d, 6c, 6b, 6a, 69, 68 \
67, 66, 65, 64, 63, 62, 61, 60 \
5f, 5e, 5d, 5c, 5b, 5a, 59, 58 \
57, 56, 55, 54, 53, 52, 51, 50 \
4f, 4e, 4d, 4c, 4b, 4a, 49, 48 \
47, 46, 45, 44, 43, 42, 41, 40 \
3f, 3e, 3d, 3c, 3b, 3a, 39, 38 \
37, 36, 35, 34, 33, 32, 31, 30 \
2f, 2e, 2d, 2c, 2b, 2a, 29, 28 \
27, 26, 25, 24, 23, 22, 21, 20 \
1f, 1e, 1d, 1c, 1b, 1a, 19, 18 \
17, 16, 15, 14, 13, 12, 11, 10 \
0f, 0e, 0d, 0c, 0b, 0a, 09, 08 \
07, 06, 05, 04, 03, 02, 01, 00
WriteBinary Pattern &C (b3.2), 00, d6, 00, 00, ff \
00, 00, 00, 00, 00, 00, 00, 00 \
00, 00, 00, 00, 00, 00, 00, 00 \
01, 00, 00, 00, 00, 00, 00, 00 \
01, 00, 00, 00, 00, 00, 00, 00 \
02, 00, 00, 00, 00, 00, 00, 00 \
02, 00, 00, 00, 00, 00, 00, 00 \
03, 00, 00, 00, 00, 00, 00, 00 \
03, 00, 00, 00, 00, 00, 00, 00 \
04, 00, 00, 00, 00, 00, 00, 00 \
04, 00, 00, 00, 00, 00, 00, 00 \
05, 00, 00, 00, 00, 00, 00, 00 \
05, 00, 00, 00, 00, 00, 00, 00 \
06, 00, 00, 00, 00, 00, 00, 00 \
06, 00, 00, 00, 00, 00, 00, 00 \
07, 00, 00, 00, 00, 00, 00, 00 \
07, 00, 00, 00, 00, 00, 00, 00 \
08, 00, 00, 00, 00, 00, 00, 00 \
08, 00, 00, 00, 00, 00, 00, 00 \
09, 00, 00, 00, 00, 00, 00, 00 \
09, 00, 00, 00, 00, 00, 00, 00 \
0a, 00, 00, 00, 00, 00, 00, 00 \
0a, 00, 00, 00, 00, 00, 00, 00 \
0b, 00, 00, 00, 00, 00, 00, 00 \
0b, 00, 00, 00, 00, 00, 00, 00 \
0c, 00, 00, 00, 00, 00, 00, 00 \
0c, 00, 00, 00, 00, 00, 00, 00 \
0d, 00, 00, 00, 00, 00, 00, 00 \
0d, 00, 00, 00, 00, 00, 00, 00 \
0e, 00, 00, 00, 00, 00, 00, 00 \
0e, 00, 00, 00, 00, 00, 00, 00 \
0f, 00, 00, 00, 00, 00, 00, 00 \
0f, 00, 00, 00, 00, 00, 00
ReadBinary &80h bytes (b4), 00, B0, 00, 00, 80
ReadBinary &FFh bytes , 00, B0, 00, 00, FF
SelectFile C&ID, 00, A4, 08, 0C, 02, 00, 03, FF
#
# Schlumberger CryptoFlex
#
[&CryptoFlex]
&GetChallenge, C0, 84, 0, 0, 8
&Verify (Key_Ext01), F0, 2A, 0, 1, 8, 50, 43, 53, 43, 4C, 49, 56, 45
&CreateFile, F0, E0, FF, 00, 10 \
00, 00, 00, C8, 3F, 05, 01, 00, 00, 00, 00, 01, 03, 00, 00, 00
&SelectFile, C0, A4, 00, 00, 02, 3F, 05
UpdateBinary Pattern &A, C0, D6, 00, 00, 80 \
00, 01, 02, 03, 04, 05, 06, 07 \
08, 09, 0a, 0b, 0c, 0d, 0e, 0f \
10, 11, 12, 13, 14, 15, 16, 17 \
18, 19, 2a, 2b, 2c, 2d, 2e, 2f \
20, 21, 22, 23, 24, 25, 26, 27 \
28, 29, 2a, 2b, 2c, 2d, 2e, 2f \
30, 31, 32, 33, 34, 35, 36, 37 \
38, 39, 3a, 3b, 3c, 3d, 3e, 3f \
40, 41, 42, 43, 44, 45, 46, 47 \
48, 49, 4a, 4b, 4c, 4d, 4e, 4f \
50, 51, 52, 53, 54, 55, 56, 57 \
58, 59, 5a, 5b, 5c, 5d, 5e, 5f \
60, 61, 62, 63, 64, 65, 66, 67 \
68, 69, 6a, 6b, 6c, 6d, 6e, 6f \
70, 71, 72, 73, 74, 75, 76, 77 \
78, 79, 7a, 7b, 7c, 7d, 7e, 7f
UpdateBinary Pattern &B, C0, D6, 00, 00, 80 \
7f, 7e, 7d, 7c, 7b, 7a, 79, 78 \
77, 76, 75, 74, 73, 72, 71, 70 \
6f, 6e, 6d, 6c, 6b, 6a, 69, 68 \
67, 66, 65, 64, 63, 62, 61, 60 \
5f, 5e, 5d, 5c, 5b, 5a, 59, 58 \
57, 56, 55, 54, 53, 52, 51, 50 \
4f, 4e, 4d, 4c, 4b, 4a, 49, 48 \
47, 46, 45, 44, 43, 42, 41, 40 \
3f, 3e, 3d, 3c, 3b, 3a, 39, 38 \
37, 36, 35, 34, 33, 32, 31, 30 \
2f, 2e, 2d, 2c, 2b, 2a, 29, 28 \
27, 26, 25, 24, 23, 22, 21, 20 \
1f, 1e, 1d, 1c, 1b, 1a, 19, 18 \
17, 16, 15, 14, 13, 12, 11, 10 \
0f, 0e, 0d, 0c, 0b, 0a, 09, 08 \
07, 06, 05, 04, 03, 02, 01, 00
UpdateBinary Pattern &C, C0, D6, 00, 00, FF \
00, 00, 00, 00, 00, 00, 00, 00 \
00, 00, 00, 00, 00, 00, 00, 00 \
01, 00, 00, 00, 00, 00, 00, 00 \
01, 00, 00, 00, 00, 00, 00, 00 \
02, 00, 00, 00, 00, 00, 00, 00 \
02, 00, 00, 00, 00, 00, 00, 00 \
03, 00, 00, 00, 00, 00, 00, 00 \
03, 00, 00, 00, 00, 00, 00, 00 \
04, 00, 00, 00, 00, 00, 00, 00 \
04, 00, 00, 00, 00, 00, 00, 00 \
05, 00, 00, 00, 00, 00, 00, 00 \
05, 00, 00, 00, 00, 00, 00, 00 \
06, 00, 00, 00, 00, 00, 00, 00 \
06, 00, 00, 00, 00, 00, 00, 00 \
07, 00, 00, 00, 00, 00, 00, 00 \
07, 00, 00, 00, 00, 00, 00, 00 \
08, 00, 00, 00, 00, 00, 00, 00 \
08, 00, 00, 00, 00, 00, 00, 00 \
09, 00, 00, 00, 00, 00, 00, 00 \
09, 00, 00, 00, 00, 00, 00, 00 \
0a, 00, 00, 00, 00, 00, 00, 00 \
0a, 00, 00, 00, 00, 00, 00, 00 \
0b, 00, 00, 00, 00, 00, 00, 00 \
0b, 00, 00, 00, 00, 00, 00, 00 \
0c, 00, 00, 00, 00, 00, 00, 00 \
0c, 00, 00, 00, 00, 00, 00, 00 \
0d, 00, 00, 00, 00, 00, 00, 00 \
0d, 00, 00, 00, 00, 00, 00, 00 \
0e, 00, 00, 00, 00, 00, 00, 00 \
0e, 00, 00, 00, 00, 00, 00, 00 \
0f, 00, 00, 00, 00, 00, 00, 00 \
0f, 00, 00, 00, 00, 00, 00
UpdateBinary Pattern &D, C0, D6, 00, 00, 00
ReadBinary &00h bytes, C0, B0, 00, 00, 00
ReadBinary &80h bytes, C0, B0, 00, 00, 80
ReadBinary &FFh bytes, C0, B0, 00, 00, FF
#
# Scot 110
# Note: Valid Pin is a special case where only 4 bytes are submitted to the card
#
[Sc&OtT110]
&GetChallenge, BC, C4, 00, 00, 08
&ReadFile, BC, B0, 00, 00, 00
&Submit PIN, BC, 20, 00, 00, 04, 12, 54, 3f, ff
&Valid PIN, BC, 40, 00, 00
#
# Bull TB 100
#
[&Bull TB100]
Submit&Pin, BC, 20, 00, 00, 08, FF, FF, FF, FF, FF, FF, 49, 50
Select&File, BC, A4, 00, 00, 02, 2F, 02
Read &256 bytes, BC, B0, 00, 00, 00
Read &4 bytes, BC, B0, 00, 00, 04
&SelectFile, BC, A4, 00, 00, 02, 2F, 01
&EraseFile, BC, 0E, 00, 00, 02, 00, 78