Skip to content

Commit 2b3cd9b

Browse files
committed
Add empty matcher stub
1 parent 638a039 commit 2b3cd9b

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

idaplugin/rematch/collectors/vectors/basicblockgraph.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def __init__(self, *args, **kwargs):
1818

1919
self.seen_nodes = set()
2020

21-
def data(self, offset):
22-
del offset
21+
def data(self):
2322

2423
# Assuming node #0 is the root node
2524
serialized_bbs = self.add_node(self.nodes[0])
@@ -48,7 +47,7 @@ def token(node):
4847
# alternatives: offset from start of function
4948
return node.endEA - node.startEA
5049

51-
sort_ket = token
50+
sort_key = token
5251

5352
def node_contained(self, node):
5453
# make sure only nodes inside the function are accounted for

server/collab/matchers/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
from .name_hash import NameHashMatcher
99
from .mnemonic_euclidean import MnemonicEuclideanMatcher
1010
from .dictionary_matcher import DictionaryMatcher
11+
from .basicblockgraph import BasicBlockGraphMatcher
1112

1213

1314
matchers_list = [InstructionHashMatcher, IdentityHashMatcher, NameHashMatcher,
1415
AssemblyHashMatcher, MnemonicHashMatcher,
15-
MnemonicEuclideanMatcher]
16+
MnemonicEuclideanMatcher, BasicBlockGraphMatcher]
1617

1718

1819
__all__ = ['Matcher', 'HashMatcher', 'EuclideanDictionaryMatcher',
1920
'InstructionHashMatcher', 'IdentityHashMatcher',
2021
'AssemblyHashMatcher', 'MnemonicHashMatcher', 'NameHashMatcher',
21-
'MnemonicEuclideanMatcher', 'DictionaryMatcher', 'matchers_list']
22+
'MnemonicEuclideanMatcher', 'DictionaryMatcher',
23+
'BasicBlockGraphMatcher', 'matchers_list']
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from . import matcher
2+
3+
4+
class BasicBlockMatcher(matcher.Matcher):
5+
vector_type = 'basicblockgraph'
6+
match_type = 'basicblockgraph'
7+
matcher_name = "Basic Block Graph"
8+
matcher_description = ("TODO")

0 commit comments

Comments
 (0)