Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken loading of IDA libs in IDA 7.0 (Found in StructTyper) #50

Open
silascutler opened this issue Sep 20, 2017 · 1 comment
Open

Broken loading of IDA libs in IDA 7.0 (Found in StructTyper) #50

silascutler opened this issue Sep 20, 2017 · 1 comment

Comments

@silascutler
Copy link

silascutler commented Sep 20, 2017

Hello,

Setup:

  • Clean Install of IDA 7.0 with Flare-IDA install per README.md
  • WIndows 7 x64

When running the StructTyper plugin, I receive the following error:

Failed while executing plugin_t.run():
Traceback (most recent call last):
  File "C:/Program Files/IDA 7.0/plugins/struct_typer_plugin.py", line 47, in run
    idaapi.require('flare.struct_typer')
  File "C:\Program Files\IDA 7.0\python\ida_idaapi.py", line 153, in require
    m = importlib.import_module(modulename, package)
  File "C:\python27-x64\Lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
  File "C:\Program Files\IDA 7.0\python\flare\struct_typer.py", line 48, in <module>
    g_dll = ctypes.windll[idaname + ".wll"]
  File "C:\python27-x64\Lib\ctypes\__init__.py", line 437, in __getitem__
    return getattr(self, name)
  File "C:\python27-x64\Lib\ctypes\__init__.py", line 432, in __getattr__
    dll = self._dlltype(name)
  File "C:\python27-x64\Lib\ctypes\__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: (126, 'The specified module could not be found')

The key error seems to be in:

g_dll = ctypes.windll[idaname + ".wll"]

Version 7.0 looks to have dropped the .will files (or I missed something on the installation). I tried changing it to .DLL and now get the following:

    Failed while executing plugin_t.run():
    Traceback (most recent call last):
      File "C:/Program Files/IDA 7.0/plugins/struct_typer_plugin.py", line 47, in run
        idaapi.require('flare.struct_typer')
      File "C:\Program Files\IDA 7.0\python\ida_idaapi.py", line 153, in require
        m = importlib.import_module(modulename, package)
      File "C:\python27-x64\Lib\importlib\__init__.py", line 37, in import_module
        __import__(name)
      File "C:\Program Files\IDA 7.0\python\flare\struct_typer.py", line 70, in <module>
        print_type_to_one_line = g_dll.print_type_to_one_line
      File "C:\python27-x64\Lib\ctypes\__init__.py", line 375, in __getattr__
        func = self.__getitem__(name)
      File "C:\python27-x64\Lib\ctypes\__init__.py", line 380, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: function 'print_type_to_one_line' not found
@jhsmith
Copy link
Contributor

jhsmith commented Sep 20, 2017

Thanks for the report. IDA 7.0 SDK changed a lot. We'll be updating our plugins in the next few months as we have time Feel free to add additional bug reports as you encounter them so we can track them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants