Pages: 1 [2]
Author Topic: ME7idatool  (Read 10434 times)
kirukisu
Jr. Member
**

Karma: +1/-3
Offline Offline

Posts: 25


« Reply #15 on: October 15, 2022, 07:41:17 AM »

Any idea why i get this?


Code:
---------------------------
Warning
---------------------------
C:\Users\kiruk\Downloads\me7idatool0.9.81.py: inconsistent use of tabs and spaces in indentation (C:/Users/kiruk/Downloads/me7idatool0.9.81.py, line 1231)
Traceback (most recent call last):
  File "C:\Users\kiruk\OneDrive\Desktop\IDA\python\3\ida_idaapi.py", line 615, in IDAPython_ExecScript
    code = compile(raw.decode(encoding), script, 'exec')
  File "C:/Users/kiruk/Downloads/me7idatool0.9.81.py", line 1231
    idc.MakeCode(curaddr)
    ^
TabError: inconsistent use of tabs and spaces in indentation

---------------------------
OK   
---------------------------
Logged
R32Dude
Full Member
***

Karma: +45/-10
Offline Offline

Posts: 246



« Reply #16 on: October 15, 2022, 05:14:24 PM »

Awesome work DT, when you think you are done with the c25ea01g can you please upload the finished ida file? Im working on the same , but manually, and it will be interesting to see how well they match up!
Logged
DT
Full Member
***

Karma: +20/-1
Offline Offline

Posts: 184


« Reply #17 on: October 15, 2022, 06:31:01 PM »

Awesome work DT, when you think you are done with the c25ea01g can you please upload the finished ida file? Im working on the same , but manually, and it will be interesting to see how well they match up!
Why would you work manually when you can fix almost everything within a few minutes with me7idatool?  Huh
Logged

flamy
Full Member
***

Karma: +6/-0
Offline Offline

Posts: 56


« Reply #18 on: October 15, 2022, 10:26:59 PM »

Any idea why i get this?


Code:
---------------------------
Warning
---------------------------
C:\Users\kiruk\Downloads\me7idatool0.9.81.py: inconsistent use of tabs and spaces in indentation (C:/Users/kiruk/Downloads/me7idatool0.9.81.py, line 1231)
Traceback (most recent call last):
  File "C:\Users\kiruk\OneDrive\Desktop\IDA\python\3\ida_idaapi.py", line 615, in IDAPython_ExecScript
    code = compile(raw.decode(encoding), script, 'exec')
  File "C:/Users/kiruk/Downloads/me7idatool0.9.[code]
81.py", line 1231
             idc.MakeCode(curaddr)
    ^
TabError: inconsistent use of tabs and spaces in indentation

---------------------------
OK   
---------------------------
[/code]

Try going to line 1231 of DT’s script an change:
Code:
			idc.MakeCode(curaddr)

to:
Code:
        idc.MakeCode(curaddr)

to use spaces instead of tabs for identation.
Please give feedback afterwards whether it works, or not.
Logged
kirukisu
Jr. Member
**

Karma: +1/-3
Offline Offline

Posts: 25


« Reply #19 on: October 16, 2022, 01:15:02 AM »

It helped at line 1231 and 1222 i have no programming skill whatsoever, but its interesting topic and i'm motivated to learn.
Another EDIT: line 1230 also solved.
Now i get this, i see you had it also, will try to solve it. Did your steps but still have message.


Code:
---------------------------
Warning
---------------------------
C:\Users\kiruk\Downloads\me7idatool0.9.81.py: No module named 'win32clipboard'
Traceback (most recent call last):
  File "C:\Users\kiruk\OneDrive\Desktop\IDA\python\3\ida_idaapi.py", line 616, in IDAPython_ExecScript
    exec(code, g)
  File "C:/Users/kiruk/Downloads/me7idatool0.9.81.py", line 2, in <module>
    import csv, os, sys, re, io, functools, array, string, binascii, win32clipboard, ctypes, win32api, time, ast, idaapi, idautils, itertools, ida_kernwin, datetime
ModuleNotFoundError: No module named 'win32clipboard'

---------------------------
OK  
---------------------------
« Last Edit: October 16, 2022, 02:04:37 AM by kirukisu » Logged
DT
Full Member
***

Karma: +20/-1
Offline Offline

Posts: 184


« Reply #20 on: October 16, 2022, 02:26:43 AM »

I think your problem is that you are running Python 3. When I started working on this. I looked at python examples in various threads and from what I recall those where python 2.x. Hence I continued on that path and now I think there is way to much work to port it to Python3. Random use of Global  variables is not in a pythonic way and are likely to break in Python3.
Quote
"C:\Users\kiruk\OneDrive\Desktop\IDA\python\3\ida_idaapi.py"
I can't understand what your problem were with line 1222 and 1230, there are no \t there.


btw. line 1231 is fixed for next release. There were three \t there that should have been spaces. Though fix is not needed for Python 2.x
« Last Edit: October 16, 2022, 02:32:29 AM by DT » Logged

