CTRL + P
仅在以下 EIP 范围内使用协议
添加要跳过的块上方和下方的范围
跳过的块!
编辑
不,插件内部似乎没有任何跳过功能。您好看到只有 MAX 64 (NRTPROT) 范围可以协议化并且地址在 t_range 中定义,下面的代码可以自动将一个范围自动放入对话框以用于后续范围您可能需要实现逻辑来检查选择是否在较早的块中,如果是,则将该块拆分为以下可在 vc++ 2010 express 中编译的代码
#define UNICODE
#define _CHAR_UNSIGNED
#include <windows.h>
#include "plugin.h"
#pragma comment(lib,"ollydbg.lib")
//grab the plugin.h and ollydbg.lib from visual c folder in plugin kit and put them along
//this cpp file open vs2k10 express ->new -> project from existing code -> Dll ->finish
// open project properties and disable INCREMENTAL save solution and quit gui
// open a vs2k10 command prompt and do msbuild /p:configuration=Release
BOOL WINAPI DllEntryPoint( HINSTANCE,DWORD,LPVOID ) { return 1; };
int Skiprangefromrtprot( t_table *pt, wchar_t *name, ulong index, int mode ) {
if (mode==MENU_VERIFY) { return MENU_NORMAL;
} else if ( mode==MENU_EXECUTE) {
Resumeallthreads();
t_dump *cpudump = Getcpudisasmdump();
ulong startsel = cpudump->sel0;
ulong endsel = cpudump->sel1;
t_module *curmod = Findmodule(startsel);
if(curmod != 0) {
Addprotocolrange(curmod->base,startsel);
Addprotocolrange(endsel,(curmod->base + curmod->size));
}
Suspendallthreads();
return MENU_NOREDRAW;
} else {
return MENU_ABSENT;
}
};
t_menu disasmmenu[] = {
{ L"|SkipFromRunTrace", NULL,K_NONE, Skiprangefromrtprot, NULL, 0 },
{ NULL, NULL,K_NONE, NULL, NULL, 0 }
};
extc int __cdecl ODBG2_Pluginquery( int ollydbgversion, ulong *features,
wchar_t pluginname[SHORTNAME], wchar_t pluginversion[SHORTNAME] ) {
if (ollydbgversion<201)
return 0;
wcscpy_s( pluginname, SHORTNAME,L"SkipFromRunTrace" );
wcscpy_s( pluginversion,SHORTNAME, L"2.00.01" );
return PLUGIN_VERSION;
};
extc t_menu * __cdecl ODBG2_Pluginmenu( wchar_t *type ) {
if (wcscmp(type,PWM_DISASM)==0)
return disasmmenu;
return NULL;
};