IDA idc functions

Posts: 488
Joined: Sat Dec 15, 2018 7:38 am

IDA idc functions

Postby Gampy » Tue Nov 19, 2019 1:33 pm

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??
I'm not angry, I'm a blatant, driven, passionate individual that is extremely intense!

Site Admin
User avatar
Posts: 6091
Joined: Sat Feb 28, 2009 8:34 pm

Re: IDA idc functions

Postby antus » Tue Nov 19, 2019 3:46 pm

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.
Have you read the FAQ? For lots of information and links to significant threads see here: viewtopic.php?f=7&t=1396

Posts: 488
Joined: Sat Dec 15, 2018 7:38 am

Re: IDA idc functions

Postby Gampy » Tue Nov 19, 2019 8:42 pm

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
I'm not angry, I'm a blatant, driven, passionate individual that is extremely intense!

Site Admin
User avatar
Posts: 6091
Joined: Sat Feb 28, 2009 8:34 pm

Re: IDA idc functions

Postby antus » Thu Nov 21, 2019 5:23 pm

Good pick. Thats for posting the solution back for others!
Have you read the FAQ? For lots of information and links to significant threads see here: viewtopic.php?f=7&t=1396

Return to Disassembly and Reassembly

Who is online

Users browsing this forum: No registered users and 0 guests