Skip to content

Commit 4df8fbf

Browse files
committed
[NETSH] Add a special code path to execute commands that follow the pushd command
This enables the execution of commands like 'pushd interface ip' which is emitted by the dump command of WinXPs ifmon.dll.
1 parent 6762703 commit 4df8fbf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

base/applications/network/netsh/interpreter.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,16 @@ InterpretCommand(
213213
else
214214
ConPrintf(StdOut, L"Command: %s Error: %lu\n\n", pCommand->pwszCmdToken, dwError);
215215
}
216+
else
217+
{
218+
/* Execute the commands following a pushd command */
219+
if ((_wcsicmp(pCommand->pwszCmdToken, L"pushd") == 0) &&
220+
(dwArgIndex < dwArgCount))
221+
{
222+
State = STATE_ANALYZE;
223+
break;
224+
}
225+
}
216226
}
217227

218228
State = STATE_DONE;

0 commit comments

Comments
 (0)