Skip to content

Commit

Permalink
added support for IDA 7.0 SP
Browse files Browse the repository at this point in the history
fix for issue #14
  • Loading branch information
demonduck committed Dec 7, 2017
1 parent 0cb96fd commit 5c20ff8
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions first_plugin_ida/first.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ class FIRST(object):
# About Information
#------------------------
VERSION = 'BETA'
DATE = 'August 2017'
DATE = 'December 2017'
BEGIN = 2014
END = 2017

Expand Down Expand Up @@ -3408,17 +3408,7 @@ class IDP(idaapi.IDP_Hooks):
def __init__(self):
super(FIRST.Hook.IDP, self).__init__()

def ev_auto_queue_empty(self, arg):
return self.auto_queue_empty(arg, before7=False)

def auto_queue_empty(self, arg, before7=True):
'''Called function for signaling queue status changes.
The function will populate FIRST's in memory function list, get
the required file details, read in FIRST's configuration and
set up the FIRST server connection. After initialization the
hook removes itself from the IDP hook queue.
'''
def on_auto_queue_empty(self, arg):
if (arg == 200) and (not FIRST.Hook.IDP.executed):
FIRST.Hook.IDP.executed = True
self.unhook()
Expand Down Expand Up @@ -3450,10 +3440,14 @@ def auto_queue_empty(self, arg, before7=True):

FIRST.plugin_enabled = True

if before7:
if idaapi.get_kernel_version().startswith("7"):
def ev_auto_queue_empty(self, arg):
self.on_auto_queue_empty(arg)
return super(self.__class__, self).ev_auto_queue_empty(arg)
else:
def auto_queue_empty(self, arg):
self.on_auto_queue_empty(arg)
return super(self.__class__, self).auto_queue_empty(arg)
return super(self.__class__, self).ev_auto_queue_empty(arg)


class UI(idaapi.UI_Hooks):
'''FIRST's UI Hook. Sets UI change hooks and right click menu.'''
Expand Down

0 comments on commit 5c20ff8

Please sign in to comment.