Skip to content

Commit dfa632a

Browse files
authored
hardens tests for PR#41 with ida 7.3 updates (#43)
* fix plugin flags for ida7.3 * fixes tests * rm trailing space
1 parent 77947fc commit dfa632a

9 files changed

+15
-14
lines changed

plugins/bap/plugins/bap_bir_attr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class BapBirAttr(idaapi.plugin_t):
5050
5151
Also supports installation of callbacks using install_callback()
5252
"""
53-
flags = idaapi.PLUGIN_DRAW
53+
flags = idaapi.PLUGIN_FIX | idaapi.PLUGIN_DRAW
5454
comment = "Run BAP "
5555
help = "Runs BAP and extracts data from the output"
5656
wanted_name = "BAP: Run"

plugins/bap/plugins/bap_clear_comments.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class BapClearComments(idaapi.plugin_t):
9-
flags = idaapi.PLUGIN_DRAW
9+
flags = idaapi.PLUGIN_DRAW | idaapi.PLUGIN_FIX
1010
comment = "removes all BAP comments"
1111
help = ""
1212
wanted_name = "BAP: Clear comments"

plugins/bap/plugins/bap_comments.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def OnGetLine(self, n):
2727

2828

2929
class BapComment(idaapi.plugin_t):
30-
flags = 0
30+
flags = idaapi.PLUGIN_FIX
3131
help = 'propagate comments to IDA Views'
3232
comment = ''
3333
wanted_name = 'BAP: View BAP Attributes'

plugins/bap/plugins/bap_task_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def OnSelectionChange(self, selected):
4242

4343
class BapTaskManager(idaapi.plugin_t):
4444
#pylint: disable=no-init
45-
flags = idaapi.PLUGIN_DRAW
45+
flags = idaapi.PLUGIN_FIX | idaapi.PLUGIN_DRAW
4646
wanted_hotkey = "Ctrl-Alt-Shift-F5"
4747
comment = "bap task manager"
4848
help = "Open BAP Task Manager"

plugins/bap/plugins/bap_trace.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def display():
589589
class BapTracePlugin(idaapi.plugin_t):
590590
wanted_name = 'BAP: Load Observations'
591591
wanted_hotkey = ''
592-
flags = 0
592+
flags = idaapi.PLUGIN_FIX
593593
comment = 'Load Primus Observations'
594594
help = """
595595
Loads Primus Observations into IDA for further analysis

plugins/bap/plugins/bap_view.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BapView(idaapi.plugin_t):
6262
Keybindings:
6363
Ctrl-Shift-F5 : Open/Refresh BAP View
6464
"""
65-
flags = idaapi.PLUGIN_DRAW
65+
flags = idaapi.PLUGIN_FIX | idaapi.PLUGIN_DRAW
6666
wanted_hotkey = "Ctrl-Shift-F5"
6767
comment = "bap output viewer"
6868
help = "View BAP output"

plugins/bap/utils/bap_taint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(self, addr, kind):
9191

9292

9393
class BapTaint(idaapi.plugin_t):
94-
flags = 0
94+
flags = idaapi.PLUGIN_FIX
9595
comment = "BAP Taint Plugin"
9696
wanted_name = "BAP: Taint"
9797

plugins/bap/utils/hexrays.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PseudocodeVisitor(idaapi.plugin_t):
5252
class.
5353
"""
5454

55-
flags = idaapi.PLUGIN_PROC
55+
flags = idaapi.PLUGIN_FIX | idaapi.PLUGIN_PROC
5656
wanted_hotkey = ""
5757

5858
def visit_line(self, line):

tests/mockidaapi.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# flake8: noqa
22

3-
ASKBTN_YES = NotImplemented
4-
ASKBTN_NO = NotImplemented
5-
ASKBTN_CANCEL = NotImplemented
6-
PLUGIN_DRAW = NotImplemented
7-
PLUGIN_HIDE = NotImplemented
8-
PLUGIN_KEEP = NotImplemented
3+
ASKBTN_YES = 0
4+
ASKBTN_NO = 0
5+
ASKBTN_CANCEL = 0
6+
PLUGIN_DRAW = 0
7+
PLUGIN_HIDE = 0
8+
PLUGIN_KEEP = 0
9+
PLUGIN_FIX = 0
910
class plugin_t(object): pass
1011
class text_sink_t(object): pass
1112
class Choose2(object): pass

0 commit comments

Comments
 (0)