Skip to content

Commit

Permalink
replace openquote bad char by hexa, and remove unused icon formats
Browse files Browse the repository at this point in the history
  • Loading branch information
epsylon3 committed Jan 10, 2011
1 parent 7dc268c commit 1d07460
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
18 changes: 9 additions & 9 deletions ODbgScript.cpp
Expand Up @@ -15,7 +15,7 @@ char buff[65535] = {0};
// Script state
int script_state = SS_NONE;

/*
#ifndef __AFX_H__
// Entry point into a plugin DLL. Many system calls require DLL instance
// which is passed to DllEntryPoint() as one of parameters. Remember it.
BOOL APIENTRY DllMain(HINSTANCE hi,DWORD reason,LPVOID reserved)
Expand All @@ -37,12 +37,12 @@ BOOL APIENTRY DllMain(HINSTANCE hi,DWORD reason,LPVOID reserved)

return TRUE;
}
*/
#endif

// Report plugin name and return version of plugin interface.
extc int _export cdecl ODBG_Plugindata(char shortname[32])
{
strcpy(shortname,"ODbgScript");
strcpy(shortname, "ODbgScript");
return PLUGIN_VERSION;
}

Expand All @@ -54,13 +54,13 @@ extc int _export cdecl ODBG_Plugininit(int ollydbgversion, HWND hw, ulong *featu
HINSTANCE hinst;

if(ollydbgversion < PLUGIN_VERSION) {
MessageBox(hwndOllyDbg(), "Incompatible Ollydbg Version !", "ODbgScript", MB_OK | MB_ICONERROR | MB_TOPMOST);
MessageBox(hwndOllyDbg(), TEXT("Incompatible Ollydbg Version !"), TEXT("ODbgScript"), MB_OK | MB_ICONERROR | MB_TOPMOST);
return -1;
}

// Report plugin in the log window.
Addtolist(0, 0, "ODbgScript v%i.%i.%i " VERSIONCOMPILED ,VERSIONHI,VERSIONLO,VERSIONST);
Addtolist(0, -1," http://odbgscript.sf.net");
Addtolist(0, -1, " http://odbgscript.sf.net");
ollylang = new OllyLang();

if (Createsorteddata(&ollylang->wndProg.data,"ODbgScript Data",
Expand Down Expand Up @@ -146,7 +146,7 @@ extc void _export cdecl ODBG_Pluginmainloop(DEBUG_EVENT *debugevent)
}
catch( ... )
{
MessageBox(hwndOllyDbg(), "An error occured in the plugin!\nPlease contact Epsylon3.", "ODbgScript", MB_OK | MB_ICONERROR | MB_TOPMOST);
MessageBox(hwndOllyDbg(), TEXT("An error occured in the plugin!\nPlease contact Epsylon3."), TEXT("ODbgScript"), MB_OK | MB_ICONERROR | MB_TOPMOST);
}
}

Expand All @@ -163,7 +163,7 @@ extc void _export cdecl ODBG_Pluginmainloop(DEBUG_EVENT *debugevent)
}
catch( ... )
{
MessageBox(hwndOllyDbg(), "An error occured in the plugin!\nPlease contact Epsylon3.", "ODbgScript", MB_OK | MB_ICONERROR | MB_TOPMOST);
MessageBox(hwndOllyDbg(), TEXT("An error occured in the plugin!\nPlease contact Epsylon3."), TEXT("ODbgScript"), MB_OK | MB_ICONERROR | MB_TOPMOST);
delete ollylang;
}

Expand Down Expand Up @@ -368,7 +368,7 @@ extc void _export cdecl ODBG_Pluginaction(int origin, int action, void *item)
break;