R32Dude
Full Member
***

Karma: +45/-10
Offline Offline

Posts: 246



« Reply #21 on: October 16, 2022, 04:09:38 AM »

Why would you work manually when you can fix almost everything within a few minutes with me7idatool?  Huh
I havent used the tool yet as I need to install python on another pc.
Does your tool add functions such as check_mirror, wnwra_5ms for example?
Logged
Blazius
Hero Member
*****

Karma: +89/-40
Offline Offline

Posts: 1277



« Reply #22 on: October 16, 2022, 11:25:43 AM »

Well I gave this a go on Ida 6.1 and 7.0 with python 3 latest and python 2.7 too, but does not seem to work.


Code:
Traceback (most recent call last):
  File "C:\Program Files (x86)\IDA\python\idaapi.py", line 373, in IDAPython_ExecScript
    execfile(script, g)
  File "C:/Users/Administrator/Downloads/me7idatool0.9.81.py", line 59
    return value in {0x204, 0x205, 0x206, 0x207, 0x209, 0x20a, 0x20b} #0x208 is strictly code segment
                          ^
SyntaxError: invalid syntax
Logged
flamy
Full Member
***

Karma: +6/-0
Offline Offline

Posts: 56


« Reply #23 on: October 16, 2022, 02:47:41 PM »

If someone source the IROM of 022906032CA this particular bin/a2l with addition would make a highly useful idb for working with any ME7.
I hope these file can help you. MPC-file should be the IROM. A2L-file also attached.
« Last Edit: October 16, 2022, 03:19:32 PM by flamy » Logged
kirukisu
Jr. Member
**

Karma: +1/-3
Offline Offline

Posts: 25


« Reply #24 on: October 17, 2022, 12:15:15 AM »

I think your problem is that you are running Python 3. When I started working on this. I looked at python examples in various threads and from what I recall those where python 2.x. Hence I continued on that path and now I think there is way to much work to port it to Python3. Random use of Global  variables is not in a pythonic way and are likely to break in Python3.I can't understand what your problem were with line 1222 and 1230, there are no \t there.


btw. line 1231 is fixed for next release. There were three \t there that should have been spaces. Though fix is not needed for Python 2.x

How can i force IDA to use python 2.7? So far i uninstalled all python 3, run pip install pywin32 again, but now, i cant even import .py scripts

Code:
....plugins\idapython3_64.dll: can't load file
Logged
flamy
Full Member
***

Karma: +6/-0
Offline Offline

Posts: 56


« Reply #25 on: October 17, 2022, 02:32:35 AM »

How can i force IDA to use python 2.7? So far i uninstalled all python 3, run pip install pywin32 again, but now, i cant even import .py scripts

Code:
....plugins\idapython3_64.dll: can't load file

Uninstall Python completely an install this one:

1.) Install Python 2.7.18 (Get it here: https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi)
2.) Add "C:\Python27" and "C:\Python27\Scripts" to environment variable PATH
3.) Execute "pip install pywin32" from commandline
4.) Run IDA Pro, open/start project and add script via Alt+F7
5.) Call functions listed above.
Logged
kirukisu
Jr. Member
**

Karma: +1/-3
Offline Offline

Posts: 25


« Reply #26 on: October 17, 2022, 12:36:38 PM »

Done all that, IDA still looking for idapython3_64.dll
In cfg file i have // IDAPYTHON_VERSION_MAJOR = 2 ,when uncomment it says "illegal keyword in the configuration file". Still fighting Tongue
« Last Edit: October 17, 2022, 01:10:45 PM by kirukisu » Logged
DT
Full Member
***

Karma: +20/-1
Offline Offline

Posts: 184


« Reply #27 on: October 26, 2022, 06:15:17 PM »

v0.9.89

Serious DPP error which was introduced in 0.9.81 is now fixed.

check out what me7jumptable() can accomplish now, it outputs an address to to timTab1 which you can click on in Output window.

Also included a new smarter version of C25ea01g_additional_names.py. Now it includes all KWP2000 labels. (only for c25ea01g.bin like mentioned above in another post)

@nyet, perhaps you can move all python questions to a new "python questions" thread?
Logged

Jacce75
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


« Reply #28 on: April 07, 2024, 11:32:56 AM »

This script makes code even more understandable after using ME7idatool on C25ea01g.bin . Though it might break some features of ME7idatool, i've not tested me7findcode() and me7nameit() afterwords yet.
Unfortunately I need to fix some things before it works well on an ST10 file like C25ea01g.bin.

btw. If someone source the IROM of 022906032CA this particular bin/a2l with addition would make a highly useful idb for working with any ME7.

edit 221013:
I posted a bit too early. I forgot that I had not fixed a few names in the attached file. Will post a better version later.
I have a 022906032CA_8087 bin. Still need it?
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.025 seconds with 17 queries. (Pretty URLs adds 0s, 0q)