IDA idc functions

Disassembly, Reassembly, Tools and devleopment. Going deep with Hardware and Software.
Post Reply
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

IDA idc functions

Post 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??
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
antus
Site Admin
Posts: 8238
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: IDA idc functions

Post 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.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: IDA idc functions

Post 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
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
antus
Site Admin
Posts: 8238
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: IDA idc functions

Post by antus »

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: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
Post Reply