Page 1 of 1

IDA idc functions

Posted: Tue Nov 19, 2019 1:33 pm
by Gampy
Hi all,

Trying to create an IDA6.8 idc, having an issue, can't find the answer, thought I'd ask here.

This works:

Code: Select all

static main() {
  MakeNameEx(0x9458, "Testing123Testing", 0);
}
This does not and screams "Undefined Function MakeByte"

Code: Select all

static main() {
  MakeByte(0x9458);
}
Both are in the Help, MakeByte works from the Python Command line.

This is also true for other functions ... Like MakeWord, MakeDword.

Any idea on the errors of my ways??

Re: IDA idc functions

Posted: Tue Nov 19, 2019 3:46 pm
by antus
Not off the top of my head but you could export your database to idc and then look for examples within the exported file which ida will generate.

Re: IDA idc functions

Posted: Tue Nov 19, 2019 8:42 pm
by Gampy
OMFG I didn't even think about that, even already have one from the same binary, I guess that's why you get paid the BIG BUCKS!

I looked at hundreds of scripts online, never a local IDA creation. DUH!

So the issue fix is ... DING DING DING ... #include <idc.idc>
To give myself a little credit, I did search for imports and or includes without successful hints.

Thanks Antus

Re: IDA idc functions

Posted: Thu Nov 21, 2019 5:23 pm
by antus
Good pick. Thats for posting the solution back for others!