case 1: // Abort
MessageBox(hwmain,"Script aborted!","ODbgScript",MB_OK|MB_ICONEXCLAMATION);
MessageBox(hwmain, TEXT("Script aborted!"), TEXT("ODbgScript"), MB_OK|MB_ICONEXCLAMATION );
ollylang->Reset();
ollylang->Pause();
break;
Expand Down Expand Up @@ -402,7 +402,7 @@ extc void _export cdecl ODBG_Pluginaction(int origin, int action, void *item)
"Compiled %s %s \n"
VERSIONCOMPILED "\n",
VERSIONHI,VERSIONLO,VERSIONST, __DATE__, __TIME__);
MessageBox(hwmain,s,"ODbgScript",MB_OK|MB_ICONINFORMATION);
MessageBox(hwmain, s, TEXT("ODbgScript"), MB_OK|MB_ICONINFORMATION );
break;
case 20:
{
Expand Down
4 changes: 2 additions & 2 deletions ODbgScript.vcproj
Expand Up @@ -56,7 +56,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="C:\WinDDK\7600.16385.1\inc\api\crt\stl60;C:\WinDDK\7600.16385.1\inc\api;C:\WinDDK\7600.16385.1\inc\crt;C:\WinDDK\7600.16385.1\inc\crt\sys;C:\WinDDK\7600.16385.1\inc\mfc42"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ODBGSCRIPT_EXPORTS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;ODBGSCRIPT_EXPORTS"
IgnoreStandardIncludePath="true"
StringPooling="true"
ExceptionHandling="0"
Expand Down Expand Up @@ -168,7 +168,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="C:\WinDDK\7600.16385.1\inc\api\crt\stl60;C:\WinDDK\7600.16385.1\inc\api;C:\WinDDK\7600.16385.1\inc\crt;C:\WinDDK\7600.16385.1\inc\crt\sys;C:\WinDDK\7600.16385.1\inc\mfc42"
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_DEBUG;ODBGSCRIPT_EXPORTS"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;ODBGSCRIPT_EXPORTS"
IgnoreStandardIncludePath="true"
StringPooling="true"
ExceptionHandling="0"
Expand Down
17 changes: 9 additions & 8 deletions OllyLang.cpp
Expand Up @@ -1424,8 +1424,8 @@ bool OllyLang::GetANYOpValue(string op, string &value, bool hex8forExec)
{
if (addr!=0) {

//Pointer Mark in Values column
setProgLineValue(script_pos+1,(string) "®");
//Pointer Mark in Values column (open quote char '<<')
setProgLineValue(script_pos+1, (string) "\xAE");

char buffer[STRING_READSIZE] = {0};
Readmemory(&buffer[0], addr, STRING_READSIZE, MM_SILENT);
Expand Down Expand Up @@ -1527,8 +1527,8 @@ bool OllyLang::GetSTROpValue(string op, string &value, int size)

if(GetDWOpValue(op, addr)) {

//Pointer Mark in Values column
setProgLineValue(script_pos+1,(string) "®");
//Pointer Mark in Values column (open quote char '<<')
setProgLineValue(script_pos+1, (string) "\xAE");

if (size>0) {

Expand Down Expand Up @@ -1764,8 +1764,8 @@ bool OllyLang::GetDWOpValue(string op, DWORD &value, DWORD default_val)

if(GetDWOpValue(op, addr)) {

//Pointer Mark in Values column
setProgLineValue(script_pos+1,(string) "®");
//Pointer Mark in Values column (open quote char '<<')
setProgLineValue(script_pos+1, (string) "\xAE");

Readmemory(&value, addr, 4, MM_SILENT);
if (var_logging)
Expand Down Expand Up @@ -1821,8 +1821,9 @@ bool OllyLang::GetFLTOpValue(string op, long double &value)

if(GetDWOpValue(op, addr)) {

//Pointer Mark in Values column
setProgLineValue(script_pos+1,(string) "®");
//Pointer Mark in Values column (open quote char '<<')
string openquote = "®";
setProgLineValue(script_pos+1, openquote);

Readmemory(&value, addr, 8, MM_SILENT);
if (var_logging)
Expand Down
Binary file modified log.ico
Binary file not shown.
Binary file modified script.ico
Binary file not shown.

0 comments on commit 1d07460

Please sign in to comment.