Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quark/core/apkinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def upperfunc(self, method_object: MethodObject) -> Set[MethodObject]:
for _, call, _ in method_analysis.get_xref_from()
}

@functools.lru_cache()
def lowerfunc(self, method_object: MethodObject) -> Set[MethodObject]:
method_analysis = method_object.cache
return {
Expand Down
3 changes: 2 additions & 1 deletion quark/core/quark.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ def check_sequence(
:return: True or False
"""
state = False
mutual_parent_lowerfunc = self.apkinfo.lowerfunc(mutual_parent)

for first_call_method in first_method_list:
for second_call_method in second_method_list:

seq_table = [
(call, number)
for call, number in self.apkinfo.lowerfunc(mutual_parent)
for call, number in mutual_parent_lowerfunc
if call in (first_call_method, second_call_method)
]

Expand Down
Loading