Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix mouse scroll fix memory leak PEFile read import
- Loading branch information
unknown
authored and
yutewiyof
committed
Jul 5, 2019
0 parents
commit 2993019
Showing
17 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
#ifndef _PLUGIN_HPP_ | ||
#define _PLUGIN_HPP_ | ||
|
||
#include <windows.h> | ||
|
||
#define WSTR(x) L##x | ||
|
||
typedef int (*FPCmd)(int argc, const wchar_t *argv[], const wchar_t *szCommandLine, void *pUserData); | ||
|
||
typedef void (*PVFV)(); | ||
|
||
struct SYSER_PLUGIN_MODULE | ||
{ | ||
wchar_t PluginInfo[32]; | ||
PVFV fpOnDebuggerOpen; | ||
PVFV fpOnDebuggerClose; | ||
PVFV fpOnDebuggerPlunge; | ||
}; | ||
|
||
struct CSyserUI | ||
{ | ||
virtual bool RegisterPluginModule(const wchar_t *ModuleName, SYSER_PLUGIN_MODULE *pPluginModule); | ||
virtual bool UnregisterPluginModule(const wchar_t *ModuleName); | ||
virtual int GetInstrLen(unsigned long Address); | ||
virtual bool CalcExp(const wchar_t *szExp, unsigned long *pResult); | ||
virtual bool InsertCmd(const wchar_t *szCmd, FPCmd pCmdProc, void *pUserData, const wchar_t *pComment, const wchar_t *pUsage); | ||
virtual void RemoveCmd(const wchar_t *szCmd); | ||
virtual int RunCmd(const wchar_t *szCmd); | ||
virtual void Outputf(const wchar_t *szMsg, ...); | ||
virtual void Output(const unsigned long *szMsg); | ||
virtual void *InsertMenu(void *hParentMenu, const wchar_t *szMenuName, void *fpMenuProc); | ||
virtual bool RemoveMenu(void *hMenu); | ||
virtual bool EnableMenu(void *hMenu, bool bEnable); | ||
virtual void *GetMainTabWnd(); | ||
virtual void *GetMainMenu(); | ||
virtual void *GetWisp(); | ||
virtual unsigned long WriteMemory(unsigned long Address, void *Buffer, unsigned long Size); | ||
virtual unsigned long ReadMemory(unsigned long Address, void *Buffer, unsigned long Size); | ||
}; | ||
|
||
extern "C" __declspec(dllimport) CSyserUI *gpSyserPluginUI; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
#include "plugin.hpp" | ||
|
||
void OnDebuggerOpen() | ||
{ | ||
//Syser Loaded Notify | ||
//::DbgPrint("SPCommand : OnDebuggerOpen\n"); | ||
} | ||
|
||
void OnDebuggerClose() | ||
{ | ||
//Syser Unload Notify | ||
//::DbgPrint("SPCommand : OnDebuggerClose\n"); | ||
} | ||
|
||
void OnDebuggerPlunge() | ||
{ | ||
//Syser | ||
//::DbgPrint("SPCommand : OnDebuggerPlunge\n"); | ||
} | ||
|
||
SYSER_PLUGIN_MODULE PluginModule = | ||
{ | ||
L"Syser Command Plugin Module", | ||
OnDebuggerOpen, | ||
OnDebuggerClose, | ||
OnDebuggerPlunge, | ||
}; | ||
|
||
int syser_calc(int argc, const wchar_t *argv[], const wchar_t *szCommandLine, void *pUserData) | ||
{ | ||
DWORD dwValue; | ||
if(argc>=2) | ||
{ | ||
if(gpSyserPluginUI->CalcExp(argv[1], &dwValue)) | ||
{ | ||
gpSyserPluginUI->Outputf(WSTR("%s = %08x\n"), argv[1], dwValue); | ||
} | ||
} | ||
gpSyserPluginUI->Outputf(WSTR("hello world!\n")); | ||
return 0; | ||
} | ||
|
||
BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) | ||
{ | ||
switch (dwReason) | ||
{ | ||
case DLL_PROCESS_ATTACH: | ||
if(!gpSyserPluginUI->RegisterPluginModule(WSTR("SPCommand"), &PluginModule)) | ||
return FALSE; | ||
gpSyserPluginUI->InsertCmd(WSTR("calc"), syser_calc, NULL, WSTR("calc expression value."), WSTR("calc [parameter]")); | ||
//::DbgPrint("SPCommand : DllAttach\n"); | ||
break; | ||
case DLL_PROCESS_DETACH: | ||
gpSyserPluginUI->RemoveCmd(WSTR("calc")); | ||
gpSyserPluginUI->UnregisterPluginModule(WSTR("SPCommand")); | ||
//::DbgPrint("SPCommand : DllDetach\n"); | ||
break; | ||
|
||
case DLL_THREAD_ATTACH: | ||
break; | ||
|
||
case DLL_THREAD_DETACH: | ||
break; | ||
} | ||
return TRUE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1607 210517 | ||
- add handle int 3 | ||
- fix mouse scroll | ||
- fix memory leak PEFile read import |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
reverse engineering old syser win32 debugger into beautiful C++ code | ||
improve handle x64 arch | ||
|
||
<img width="40%" src="https://raw.githubusercontent.com/marakew/syser/master/images/SyserDebuggerx32.png"> | ||
<img width="40%" src="https://raw.githubusercontent.com/marakew/syser/master/images/SyserDebuggerx64.png"> | ||
|
||
## links | ||
https://exelab.ru/f/index.php?action=vthread&forum=3&topic=24745 release | ||
https://exelab.ru/f/index.php?action=vthread&forum=7&topic=24494 research | ||
https://www.reddit.com/r/ReverseEngineering/comments/6dh7ip/resorect_one_more_old_debugger_syser_debugger_by/ | ||
http://forum.exetools.com/showthread.php?t=18259 | ||
|
||
http://www.aoreteam.com/vb/showthread.php?t=12414 | ||
http://crack-tool.at.ua/forum/19-60-1#63 | ||
https://pediy.com/thread-218452.htm | ||
https://bbs.pediy.com/thread-217773.htm | ||
https://twitter.com/painter701/status/867904049441525760 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
#ifndef _PLUGIN_HPP_ | ||
#define _PLUGIN_HPP_ | ||
|
||
#include <windows.h> | ||
|
||
#define WSTR(x) L##x | ||
|
||
typedef int (*FPCmd)(int argc, const wchar_t *argv[], const wchar_t *szCommandLine, void *pUserData); | ||
|
||
typedef void (*PVFV)(); | ||
|
||
struct SYSER_PLUGIN_MODULE | ||
{ | ||
wchar_t PluginInfo[32]; | ||
PVFV fpOnDebuggerOpen; | ||
PVFV fpOnDebuggerClose; | ||
PVFV fpOnDebuggerPlunge; | ||
}; | ||
|
||
struct CSyserUI | ||
{ | ||
virtual bool RegisterPluginModule(const wchar_t *ModuleName, SYSER_PLUGIN_MODULE *pPluginModule); | ||
virtual bool UnregisterPluginModule(const wchar_t *ModuleName); | ||
virtual int GetInstrLen(unsigned long Address); | ||
virtual bool CalcExp(const wchar_t *szExp, unsigned long *pResult); | ||
virtual bool InsertCmd(const wchar_t *szCmd, FPCmd pCmdProc, void *pUserData, const wchar_t *pComment, const wchar_t *pUsage); | ||
virtual void RemoveCmd(const wchar_t *szCmd); | ||
virtual int RunCmd(const wchar_t *szCmd); | ||
virtual void Outputf(const wchar_t *szMsg, ...); | ||
virtual void Output(const unsigned long *szMsg); | ||
virtual void *InsertMenu(void *hParentMenu, const wchar_t *szMenuName, void *fpMenuProc); | ||
virtual bool RemoveMenu(void *hMenu); | ||
virtual bool EnableMenu(void *hMenu, bool bEnable); | ||
virtual void *GetMainTabWnd(); | ||
virtual void *GetMainMenu(); | ||
virtual void *GetWisp(); | ||
virtual unsigned long WriteMemory(unsigned long Address, void *Buffer, unsigned long Size); | ||
virtual unsigned long ReadMemory(unsigned long Address, void *Buffer, unsigned long Size); | ||
}; | ||
|
||
extern "C" __declspec(dllimport) CSyserUI *gpSyserPluginUI; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
#include "plugin.hpp" | ||
|
||
void OnDebuggerOpen() | ||
{ | ||
//Syser Loaded Notify | ||
//::DbgPrint("SPCommand : OnDebuggerOpen\n"); | ||
} | ||
|
||
void OnDebuggerClose() | ||
{ | ||
//Syser Unload Notify | ||
//::DbgPrint("SPCommand : OnDebuggerClose\n"); | ||
} | ||
|
||
void OnDebuggerPlunge() | ||
{ | ||
//Syser | ||
//::DbgPrint("SPCommand : OnDebuggerPlunge\n"); | ||
} | ||
|
||
SYSER_PLUGIN_MODULE PluginModule = | ||
{ | ||
L"Syser Command Plugin Module", | ||
OnDebuggerOpen, | ||
OnDebuggerClose, | ||
OnDebuggerPlunge, | ||
}; | ||
|
||
int syser_calc(int argc, const wchar_t *argv[], const wchar_t *szCommandLine, void *pUserData) | ||
{ | ||
DWORD dwValue; | ||
if(argc>=2) | ||
{ | ||
if(gpSyserPluginUI->CalcExp(argv[1], &dwValue)) | ||
{ | ||
gpSyserPluginUI->Outputf(WSTR("%s = %08x\n"), argv[1], dwValue); | ||
} | ||
} | ||
gpSyserPluginUI->Outputf(WSTR("hello world!\n")); | ||
return 0; | ||
} | ||
|
||
BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) | ||
{ | ||
switch (dwReason) | ||
{ | ||
case DLL_PROCESS_ATTACH: | ||
if(!gpSyserPluginUI->RegisterPluginModule(WSTR("SPCommand"), &PluginModule)) | ||
return FALSE; | ||
gpSyserPluginUI->InsertCmd(WSTR("calc"), syser_calc, NULL, WSTR("calc expression value."), WSTR("calc [parameter]")); | ||
//::DbgPrint("SPCommand : DllAttach\n"); | ||
break; | ||
case DLL_PROCESS_DETACH: | ||
gpSyserPluginUI->RemoveCmd(WSTR("calc")); | ||
gpSyserPluginUI->UnregisterPluginModule(WSTR("SPCommand")); | ||
//::DbgPrint("SPCommand : DllDetach\n"); | ||
break; | ||
|
||
case DLL_THREAD_ATTACH: | ||
break; | ||
|
||
case DLL_THREAD_DETACH: | ||
break; | ||
} | ||
return TRUE; | ||
} | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.