shadowbrokers-exploits/windows/Resources/Tasking/Scripts/Include/_localeTasking.dsi

30 lines
700 B
Text
Raw Normal View History

sub _localeTasking(IN STRING $localeTxtFile, OUT STRING $localeCmd, OUT STRING $taskID, OUT STRING $targetID) {
echo "\nProcessing $localeTxtFile";
string $lines;
string $taskIDStr;
string $targetIDStr;
if (!ReadFile ($localeTxtFile, $lines)) {
return false;
}
for (int $i=0; $i < sizeof($lines); $i++) {
string $line = $lines[$i];
# TargetID is required
if (RegexMatch("TargetID", $line)) {
RegExSplit(" ", $line, 2, $targetIDStr);
$targetID = $targetIDStr[1];
}
# TaskID is required
if (RegexMatch("TaskID", $line)) {
RegExSplit(" ", $line, 2, $taskIDStr);
$taskID = $taskIDStr[1];
}
}
$localeCmd = "language";
return true;
}