50{
56 UINT32 ActionBreakToDebuggerLength = 0;
57 UINT32 ActionCustomCodeLength = 0;
58 UINT32 ActionScriptLength = 0;
60 UINT64 OptionalParam1 = 0;
62
63 if (CommandTokens.size() < 2)
64 {
65 ShowMessages("incorrect use of the '%s'\n\n",
67
69 return;
70 }
71
72
73
74
76 &CommandTokens,
78 &Event,
79 &EventLength,
80 &ActionBreakToDebugger,
81 &ActionBreakToDebuggerLength,
82 &ActionCustomCode,
83 &ActionCustomCodeLength,
84 &ActionScript,
85 &ActionScriptLength,
86 &EventParsingErrorCause))
87 {
88 return;
89 }
90
91
92
93
95 {
96 ShowMessages("the utilization of 'post' or 'all' event calling stages is not meaningful "
97 "for the hidden hook; therefore, this command does not support them\n");
98
100 return;
101 }
102
103
104
105
106 for (auto Section : CommandTokens)
107 {
109 {
110 continue;
111 }
112 else if (!GetAddress)
113 {
114
115
116
119 &OptionalParam1))
120 {
121
122
123
124 ShowMessages("err, couldn't resolve error at '%s'\n\n",
127
129 return;
130 }
131 else
132 {
134 }
135 }
136 else
137 {
138
139
140
141 ShowMessages("unknown parameter '%s'\n\n",
144
146 return;
147 }
148 }
149 if (OptionalParam1 == 0)
150 {
151 ShowMessages("please choose an address to put the hook on it\n");
152
154 return;
155 }
156
157
158
159
161
162
163
164
166 {
167
168
169
170
171
172
174 return;
175 }
176
177
178
179
181 ActionBreakToDebugger,
182 ActionBreakToDebuggerLength,
183 ActionCustomCode,
184 ActionCustomCodeLength,
185 ActionScript,
186 ActionScriptLength))
187 {
188
189
190
191
193 return;
194 }
195}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
VOID FreeEventsAndActionsMemory(PDEBUGGER_GENERAL_EVENT_DETAIL Event, PDEBUGGER_GENERAL_ACTION ActionBreakToDebugger, PDEBUGGER_GENERAL_ACTION ActionCustomCode, PDEBUGGER_GENERAL_ACTION ActionScript)
Deallocate buffers relating to events and actions.
Definition debugger.cpp:1688
BOOLEAN InterpretGeneralEventAndActionsFields(vector< CommandToken > *CommandTokens, VMM_EVENT_TYPE_ENUM EventType, PDEBUGGER_GENERAL_EVENT_DETAIL *EventDetailsToFill, PUINT32 EventBufferLength, PDEBUGGER_GENERAL_ACTION *ActionDetailsToFillBreakToDebugger, PUINT32 ActionBufferLengthBreakToDebugger, PDEBUGGER_GENERAL_ACTION *ActionDetailsToFillCustomCode, PUINT32 ActionBufferLengthCustomCode, PDEBUGGER_GENERAL_ACTION *ActionDetailsToFillScript, PUINT32 ActionBufferLengthScript, PDEBUGGER_EVENT_PARSING_ERROR_CAUSE ReasonForErrorInParsing)
Interpret general event fields.
Definition debugger.cpp:1736
BOOLEAN SendEventToKernel(PDEBUGGER_GENERAL_EVENT_DETAIL Event, UINT32 EventBufferLength)
Register the event to the kernel.
Definition debugger.cpp:1367
BOOLEAN RegisterActionToEvent(PDEBUGGER_GENERAL_EVENT_DETAIL Event, PDEBUGGER_GENERAL_ACTION ActionBreakToDebugger, UINT32 ActionBreakToDebuggerLength, PDEBUGGER_GENERAL_ACTION ActionCustomCode, UINT32 ActionCustomCodeLength, PDEBUGGER_GENERAL_ACTION ActionScript, UINT32 ActionScriptLength)
Register the action to the event.
Definition debugger.cpp:1483
VOID CommandEptHook2Help()
help of the !epthook2 command
Definition epthook2.cpp:20
NULL()
Definition test-case-generator.py:530
UINT64 OptionalParam1
Definition Events.h:277
DEBUGGER_EVENT_OPTIONS Options
Definition Events.h:396
VMM_CALLBACK_EVENT_CALLING_STAGE_TYPE EventStage
Definition Events.h:374
BOOLEAN SymbolConvertNameOrExprToAddress(const string &TextToConvert, PUINT64 Result)
check and convert string to a 64 bit unsigned integer and also check for symbol object names and eval...
Definition symbol.cpp:359