3

We know 'IDAPython' loads several modules by default at startup, such as idaapi, idautils.... I wrote a module to let python print all numbers as hex format in the command window, which I wish can be imported each time when python loads those default modules. how to achieve that?

Roney
  • 143
  • 7

1 Answers1

3

Create a file %APPDATA%\Hex-Rays\IDA Pro\idapythonrc.py with the following content:

import idaapi
idaapi.require('mymodule')

With this file in place, you can even keep mymodule.py in the same directory.

P.S. IDA can tell you the path to this directory, too, which could be handy on other OSes or if the relevant company name changes again ;-). Just enter:

get_user_idadir()

at the prompt.

SamB
  • 9,039
  • 5
  • 49
  • 56