1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00

Added status output while loading privesc methods

This commit is contained in:
Caleb Stewart 2020-06-02 22:26:34 -04:00
parent 74f7c11344
commit a2552b5439

View File

@ -43,6 +43,7 @@ class Finder:
def load_package(self, path: list): def load_package(self, path: list):
util.progress("loading privesc methods")
for loader, module_name, is_pkg in pkgutil.walk_packages(path): for loader, module_name, is_pkg in pkgutil.walk_packages(path):
method_module = loader.find_module(module_name).load_module(module_name) method_module = loader.find_module(module_name).load_module(module_name)
@ -54,11 +55,14 @@ class Finder:
continue continue
try: try:
util.progress(f"loading privesc methods: {method_module.Method.name}")
method_module.Method.check() method_module.Method.check()
self.methods.append(method_module.Method()) self.methods.append(method_module.Method())
except PrivescError: except PrivescError:
pass pass
util.erase_progress()
def search(self, target_user: str = None) -> List["Technique"]: def search(self, target_user: str = None) -> List["Technique"]:
""" Search for privesc techniques for the current user to get to the """ Search for privesc techniques for the current user to get to the
target user. If target_user is not specified, all techniques for all target user. If target_user is not specified, all techniques for all