shadowbrokers-exploits/windows/Resources/Ep/Scripts/dirtoget2.txt
2017-04-14 11:45:07 +02:00

44 lines
No EOL
964 B
Text

#-------------------------------------------------------------------------------
# File: dirtoget.eps
# Description: Does a dir; the only thing different is the name
#
#-------------------------------------------------------------------------------
bool $badParams = false;
string $args="";
string $arg;
int $i=1;
while ($i < sizeof($argv)) {
# $arg=split(" ", $argv[$i]);
$arg=$argv[$i];
# ifnot ($arg == $argv[$i]) {
# $arg="\"$argv[$i]\"";
# }
# TODO: when split works again, go back to being smart with quotes
if ($args == "") {
$args="\"$arg\"";
} else {
$args="$args \"$arg\"";
}
$i++;
}
bool $success = _FileExists($args, "")
@record on;
'dir $args`;
@record off;
if ($success) {
bool $isdir=GetCmdData("isdir");
SetCmdData(bool,"isdir",$isdir);
int $size=GetCmdData("size");
SetCmdData(int,"size",$size);
} else {
SetCmdData(bool,"isdir",false);
SetCmdData(int,"size",0);
}
return $success;