Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
7.1 KiB

  1. #
  2. # Script file for smart card driver test program
  3. #
  4. # Structure of this file:
  5. # Write the name of a card in square braces, e.g. [&MyCard]
  6. # The character after '&' is the short cut letter in the menu (In this case 'M')
  7. # All lines thereafter are considered commands for that particular card
  8. # A command is: CommandName, Protocol (T0 or T1), TPDU
  9. # The driver test program does not check the validity of any command.
  10. # All TPDU bytes are in hex. Use the line continuation character '\' for
  11. # commands that do not fit on one line.
  12. #
  13. #
  14. # Siemens
  15. #
  16. [&SiCrypt]
  17. &GetChallenge, 08, 84, 00, 00\
  18. 08
  19. SelectFile &EFdir (a1), 00, A4, 00, 00, 02, 2f, 00, 00
  20. ReadBinary &44h bytes (a2), 00, B0, 00, 00, 44
  21. Verify &PwdG0 (b1), 00, 20, 00, 01, 08, "12345678"
  22. SelectFile SiCrypt &WS (b2), 00, a4, 08, 04, 06, 31, 00, 33, 00, 33, 32, 40
  23. WriteBinary Pattern &A (b3.1), 00, d6, 00, 00, 80 \
  24. 00, 01, 02, 03, 04, 05, 06, 07 \
  25. 08, 09, 0a, 0b, 0c, 0d, 0e, 0f \
  26. 10, 11, 12, 13, 14, 15, 16, 17 \
  27. 18, 19, 2a, 2b, 2c, 2d, 2e, 2f \
  28. 20, 21, 22, 23, 24, 25, 26, 27 \
  29. 28, 29, 2a, 2b, 2c, 2d, 2e, 2f \
  30. 30, 31, 32, 33, 34, 35, 36, 37 \
  31. 38, 39, 3a, 3b, 3c, 3d, 3e, 3f \
  32. 40, 41, 42, 43, 44, 45, 46, 47 \
  33. 48, 49, 4a, 4b, 4c, 4d, 4e, 4f \
  34. 50, 51, 52, 53, 54, 55, 56, 57 \
  35. 58, 59, 5a, 5b, 5c, 5d, 5e, 5f \
  36. 60, 61, 62, 63, 64, 65, 66, 67 \
  37. 68, 69, 6a, 6b, 6c, 6d, 6e, 6f \
  38. 70, 71, 72, 73, 74, 75, 76, 77 \
  39. 78, 79, 7a, 7b, 7c, 7d, 7e, 7f
  40. WriteBinary Pattern &B (b3.2), 00, d6, 00, 00, 80 \
  41. 7f, 7e, 7d, 7c, 7b, 7a, 79, 78 \
  42. 77, 76, 75, 74, 73, 72, 71, 70 \
  43. 6f, 6e, 6d, 6c, 6b, 6a, 69, 68 \
  44. 67, 66, 65, 64, 63, 62, 61, 60 \
  45. 5f, 5e, 5d, 5c, 5b, 5a, 59, 58 \
  46. 57, 56, 55, 54, 53, 52, 51, 50 \
  47. 4f, 4e, 4d, 4c, 4b, 4a, 49, 48 \
  48. 47, 46, 45, 44, 43, 42, 41, 40 \
  49. 3f, 3e, 3d, 3c, 3b, 3a, 39, 38 \
  50. 37, 36, 35, 34, 33, 32, 31, 30 \
  51. 2f, 2e, 2d, 2c, 2b, 2a, 29, 28 \
  52. 27, 26, 25, 24, 23, 22, 21, 20 \
  53. 1f, 1e, 1d, 1c, 1b, 1a, 19, 18 \
  54. 17, 16, 15, 14, 13, 12, 11, 10 \
  55. 0f, 0e, 0d, 0c, 0b, 0a, 09, 08 \
  56. 07, 06, 05, 04, 03, 02, 01, 00
  57. WriteBinary Pattern &C (b3.2), 00, d6, 00, 00, ff \
  58. 00, 00, 00, 00, 00, 00, 00, 00 \
  59. 00, 00, 00, 00, 00, 00, 00, 00 \
  60. 01, 00, 00, 00, 00, 00, 00, 00 \
  61. 01, 00, 00, 00, 00, 00, 00, 00 \
  62. 02, 00, 00, 00, 00, 00, 00, 00 \
  63. 02, 00, 00, 00, 00, 00, 00, 00 \
  64. 03, 00, 00, 00, 00, 00, 00, 00 \
  65. 03, 00, 00, 00, 00, 00, 00, 00 \
  66. 04, 00, 00, 00, 00, 00, 00, 00 \
  67. 04, 00, 00, 00, 00, 00, 00, 00 \
  68. 05, 00, 00, 00, 00, 00, 00, 00 \
  69. 05, 00, 00, 00, 00, 00, 00, 00 \
  70. 06, 00, 00, 00, 00, 00, 00, 00 \
  71. 06, 00, 00, 00, 00, 00, 00, 00 \
  72. 07, 00, 00, 00, 00, 00, 00, 00 \
  73. 07, 00, 00, 00, 00, 00, 00, 00 \
  74. 08, 00, 00, 00, 00, 00, 00, 00 \
  75. 08, 00, 00, 00, 00, 00, 00, 00 \
  76. 09, 00, 00, 00, 00, 00, 00, 00 \
  77. 09, 00, 00, 00, 00, 00, 00, 00 \
  78. 0a, 00, 00, 00, 00, 00, 00, 00 \
  79. 0a, 00, 00, 00, 00, 00, 00, 00 \
  80. 0b, 00, 00, 00, 00, 00, 00, 00 \
  81. 0b, 00, 00, 00, 00, 00, 00, 00 \
  82. 0c, 00, 00, 00, 00, 00, 00, 00 \
  83. 0c, 00, 00, 00, 00, 00, 00, 00 \
  84. 0d, 00, 00, 00, 00, 00, 00, 00 \
  85. 0d, 00, 00, 00, 00, 00, 00, 00 \
  86. 0e, 00, 00, 00, 00, 00, 00, 00 \
  87. 0e, 00, 00, 00, 00, 00, 00, 00 \
  88. 0f, 00, 00, 00, 00, 00, 00, 00 \
  89. 0f, 00, 00, 00, 00, 00, 00
  90. ReadBinary &80h bytes (b4), 00, B0, 00, 00, 80
  91. ReadBinary &FFh bytes , 00, B0, 00, 00, FF
  92. SelectFile C&ID, 00, A4, 08, 0C, 02, 00, 03, FF
  93. #
  94. # Schlumberger CryptoFlex
  95. #
  96. [&CryptoFlex]
  97. &GetChallenge, C0, 84, 0, 0, 8
  98. &Verify (Key_Ext01), F0, 2A, 0, 1, 8, 50, 43, 53, 43, 4C, 49, 56, 45
  99. &CreateFile, F0, E0, FF, 00, 10 \
  100. 00, 00, 00, C8, 3F, 05, 01, 00, 00, 00, 00, 01, 03, 00, 00, 00
  101. &SelectFile, C0, A4, 00, 00, 02, 3F, 05
  102. UpdateBinary Pattern &A, C0, D6, 00, 00, 80 \
  103. 00, 01, 02, 03, 04, 05, 06, 07 \
  104. 08, 09, 0a, 0b, 0c, 0d, 0e, 0f \
  105. 10, 11, 12, 13, 14, 15, 16, 17 \
  106. 18, 19, 2a, 2b, 2c, 2d, 2e, 2f \
  107. 20, 21, 22, 23, 24, 25, 26, 27 \
  108. 28, 29, 2a, 2b, 2c, 2d, 2e, 2f \
  109. 30, 31, 32, 33, 34, 35, 36, 37 \
  110. 38, 39, 3a, 3b, 3c, 3d, 3e, 3f \
  111. 40, 41, 42, 43, 44, 45, 46, 47 \
  112. 48, 49, 4a, 4b, 4c, 4d, 4e, 4f \
  113. 50, 51, 52, 53, 54, 55, 56, 57 \
  114. 58, 59, 5a, 5b, 5c, 5d, 5e, 5f \
  115. 60, 61, 62, 63, 64, 65, 66, 67 \
  116. 68, 69, 6a, 6b, 6c, 6d, 6e, 6f \
  117. 70, 71, 72, 73, 74, 75, 76, 77 \
  118. 78, 79, 7a, 7b, 7c, 7d, 7e, 7f
  119. UpdateBinary Pattern &B, C0, D6, 00, 00, 80 \
  120. 7f, 7e, 7d, 7c, 7b, 7a, 79, 78 \
  121. 77, 76, 75, 74, 73, 72, 71, 70 \
  122. 6f, 6e, 6d, 6c, 6b, 6a, 69, 68 \
  123. 67, 66, 65, 64, 63, 62, 61, 60 \
  124. 5f, 5e, 5d, 5c, 5b, 5a, 59, 58 \
  125. 57, 56, 55, 54, 53, 52, 51, 50 \
  126. 4f, 4e, 4d, 4c, 4b, 4a, 49, 48 \
  127. 47, 46, 45, 44, 43, 42, 41, 40 \
  128. 3f, 3e, 3d, 3c, 3b, 3a, 39, 38 \
  129. 37, 36, 35, 34, 33, 32, 31, 30 \
  130. 2f, 2e, 2d, 2c, 2b, 2a, 29, 28 \
  131. 27, 26, 25, 24, 23, 22, 21, 20 \
  132. 1f, 1e, 1d, 1c, 1b, 1a, 19, 18 \
  133. 17, 16, 15, 14, 13, 12, 11, 10 \
  134. 0f, 0e, 0d, 0c, 0b, 0a, 09, 08 \
  135. 07, 06, 05, 04, 03, 02, 01, 00
  136. UpdateBinary Pattern &C, C0, D6, 00, 00, FF \
  137. 00, 00, 00, 00, 00, 00, 00, 00 \
  138. 00, 00, 00, 00, 00, 00, 00, 00 \
  139. 01, 00, 00, 00, 00, 00, 00, 00 \
  140. 01, 00, 00, 00, 00, 00, 00, 00 \
  141. 02, 00, 00, 00, 00, 00, 00, 00 \
  142. 02, 00, 00, 00, 00, 00, 00, 00 \
  143. 03, 00, 00, 00, 00, 00, 00, 00 \
  144. 03, 00, 00, 00, 00, 00, 00, 00 \
  145. 04, 00, 00, 00, 00, 00, 00, 00 \
  146. 04, 00, 00, 00, 00, 00, 00, 00 \
  147. 05, 00, 00, 00, 00, 00, 00, 00 \
  148. 05, 00, 00, 00, 00, 00, 00, 00 \
  149. 06, 00, 00, 00, 00, 00, 00, 00 \
  150. 06, 00, 00, 00, 00, 00, 00, 00 \
  151. 07, 00, 00, 00, 00, 00, 00, 00 \
  152. 07, 00, 00, 00, 00, 00, 00, 00 \
  153. 08, 00, 00, 00, 00, 00, 00, 00 \
  154. 08, 00, 00, 00, 00, 00, 00, 00 \
  155. 09, 00, 00, 00, 00, 00, 00, 00 \
  156. 09, 00, 00, 00, 00, 00, 00, 00 \
  157. 0a, 00, 00, 00, 00, 00, 00, 00 \
  158. 0a, 00, 00, 00, 00, 00, 00, 00 \
  159. 0b, 00, 00, 00, 00, 00, 00, 00 \
  160. 0b, 00, 00, 00, 00, 00, 00, 00 \
  161. 0c, 00, 00, 00, 00, 00, 00, 00 \
  162. 0c, 00, 00, 00, 00, 00, 00, 00 \
  163. 0d, 00, 00, 00, 00, 00, 00, 00 \
  164. 0d, 00, 00, 00, 00, 00, 00, 00 \
  165. 0e, 00, 00, 00, 00, 00, 00, 00 \
  166. 0e, 00, 00, 00, 00, 00, 00, 00 \
  167. 0f, 00, 00, 00, 00, 00, 00, 00 \
  168. 0f, 00, 00, 00, 00, 00, 00
  169. UpdateBinary Pattern &D, C0, D6, 00, 00, 00
  170. ReadBinary &00h bytes, C0, B0, 00, 00, 00
  171. ReadBinary &80h bytes, C0, B0, 00, 00, 80
  172. ReadBinary &FFh bytes, C0, B0, 00, 00, FF
  173. #
  174. # Scot 110
  175. # Note: Valid Pin is a special case where only 4 bytes are submitted to the card
  176. #
  177. [Sc&OtT110]
  178. &GetChallenge, BC, C4, 00, 00, 08
  179. &ReadFile, BC, B0, 00, 00, 00
  180. &Submit PIN, BC, 20, 00, 00, 04, 12, 54, 3f, ff
  181. &Valid PIN, BC, 40, 00, 00
  182. #
  183. # Bull TB 100
  184. #
  185. [&Bull TB100]
  186. Submit&Pin, BC, 20, 00, 00, 08, FF, FF, FF, FF, FF, FF, 49, 50
  187. Select&File, BC, A4, 00, 00, 02, 2F, 02
  188. Read &256 bytes, BC, B0, 00, 00, 00
  189. Read &4 bytes, BC, B0, 00, 00, 04
  190. &SelectFile, BC, A4, 00, 00, 02, 2F, 01
  191. &EraseFile, BC, 0E, 00, 00, 02, 00, 78