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.

321 lines
12 KiB

  1. @perl -x -w %0 %*
  2. @goto :eof
  3. #!perl
  4. ################################################################################
  5. #
  6. # Script begins here. Above is overhead to make a happy batch file.
  7. #
  8. ################################################################################
  9. use srTest;
  10. use Cwd;
  11. my $dev = substr(cwd(),0,2);
  12. my $opOpt = "";
  13. my $sfOpt = "";
  14. #
  15. # the command to execute
  16. #
  17. # Operator defintions:
  18. # nnn: Commands to execute (can be search for)
  19. # ! internal PERL commands to be executed silently
  20. # ... anything else is a command to bshell
  21. #
  22. #
  23. SrRun (
  24. #create stream with LONG name
  25. # "1:Create stream \\docume~1\\admini~1.bvt\\locals~1\\temp\\lug\\%temp%:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:\$data file relative with short names",
  26. # "!mkdir '$dev/Documents and Settings/', 0",
  27. # "!mkdir '$dev/Documents and Settings/Administrator.bvt/', 0",
  28. # "!mkdir '$dev/Documents and Settings/Administrator.bvt/local settings/', 0",
  29. # "!mkdir '$dev/Documents and Settings/Administrator.bvt/local settings/temp/', 0",
  30. # "!mkdir '$dev/Documents and Settings/Administrator.bvt/local settings/temp/lug/', 0",
  31. # "op $opOpt /f\\$dev\\docume~1\\admini~1.bvt\\locals~1\\temp\\lug\\%temp% /dzj /pzd /hzabc",
  32. # "op $opOpt /r0 /x /f:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:\$data /dzj /pzf /hzabc",
  33. # "cl /i0",
  34. # "cl /i1",
  35. #create stream on an interesting file, already exists,
  36. "1:Create stream on a file - file exists, is interesting, full path, simple stream name",
  37. "!disableSr $dev\\",
  38. "!mkdir '$dev/stream/', 0",
  39. "!unlink '$dev/stream/a.exe'",
  40. "!crfile '$dev/stream/a.exe'",
  41. "!enableSr $dev\\",
  42. "op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzc",
  43. "cl /i0",
  44. "2:Create stream on a file - file exists, is interesting, full path, complex stream name",
  45. "!disableSr $dev\\",
  46. "!mkdir '$dev/stream/', 0",
  47. "!unlink '$dev/stream/a.exe'",
  48. "!crfile '$dev/stream/a.exe'",
  49. "!enableSr $dev\\",
  50. "op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$data /dzj /pzc",
  51. "cl /i0",
  52. "3:Create stream on a file - file exists, is interesting, file relative, simple stream name",
  53. "!disableSr $dev\\",
  54. "!mkdir '$dev/stream/', 0",
  55. "!unlink '$dev/stream/a.exe'",
  56. "!crfile '$dev/stream/a.exe'",
  57. "!enableSr $dev\\",
  58. "op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzd /hzabc",
  59. "op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
  60. "cl /i0",
  61. "cl /i1",
  62. "4:Create stream on a file - file exists, is interesting, file relative, complex stream name",
  63. "!disableSr $dev\\",
  64. "!mkdir '$dev/stream/', 0",
  65. "!unlink '$dev/stream/a.exe'",
  66. "!crfile '$dev/stream/a.exe'",
  67. "!enableSr $dev\\",
  68. "op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzd /hzabc",
  69. "op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
  70. "cl /i0",
  71. "cl /i1",
  72. #create stream on an interesting file, does not exists,
  73. "11:Create stream on a file - file does not exist, is interesting, full path, simple stream name",
  74. "!disableSr $dev\\",
  75. "!mkdir '$dev/stream/', 0",
  76. "!unlink '$dev/stream/a.exe'",
  77. "!enableSr $dev\\",
  78. "op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzc",
  79. "cl /i0",
  80. "12:Create stream on a file - file does not exist, is interesting, full path, complex stream name",
  81. "!disableSr $dev\\",
  82. "!mkdir '$dev/stream/', 0",
  83. "!unlink '$dev/stream/a.exe'",
  84. "!enableSr $dev\\",
  85. "op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$data /dzj /pzc",
  86. "cl /i0",
  87. "13:Create stream on a file - file does not exist, is interesting, file relative, simple stream name",
  88. "!disableSr $dev\\",
  89. "!mkdir '$dev/stream/', 0",
  90. "!unlink '$dev/stream/a.exe'",
  91. "!enableSr $dev\\",
  92. "op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
  93. "op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
  94. "cl /i0",
  95. "cl /i1",
  96. "14:Create stream on a file - file does not exist, is interesting, file relative, complex stream name",
  97. "!disableSr $dev\\",
  98. "!mkdir '$dev/stream/', 0",
  99. "!unlink '$dev/stream/a.exe'",
  100. "!enableSr $dev\\",
  101. "op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
  102. "op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
  103. "cl /i0",
  104. "cl /i1",
  105. #create stream on an non-interesting file, already exists,
  106. "21:Create stream on a file - file exists, is not interesting, full path, simple stream name",
  107. "!disableSr $dev\\",
  108. "!mkdir '$dev/stream/', 0",
  109. "!unlink '$dev/stream/a.txt'",
  110. "!crfile '$dev/stream/a.txt'",
  111. "!enableSr $dev\\",
  112. "op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzc",
  113. "cl /i0",
  114. "22:Create stream on a file - file exists, is not interesting, full path, complex stream name",
  115. "!disableSr $dev\\",
  116. "!mkdir '$dev/stream/', 0",
  117. "!unlink '$dev/stream/a.txt'",
  118. "!crfile '$dev/stream/a.txt'",
  119. "!enableSr $dev\\",
  120. "op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$data /dzj /pzc",
  121. "cl /i0",
  122. "23:Create stream on a file - file exists, is not interesting, file relative, simple stream name",
  123. "!disableSr $dev\\",
  124. "!mkdir '$dev/stream/', 0",
  125. "!unlink '$dev/stream/a.txt'",
  126. "!crfile '$dev/stream/a.txt'",
  127. "!enableSr $dev\\",
  128. "op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzd /hzabc",
  129. "op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
  130. "cl /i0",
  131. "cl /i1",
  132. "24:Create stream on a file - file exists, is not interesting, file relative, complex stream name",
  133. "!disableSr $dev\\",
  134. "!mkdir '$dev/stream/', 0",
  135. "!unlink '$dev/stream/a.txt'",
  136. "!crfile '$dev/stream/a.txt'",
  137. "!enableSr $dev\\",
  138. "op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzd /hzabc",
  139. "op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
  140. "cl /i0",
  141. "cl /i1",
  142. #create stream on an interesting file, does not exists,
  143. "31:Create stream on a file - file does not exist, is not interesting, full path, simple stream name",
  144. "!disableSr $dev\\",
  145. "!mkdir '$dev/stream/', 0",
  146. "!unlink '$dev/stream/a.txt'",
  147. "!enableSr $dev\\",
  148. "op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzc",
  149. "cl /i0",
  150. "32:Create stream on a file - file does not exist, is not interesting, full path, complex stream name",
  151. "!disableSr $dev\\",
  152. "!mkdir '$dev/stream/', 0",
  153. "!unlink '$dev/stream/a.txt'",
  154. "!enableSr $dev\\",
  155. "op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$data /dzj /pzc",
  156. "cl /i0",
  157. "33:Create stream on a file - file does not exist, is not interesting, file relative, simple stream name",
  158. "!disableSr $dev\\",
  159. "!mkdir '$dev/stream/', 0",
  160. "!unlink '$dev/stream/a.txt'",
  161. "!enableSr $dev\\",
  162. "op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzc /hzabc",
  163. "op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
  164. "cl /i0",
  165. "cl /i1",
  166. "34:Create stream on a file - file does not exist, is not interesting, file relative, complex stream name",
  167. "!disableSr $dev\\",
  168. "!mkdir '$dev/stream/', 0",
  169. "!unlink '$dev/stream/a.txt'",
  170. "!enableSr $dev\\",
  171. "op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzc /hzabc",
  172. "op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
  173. "cl /i0",
  174. "cl /i1",
  175. #open a stream for overwrite
  176. "41:Open a stream on a file for overwrite - file exist, is interesting, full path, simple stream name",
  177. "!disableSr $dev\\",
  178. "!mkdir '$dev/stream/', 0",
  179. "!unlink '$dev/stream/a.exe'",
  180. "!crfile '$dev/stream/a.exe:stream1'",
  181. "!enableSr $dev\\",
  182. "op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pze",
  183. "cl /i0",
  184. "42:Open a stream on a file for overwrite - file exist, is interesting, full path, complex stream name",
  185. "!disableSr $dev\\",
  186. "!mkdir '$dev/stream/', 0",
  187. "!unlink '$dev/stream/a.exe'",
  188. "!crfile '$dev/stream/a.exe:stream1:$DATA'",
  189. "!enableSr $dev\\",
  190. "op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$data /dzj /pze",
  191. "cl /i0",
  192. "43:Open a stream on a file for overwrite - file exist, is interesting, file relative, simple stream name",
  193. "!disableSr $dev\\",
  194. "!mkdir '$dev/stream/', 0",
  195. "!unlink '$dev/stream/a.exe'",
  196. "!crfile '$dev/stream/a.exe:stream1'",
  197. "!enableSr $dev\\",
  198. "op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
  199. "op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
  200. "cl /i0",
  201. "cl /i1",
  202. "44:Open a stream on a file for overwrite - file exist, is interesting, file relative, complex stream name",
  203. "!disableSr $dev\\",
  204. "!mkdir '$dev/stream/', 0",
  205. "!unlink '$dev/stream/a.exe'",
  206. "!crfile '$dev/stream/a.exe:stream1:$DATA'",
  207. "!enableSr $dev\\",
  208. "op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
  209. "op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
  210. "cl /i0",
  211. "cl /i1",
  212. #delete a stream
  213. "51:Delete a stream on a file - file exist, is interesting, full path, simple stream name",
  214. "!disableSr $dev\\",
  215. "!mkdir '$dev/stream/', 0",
  216. "!unlink '$dev/stream/a.exe'",
  217. "!crfile '$dev/stream/a.exe:stream1'",
  218. "!enableSr $dev\\",
  219. "op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzb",
  220. "sf /i0 /cd /dt",
  221. "cl /i0",
  222. "52:Delete a stream on a file - file exist, is interesting, full path, complex",
  223. "!disableSr $dev\\",
  224. "!mkdir '$dev/stream/', 0",
  225. "!unlink '$dev/stream/a.exe'",
  226. "!crfile '$dev/stream/a.exe:stream1'",
  227. "!enableSr $dev\\",
  228. "op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$DATA /dzj /pzb",
  229. "sf /i0 /cd /dt",
  230. "cl /i0",
  231. "53:Delete a stream on a file - file exist, is not interesting, full path, simple stream name",
  232. "!disableSr $dev\\",
  233. "!mkdir '$dev/stream/', 0",
  234. "!unlink '$dev/stream/a.txt'",
  235. "!crfile '$dev/stream/a.txt:stream1'",
  236. "!enableSr $dev\\",
  237. "op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzb",
  238. "sf /i0 /cd /dt",
  239. "cl /i0",
  240. "54:Delete a stream on a file - file exist, is not interesting, full path, complex",
  241. "!disableSr $dev\\",
  242. "!mkdir '$dev/stream/', 0",
  243. "!unlink '$dev/stream/a.txt'",
  244. "!crfile '$dev/stream/a.txt:stream1'",
  245. "!enableSr $dev\\",
  246. "op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$DATA /dzj /pzb",
  247. "sf /i0 /cd /dt",
  248. "cl /i0",
  249. "55:Delete a stream on a file - file does not exist, is interesting, full path, simple stream name",
  250. "!disableSr $dev\\",
  251. "!mkdir '$dev/stream/', 0",
  252. "!unlink '$dev/stream/a.exe'",
  253. "!enableSr $dev\\",
  254. "!crfile '$dev/stream/a.exe:stream1'",
  255. "op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzb",
  256. "sf /i0 /cd /dt",
  257. "cl /i0",
  258. "56:Delete a stream on a file - file does not exist, is interesting, full path, complex",
  259. "!disableSr $dev\\",
  260. "!mkdir '$dev/stream/', 0",
  261. "!unlink '$dev/stream/a.exe'",
  262. "!enableSr $dev\\",
  263. "!crfile '$dev/stream/a.exe:stream1'",
  264. "op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$DATA /dzj /pzb",
  265. "sf /i0 /cd /dt",
  266. "cl /i0",
  267. "57:Delete a stream on a file - file does not exist, is not interesting, full path, simple stream name",
  268. "!disableSr $dev\\",
  269. "!mkdir '$dev/stream/', 0",
  270. "!unlink '$dev/stream/a.txt'",
  271. "!enableSr $dev\\",
  272. "!crfile '$dev/stream/a.exe:stream1'",
  273. "op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzb",
  274. "sf /i0 /cd /dt",
  275. "cl /i0",
  276. "58:Delete a stream on a file - file does not exist, is not interesting, full path, complex",
  277. "!disableSr $dev\\",
  278. "!mkdir '$dev/stream/', 0",
  279. "!unlink '$dev/stream/a.txt'",
  280. "!crfile '$dev/stream/a.txt:stream1:$DATA'",
  281. "!enableSr $dev\\",
  282. "!crfile '$dev/stream/a.exe:stream1'",
  283. "op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$DATA /dzj /pzb",
  284. "sf /i0 /cd /dt",
  285. "cl /i0",
  286. );