Esempio n. 1
0
int Mabout(t_table* pt, wchar_t* name, ulong index, int mode)
{
	switch (mode)
	{
		case MENU_VERIFY:
			return MENU_NORMAL;

		case MENU_EXECUTE:
			// Debuggee should continue execution while message box is displayed.
			Resumeallthreads();
			wchar_t s[256];
			wsprintf(s, L"ODbgScript plugin v%i.%i.%i\n"
			         L"by tpruvot@github\n\n"
			         L"Based on OllyScript by SHaG\n"
			         L"PE dumper by R@dier\n"
			         L"Byte replacement algo by Hex\n\n"
			         L"http://odbgscript.sf.net/ \n\n"
			         L"Compiled %s %s \n"
			         VERSIONCOMPILED L"\n",
			         VERSIONHI, VERSIONLO, VERSIONST, w_strtow(__DATE__).c_str(), w_strtow(__TIME__).c_str());

			MessageBox(hwollymain, s, PLUGIN_NAME, MB_OK | MB_ICONINFORMATION );

			// Suspendallthreads() and Resumeallthreads() must be paired, even if they are called in inverse order!
			Suspendallthreads();
			return MENU_NOREDRAW;

		default:
			return MENU_ABSENT;
	}
}
Esempio n. 2
0
// Menu function of main menu, displays About dialog.
static int Mabout(t_table *pt,wchar_t *name,ulong index,int mode) {
  int n;
  wchar_t s[TEXTLEN];
  if (mode==MENU_VERIFY)
    return MENU_NORMAL;                // Always available
  else if (mode==MENU_EXECUTE) {
    // Debuggee should continue execution while message box is displayed.
    Resumeallthreads();
    // In this case, Swprintf() would be as good as a sequence of StrcopyW(),
    // but secure copy makes buffer overflow impossible.
    n=StrcopyW(s,TEXTLEN,L"DiffSnake plugin v");
    n+=StrcopyW(s+n,TEXTLEN-n,VERSION);
    // COPYRIGHT POLICY: This bookmark plugin is an open-source freeware. It's
    // just a sample. The copyright below is also just a sample and applies to
    // the unmodified sample code only. Replace or remove copyright message if
    // you make ANY changes to this code!
    n+=StrcopyW(s+n,TEXTLEN-n,L"\nCopyright none. This software is free as a bird");
    // The conditionals below are here to verify that this plugin can be
    // compiled with all supported compilers. They are not necessary in the
    // final code.
    #if defined(__BORLANDC__)
      n+=StrcopyW(s+n,TEXTLEN-n,L"\n\nCompiled with Borland (R) ");
    #elif defined(_MSC_VER)
      n+=StrcopyW(s+n,TEXTLEN-n,L"\n\nCompiled with Microsoft (R) ");
    #elif defined(__MINGW32__)
      n+=StrcopyW(s+n,TEXTLEN-n,L"\n\nCompiled with MinGW32 ");
    #else
      n+=StrcopyW(s+n,TEXTLEN-n,L"\n\nCompiled with ");
    #endif
    #ifdef __cplusplus
      StrcopyW(s+n,TEXTLEN-n,L"C++ compiler");
    #else
      StrcopyW(s+n,TEXTLEN-n,L"C compiler");
    #endif
    MessageBox(hwollymain,s,
      L"DiffSnake plugin",MB_OK|MB_ICONINFORMATION);
    // Suspendallthreads() and Resumeallthreads() must be paired, even if they
    // are called in inverse order!
    Suspendallthreads();
    return MENU_NOREDRAW;
  };
  return MENU_ABSENT;
};