Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   import ida_bytes problem (https://forum.exetools.com/showthread.php?t=18746)

eychei 04-09-2018 05:02

import ida_bytes problem
 
Hi all,

I do have problems with IDA7.0
Loading a binary into the 32bit version does not load idapython.
It seams that this is only available through ida x64.
I can load my 32bit binary into ida x64 and run my python scripts. So far so good.
But when I want to use the Hex-Rays Plugin, it is not available.

Does anyone know how to solve this?

I also tried to load the python script into IDA6.8 32bit. There I have the problem that i get an error:

import ida_bytes
ImportError: No module named ida_bytes

I think that this module is maybe available in later versions of idapython.
Hope someone can help me out.

computerline 04-09-2018 11:59

Quote:

Originally Posted by eychei (Post 112983)
Hi all,

I do have problems with IDA7.0
Loading a binary into the 32bit version does not load idapython.
It seams that this is only available through ida x64.
I can load my 32bit binary into ida x64 and run my python scripts. So far so good.
But when I want to use the Hex-Rays Plugin, it is not available.

Does anyone know how to solve this?

I also tried to load the python script into IDA6.8 32bit. There I have the problem that i get an error:

import ida_bytes
ImportError: No module named ida_bytes

I think that this module is maybe available in later versions of idapython.
Hope someone can help me out.

Can't reproduce you error, could you attach your script, or more info about error, in ida 6.8, there not ida_bytes, to use bytes function, you could import idaapi and call all bytes functions it support

eychei 04-09-2018 14:52

It is this script.
https://github.com/duo-labs/idapython/blob/master/cortex_m_firmware.py

I do get this error:
import ida_bytes
ImportError: No module named ida_bytes

-e

computerline 04-09-2018 15:31

Quote:

Originally Posted by eychei (Post 112989)
It is this script.
https://github.com/duo-labs/idapython/blob/master/cortex_m_firmware.py

I do get this error:
import ida_bytes
ImportError: No module named ida_bytes

-e

In <IDADIR>/python, does you see ida_bytes.py file ? you could type in python console os.sys.path, does <IDADIR>/python exists in the path :D, maybe reinstall ida will solve problem.

eychei 04-09-2018 15:51

No there is no ida_bytes.py in the python directory.
Does someone have a newly compiled version?
I can not seem to find the newest version for ida 6.8.
They all seem to not have ida_bytes.py.

-e

computerline 04-09-2018 16:00

ida6.8 do not have ida_bytes.py, instead all function include in idaapi, ida_bytes is on ida7.x only, ida include compiled version of idapython, maybe the package that you used to install is missing, you could find the full installer on this forum, and try to reinstall it.

eychei 04-09-2018 16:49

Thx.
Idapython is working but can i change the script to work with Idapython 6.8?
Just use Import idaapi?

computerline 04-10-2018 10:28

yes, just use idaapi, the bytes library not chang much ine ida7

eychei 04-12-2018 02:27

ok thx. I will try this.

-e


All times are GMT +8. The time now is 17:42.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX