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
321 lines
12 KiB
@perl -x -w %0 %*
|
|
@goto :eof
|
|
#!perl
|
|
################################################################################
|
|
#
|
|
# Script begins here. Above is overhead to make a happy batch file.
|
|
#
|
|
################################################################################
|
|
|
|
use srTest;
|
|
use Cwd;
|
|
|
|
|
|
my $dev = substr(cwd(),0,2);
|
|
my $opOpt = "";
|
|
my $sfOpt = "";
|
|
|
|
#
|
|
# the command to execute
|
|
#
|
|
# Operator defintions:
|
|
# nnn: Commands to execute (can be search for)
|
|
# ! internal PERL commands to be executed silently
|
|
# ... anything else is a command to bshell
|
|
#
|
|
#
|
|
|
|
SrRun (
|
|
|
|
#create stream with LONG name
|
|
# "1:Create stream \\docume~1\\admini~1.bvt\\locals~1\\temp\\lug\\%temp%:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:\$data file relative with short names",
|
|
# "!mkdir '$dev/Documents and Settings/', 0",
|
|
# "!mkdir '$dev/Documents and Settings/Administrator.bvt/', 0",
|
|
# "!mkdir '$dev/Documents and Settings/Administrator.bvt/local settings/', 0",
|
|
# "!mkdir '$dev/Documents and Settings/Administrator.bvt/local settings/temp/', 0",
|
|
# "!mkdir '$dev/Documents and Settings/Administrator.bvt/local settings/temp/lug/', 0",
|
|
# "op $opOpt /f\\$dev\\docume~1\\admini~1.bvt\\locals~1\\temp\\lug\\%temp% /dzj /pzd /hzabc",
|
|
# "op $opOpt /r0 /x /f:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:\$data /dzj /pzf /hzabc",
|
|
# "cl /i0",
|
|
# "cl /i1",
|
|
|
|
#create stream on an interesting file, already exists,
|
|
"1:Create stream on a file - file exists, is interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"2:Create stream on a file - file exists, is interesting, full path, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$data /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"3:Create stream on a file - file exists, is interesting, file relative, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzd /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
"4:Create stream on a file - file exists, is interesting, file relative, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzd /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
#create stream on an interesting file, does not exists,
|
|
"11:Create stream on a file - file does not exist, is interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"12:Create stream on a file - file does not exist, is interesting, full path, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$data /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"13:Create stream on a file - file does not exist, is interesting, file relative, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
"14:Create stream on a file - file does not exist, is interesting, file relative, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
#create stream on an non-interesting file, already exists,
|
|
"21:Create stream on a file - file exists, is not interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"22:Create stream on a file - file exists, is not interesting, full path, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$data /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"23:Create stream on a file - file exists, is not interesting, file relative, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzd /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
"24:Create stream on a file - file exists, is not interesting, file relative, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzd /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
#create stream on an interesting file, does not exists,
|
|
"31:Create stream on a file - file does not exist, is not interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"32:Create stream on a file - file does not exist, is not interesting, full path, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$data /dzj /pzc",
|
|
"cl /i0",
|
|
|
|
"33:Create stream on a file - file does not exist, is not interesting, file relative, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzc /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
"34:Create stream on a file - file does not exist, is not interesting, file relative, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt /dzj /pzc /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
#open a stream for overwrite
|
|
"41:Open a stream on a file for overwrite - file exist, is interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pze",
|
|
"cl /i0",
|
|
|
|
"42:Open a stream on a file for overwrite - file exist, is interesting, full path, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe:stream1:$DATA'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$data /dzj /pze",
|
|
"cl /i0",
|
|
|
|
"43:Open a stream on a file for overwrite - file exist, is interesting, file relative, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1 /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
"44:Open a stream on a file for overwrite - file exist, is interesting, file relative, complex stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe:stream1:$DATA'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe /dzj /pzc /hzabc",
|
|
"op $opOpt /r0 /x /f:stream1:\$data /dzj /pzc /hzabc",
|
|
"cl /i0",
|
|
"cl /i1",
|
|
|
|
#delete a stream
|
|
"51:Delete a stream on a file - file exist, is interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"52:Delete a stream on a file - file exist, is interesting, full path, complex",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$DATA /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"53:Delete a stream on a file - file exist, is not interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt:stream1'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"54:Delete a stream on a file - file exist, is not interesting, full path, complex",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt:stream1'",
|
|
"!enableSr $dev\\",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$DATA /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"55:Delete a stream on a file - file does not exist, is interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1 /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"56:Delete a stream on a file - file does not exist, is interesting, full path, complex",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.exe'",
|
|
"!enableSr $dev\\",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"op $opOpt /f\\$dev\\stream\\a.exe:stream1:\$DATA /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"57:Delete a stream on a file - file does not exist, is not interesting, full path, simple stream name",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!enableSr $dev\\",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1 /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
"58:Delete a stream on a file - file does not exist, is not interesting, full path, complex",
|
|
"!disableSr $dev\\",
|
|
"!mkdir '$dev/stream/', 0",
|
|
"!unlink '$dev/stream/a.txt'",
|
|
"!crfile '$dev/stream/a.txt:stream1:$DATA'",
|
|
"!enableSr $dev\\",
|
|
"!crfile '$dev/stream/a.exe:stream1'",
|
|
"op $opOpt /f\\$dev\\stream\\a.txt:stream1:\$DATA /dzj /pzb",
|
|
"sf /i0 /cd /dt",
|
|
"cl /i0",
|
|
|
|
);
|