48{
49 vector<string> PathAndArgs;
50 string Arguments = "";
54
55 if (CommandTokens.size() <= 2)
56 {
57 ShowMessages("incorrect use of the '%s'\n\n",
60 return;
61 }
62
63
64
65
66#if ActivateUserModeDebugger == FALSE
67
69 {
70 ShowMessages("the user-mode debugger in VMI Mode is still in the beta version and not stable. "
71 "we decided to exclude it from this release and release it in future versions. "
72 "if you want to test the user-mode debugger in VMI Mode, you should build "
73 "HyperDbg with special instructions. But starting processes is fully supported "
74 "in the Debugger Mode.\n"
75 "(it's not recommended to use it in VMI Mode yet!)\n");
76 return;
77 }
78
79#endif
80
81
82
83
85 {
86 ShowMessages("err, couldn't resolve error at '%s'\n\n",
89 return;
90 }
91
92
93
94
95
96 for (auto Section : CommandTokens)
97 {
98
99
100
101 if (!IsFirstCommand)
102 {
103 IsFirstCommand =
TRUE;
104 continue;
105 }
106
107
108
109
110 if (!PathIgnored)
111 {
114 continue;
115 }
116
117
118
119
120 if (IsNextPath)
121 {
123
124
125
126
128
129 continue;
130 }
131
132
133
134
136 {
138 }
139 else
140 {
142 }
143 }
144
145
146
147
148 if (Arguments.empty())
149 {
150
151
152
153
154
155
156
157
158
161 NULL,
163 }
164 else
165 {
166
167
168
169 Arguments.pop_back();
170
171
172
173
175
176
177
178
179
180
181
182
183
184
189 }
190}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
VOID StringToWString(std::wstring &ws, const std::string &s)
convert std::string to std::wstring
Definition common.cpp:850
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
BOOLEAN g_IsSerialConnectedToRemoteDebugger
Shows if the debugger was connected to remote debugger (A remote host).
Definition rev.cpp:18
std::wstring g_StartCommandPathAndArguments
the start arguments used in .start command
Definition globals.h:663
std::wstring g_StartCommandPath
the start path used in .start command
Definition globals.h:657
VOID CommandStartHelp()
help of the .start command
Definition start.cpp:27
BOOLEAN UdAttachToProcess(UINT32 TargetPid, const WCHAR *TargetFileAddress, const WCHAR *CommandLine, BOOLEAN RunCallbackAtTheFirstInstruction)
Attach to target process.
Definition ud.cpp:372