46{
47 vector<string> PathAndArgs;
48 string Arguments = "";
49
50
51
52
53#if ActivateUserModeDebugger == FALSE
54
56 {
57 ShowMessages(
"the user-mode debugger in VMI Mode is still in the beta version and not stable. "
58 "we decided to exclude it from this release and release it in future versions. "
59 "if you want to test the user-mode debugger in VMI Mode, you should build "
60 "HyperDbg with special instructions. But starting processes is fully supported "
61 "in the Debugger Mode.\n"
62 "(it's not recommended to use it in VMI Mode yet!)\n");
63 return;
64 }
65
66#endif
67
68 if (SplitCommand.size() <= 2)
69 {
72 return;
73 }
74
75 if (!SplitCommand.at(1).compare("path"))
76 {
77
78
79
80
81
82
83
85
86
87
88
89 Command.erase(0, SplitCommand.at(0).size());
90
91
92
93
94 Command.erase(0, 4 + 1);
95
96
97
98
100
101
102
103
105
106
107
108
110
111 if (PathAndArgs.size() != 1)
112 {
113
114
115
116
117 for (auto item : PathAndArgs)
118 {
119
120
121
122
123 Arguments += item + " ";
124 }
125
126
127
128
129 Arguments.pop_back();
130
131
132
133
135 }
136 }
137 else
138 {
140 SplitCommand.at(1).c_str());
142 return;
143 }
144
145
146
147
148 if (Arguments.empty())
149 {
152 NULL,
154 }
155 else
156 {
161 }
162}
#define FALSE
Definition BasicTypes.h:54
wchar_t WCHAR
Definition BasicTypes.h:32
VOID StringToWString(std::wstring &ws, const std::string &s)
convert std::string to std::wstring
Definition common.cpp:729
VOID SplitPathAndArgs(std::vector< std::string > &Qargs, const std::string &Command)
Split path and arguments and handle strings between quotes.
Definition common.cpp:744
void Trim(std::string &s)
trim from both ends and start of a string (in place)
Definition common.cpp:594
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
BOOLEAN g_IsSerialConnectedToRemoteDebugger
Shows if the debugger was connected to remote debugger (A remote host)
Definition globals.h:238
std::wstring g_StartCommandPathAndArguments
the start arguments used in .start command
Definition globals.h:653
VOID CommandStartHelp()
help of the .start command
Definition start.cpp:27
std::wstring g_StartCommandPath
the start path used in .start command
Definition globals.h:647
BOOLEAN UdAttachToProcess(UINT32 TargetPid, const WCHAR *TargetFileAddress, const WCHAR *CommandLine, BOOLEAN RunCallbackAtTheFirstInstruction)
Attach to target process.
Definition ud.cpp:349