phila_dot
|
|
« Reply #15 on: December 06, 2012, 08:54:39 AM »
|
|
|
Updated this script. Now you can load a ME7Logger .ecu file and it will name all the variables for you...
Awesome feature. I wanted to write an IDA script for labelling variables. How does it handle condition bits? Enumerating bit fields? I personally like to split the files so that the map offsets reference the correct location (plus I'm weird and meticulous about this sort of thing), but if you have a good solution for condition bits then I might have to adopt this. Can the labelling feature be used exclusive of the loading script? Great contribution regardless.
|
|
|
Logged
|
|
|
|
prj
|
|
« Reply #16 on: December 06, 2012, 09:04:09 AM »
|
|
|
The labeling feature can be used exclusive, as the whole GUI can. Simply delete everything in the file until the first #Include. It does not handle bits at all. It only populates those variables where the bitmask is 0x0000. Look inside in the file, it's very simple code. It's just a text script... This is the ECU loading part: Func LoadEcu() StopAll() Local $ecufile = FileOpenDialog("Select .ecu file...", @WorkingDir, "ME7Logger ECU files (*.ecu)"); If Not @error Then WinActivate("IDA") Local $openedfile = FileOpen($ecufile) Local $line While $line <> "[Measurements]" $line = FileReadLine($openedfile) if @error = -1 then ExitLoop WEnd AutoItSetOption("SendKeyDelay", 0) While 1 $line = FileReadLine($openedfile) If @error = -1 Then ExitLoop If StringLeft($line, 1) = ";" or $line = "" Then ContinueLoop EndIf Local $data = StringSplit($line, ",") If (StringStripWS($data[5], 8) = "0x0000") Then SetVarName(StringStripWS($data[1], 8), StringStripWS($data[3], 8)) EndIf WEnd AutoItSetOption("SendKeyDelay", 5) FileClose($ecufile) EndIf EndFunc
Func SetVarName($name, $addr) ControlFocus("IDA", "", "[CLASSNN:TMemo1]"); Send("MakeNameEx(" & $addr & ", """ & $name & """, 0x01){ENTER}") EndFunc
|
|
|
Logged
|
|
|
|
phila_dot
|
|
« Reply #17 on: December 06, 2012, 09:54:10 AM »
|
|
|
The labeling feature can be used exclusive, as the whole GUI can. Simply delete everything in the file until the first #Include. It does not handle bits at all. It only populates those variables where the bitmask is 0x0000. Look inside in the file, it's very simple code. It's just a text script... This is the ECU loading part: Func LoadEcu() StopAll() Local $ecufile = FileOpenDialog("Select .ecu file...", @WorkingDir, "ME7Logger ECU files (*.ecu)"); If Not @error Then WinActivate("IDA") Local $openedfile = FileOpen($ecufile) Local $line While $line <> "[Measurements]" $line = FileReadLine($openedfile) if @error = -1 then ExitLoop WEnd AutoItSetOption("SendKeyDelay", 0) While 1 $line = FileReadLine($openedfile) If @error = -1 Then ExitLoop If StringLeft($line, 1) = ";" or $line = "" Then ContinueLoop EndIf Local $data = StringSplit($line, ",") If (StringStripWS($data[5], 8) = "0x0000") Then SetVarName(StringStripWS($data[1], 8), StringStripWS($data[3], 8)) EndIf WEnd AutoItSetOption("SendKeyDelay", 5) FileClose($ecufile) EndIf EndFunc
Func SetVarName($name, $addr) ControlFocus("IDA", "", "[CLASSNN:TMemo1]"); Send("MakeNameEx(" & $addr & ", """ & $name & """, 0x01){ENTER}") EndFunc I will definitely be giving this a try. It will be nice to quickly populate new databases. Thanks.
|
|
|
Logged
|
|
|
|
jibberjive
|
|
« Reply #18 on: January 24, 2013, 08:36:47 PM »
|
|
|
Much thanks.
|
|
|
Logged
|
|
|
|
prj
|
|
« Reply #19 on: January 25, 2013, 04:16:04 AM »
|
|
|
You're welcome.
I wanted to say that, those people having problems with this. Make sure you don't run the 64 bit version of IDA!
I tried it with that and nothing worked. There is no need to run the 64 bit version unless you want to disassemble 64 bit binaries anyway. So basically make sure you are starting it using "idag.exe".
|
|
|
Logged
|
|
|
|
Bische
|
|
« Reply #20 on: March 24, 2013, 01:23:37 PM »
|
|
|
Thanks again,
I noticed in the updated script attempts to convert to code if there was no function (pc^u vs. p^u), this pops a dialog where it asks if it should covert to code or not - halting the script.
Is this a IDA version mismatch somehow? I am running 6.1.
|
|
|
Logged
|
|
|
|
prj
|
|
« Reply #21 on: April 12, 2013, 07:45:14 AM »
|
|
|
Thanks again,
I noticed in the updated script attempts to convert to code if there was no function (pc^u vs. p^u), this pops a dialog where it asks if it should covert to code or not - halting the script.
Is this a IDA version mismatch somehow? I am running 6.1.
If that dialog has an option to never ask again, then enable it
|
|
|
Logged
|
|
|
|
Bische
|
|
« Reply #22 on: April 15, 2013, 03:08:41 AM »
|
|
|
Its just Yes, No or Cancel.
|
|
|
Logged
|
|
|
|
prj
|
|
« Reply #23 on: April 17, 2013, 07:15:51 AM »
|
|
|
Its just Yes, No or Cancel. It's when you go over stuff that has already been identified I think... Do a couple of binaries, and you will see a pattern as to where program code is located. There is no need to let it go over the entire binary.
|
|
|
Logged
|
|
|
|
nyet
|
|
« Reply #24 on: April 17, 2013, 09:05:25 AM »
|
|
|
Is there a way to share idapro setups w/o all this search stuff?
i freaking hate IDEs for this reason... all sorts of stupid shit hard coded into some idiotic binary "saved workspace" bullshit.
|
|
|
Logged
|
ME7.1 tuning guideECUx PlotME7Sum checksumTrim heatmap toolPlease do not ask me for tunes. I'm here to help people make their own. Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
|
|
|
nyet
|
|
« Reply #25 on: May 11, 2013, 12:21:21 PM »
|
|
|
BTW this does not work with the ida pro 6.1.0110409 floating around the torrent sites.
Almost nothing in the autoit script matches up, not even the first WinWait() calls.
|
|
« Last Edit: May 11, 2013, 12:23:15 PM by nyet »
|
Logged
|
ME7.1 tuning guideECUx PlotME7Sum checksumTrim heatmap toolPlease do not ask me for tunes. I'm here to help people make their own. Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
|
|
|
prj
|
|
« Reply #26 on: May 11, 2013, 02:21:30 PM »
|
|
|
I am using IDA Pro 6 and everything is OK.
Well, I guess it has to be modified a little. Not that hard to do since the script is open source.
So feel free to mod it and then post the modded version, and I'll put it in the first post.
|
|
|
Logged
|
|
|
|
nyet
|
|
« Reply #27 on: May 11, 2013, 03:28:32 PM »
|
|
|
Yea, working on it now. Some stuff got moved around, and there are some new delays needed (in particular !esc and !esu don't work) I have it working up until the buttons. I will post it as soon as I get a working version. Right now I am working on the .ecu parser. The good news is that hacking this AutoIt script is teaching me stuff about IDA i didn't know
|
|
|
Logged
|
ME7.1 tuning guideECUx PlotME7Sum checksumTrim heatmap toolPlease do not ask me for tunes. I'm here to help people make their own. Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
|
|
|
nyet
|
|
« Reply #28 on: May 11, 2013, 04:50:12 PM »
|
|
|
What I have so far for IDA PRO 6.1.0110409
.ecu loading was fine. I was a moron.
Re-organized it into functions so you can load rom or flash whenever (or not, so you don't have to always start from scratch, say to import a new .ecu, or reanalyze).
|
|
« Last Edit: May 11, 2013, 06:22:21 PM by nyet »
|
Logged
|
ME7.1 tuning guideECUx PlotME7Sum checksumTrim heatmap toolPlease do not ask me for tunes. I'm here to help people make their own. Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
|
|
|
maZer.GTi
Full Member
Karma: +68/-6
Offline
Posts: 246
|
|
« Reply #29 on: September 18, 2013, 03:19:11 PM »
|
|
|
I modded some timings in the 6.1 Script. For me the timings was a way to short. I adjusted the timings, maybe someone need this script.
|
|
|
Logged
|
|
|
|
|