davygrvy/expect4win
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Old windows port of Expect from around 2003. It used the DEBUG_PROCESS flag for CreateProcess() to then set breakpoints on console API calls and then reroute into Expect. But to get keypresses back into the hidden child process, it was nesessary to load a special dll that acted as the 'press-ee'. It was this forced loading at a breakpoint that caused a DEP security flag https://learn.microsoft.com/en-us/windows/win32/memory/data-execution-prevention Umm, yes, that's exactly what we're doing here and described in the comments:See also, for the opcodes: https://github.com/davygrvy/expect4win/blob/master/win/expWinConsoleDebugger.hpp#L187-L210 There must be a better way? Yes, this. I will slowly port to Detours in my free time. https://github.com/microsoft/Detours/wikiexpect4win/win/expWinConsoleDebugger.cpp
Lines 662 to 677 in 75b3a4f