PDA

View Full Version : Plugin request 2


Anonymous
November 19th, 2002, 14:04
Hey Gigapede!

It'd be handy if your CmdLine plugin would show ascii and dec values of a hex string when the "?" command is used. SoftIce does that. I'm not good at C (work as Java coder), but I made a small modification to the Express function. Here is the code, don't laugh if I've made some mistake. Anyway, it works for me.

Code:

int IsHex(const char* str)
{
char* ec;
if (str == (char*)0 || *str == '\0')
return 0 ;
(void)strtoul(str, &ec, 16) ;
return *ec == '\0' ;
}

int Express(char *answer,ulong parm) {
int i;
char *p;
char *v = value.value;
char *tmp;
tmp = malloc(5);
tmp[4] = '\0';

if(IsHex(v))
{
for(i = 0; i < 4; i++)
tmp[I] = (char)(v[i*2] * 0x10 + v[i*2+1]);

sprintf(answer, "HEX: %s - ASCII: %s - DEC: %d", v, tmp, strtol(v, &p, 16));
}
else
strcpy(answer,v);

free(tmp);
return 0;
};

TBD
November 19th, 2002, 22:49
kewl ... do you have a compilied plugin to share with world ? would be nice )

psyCK0
November 20th, 2002, 03:53
Ok, here is the link...
www.wascrew.com/CmdBar.dll
("http://www.wascrew.com/CmdBar.dll
")

This also fixes the null-pointer bug with the ASM command
I mentioned in the "Plugin request" thread.

Of course all creds go to Gigapede, I only made small adjustments
to his code. =)

TBD
November 20th, 2002, 04:22
psyCK0: the link doesnt work from my side. could you please email to me and i will try to host it here. also i sent you an email about this

psyCK0
November 20th, 2002, 05:14
TBD: done

TBD
November 20th, 2002, 06:21
psyCK0's bugfixed command bar plugin available here psyCK0_CmdBar.zip ("http://rohanpall.com/ollydbg/files/psyCK0_CmdBar.zip")

rohan
November 20th, 2002, 07:06
Oops.

Gigapede
November 20th, 2002, 18:11
update cmdbar 1.00 beta4
*bug fix "ASM" command
*show DEC and ASCII using "?" command [request2](include some fix for decoding ASCII)
*bug fix in cmdexec.c/Execute():

case 'V': // Value of expression
n=Expression(&value,s,0,0,NULL,0,0,Getcputhreadid());
-> if (n<0 || result.type==DEC_UNKNOWN) {
this shoude be(?)
-> if (n<0 || value.type==DEC_UNKNOWN) {

Gigapede
November 20th, 2002, 19:15
TBD: Sorry, I mistook your name.

Ooops! I found out "Edit" after post.

Ricardo Narvaja
November 22nd, 2002, 10:08
Where i can download the plugin of gigapede, in the page of OLLYDBG in Download? is cmndline plugin is this?

Thanks
Ricardo

mfn
November 22nd, 2002, 10:46
ricnar456:

http://rohanpall.com/ollydbg/files/ ("http://rohanpall.com/ollydbg/files/")

Ricardo Narvaja
November 22nd, 2002, 12:01
yes i found and how i use this, i put de dll in the same directory and when i RUn olly a error in kernel32.dll apears and close OLLY, no instructios or configuration is in the zip, how i use this plugin.

Ricardo

mfn
November 22nd, 2002, 12:13
ricnar456:
If you use cmdbar on Win9x, it doesnt work.
It's a strange bug.
Currently, cmdbar works only on WinNT based OS

Ricardo Narvaja
November 22nd, 2002, 14:08
arghhhh, 90 % of the users of OLLY in mi list, use W98 SE, why not repair this strange bug first, is a very bad new, buaaa.

Ricardo