Skip to content

Commit

Permalink
Update imports to support IDA 7.2
Browse files Browse the repository at this point in the history
`import idaapi` is needed to avoid:
```
C:\Program Files\IDA 7.2\plugins\ifl.py: name 'idaapi' is not defined
Traceback (most recent call last):
  File "C:\Program Files\IDA 7.2\python\ida_idaapi.py", line 572, in IDAPython_ExecScript
    execfile(script, g)
  File "C:/Program Files/IDA 7.2/plugins/ifl.py", line 1198, in <module>
    class IFLMenuHandler(idaapi.action_handler_t):
NameError: name 'idaapi' is not defined
```
`from idautils import *` is needed to avoid:
```
IDAPython: Error while calling Python callback <OnCreate>:
Traceback (most recent call last):
  File "C:/Program Files/IDA 7.2/plugins/ifl.py", line 1007, in OnCreate
    self.funcMapper = FunctionsMapper_t()
  File "C:/Program Files/IDA 7.2/plugins/ifl.py", line 789, in __init__
    self._loadLocals()
  File "C:/Program Files/IDA 7.2/plugins/ifl.py", line 770, in _loadLocals
    for func in Functions():
NameError: global name 'Functions' is not defined
```
  • Loading branch information
recvfrom authored Jun 21, 2019
1 parent aee5137 commit 18a6b44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ifl.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
PLUGIN_NAME = "IFL - Interactive Functions List"
PLUGIN_HOTKEY = "Ctrl-Alt-F"

import idautils
import idaapi
from idautils import *
from idaapi import *
from idc import *

Expand Down

0 comments on commit 18a6b44

Please sign in to comment.