File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def build(self):
66
66
self .linpeas_base += f"\n if echo $CHECKS | grep -q { section_info ['name_check' ]} ; then\n "
67
67
self .linpeas_base += f'print_title "{ section_name } "\n '
68
68
69
- # Sort checks alphabetically to get them in the same order of they are in the folder
69
+ # Sort checks alphabetically to get them in the same order as they are in the folder
70
70
section_info ["checks" ] = sorted (section_info ["checks" ], key = lambda x : int (os .path .basename (x .path ).split ('_' )[0 ]) if os .path .basename (x .path ).split ('_' )[0 ].isdigit () else 99 )
71
71
for check in section_info ["checks" ]:
72
72
for func in check .initial_functions :
@@ -193,8 +193,9 @@ def sort_variables(self, variables:List[LinpeasModule]):
193
193
194
194
def get_funcs_deps (self , module , all_funcs ):
195
195
"""Given 1 module and the list of modules return the functions recursively it depends on"""
196
-
197
- for func in module .functions_used :
196
+
197
+ module_funcs = list (set (module .initial_functions + module .functions_used ))
198
+ for func in module_funcs :
198
199
func_module = self .find_func_module (func )
199
200
#print(f"{module.id} has found {func} in {func_module.id}") #To find circular dependencies
200
201
if not func_module .is_function :
You can’t perform that action at this time.
0 commit comments