From a3ca7e3d8628893556043f9decca6e9ab8cc0294 Mon Sep 17 00:00:00 2001 From: doron zarhi Date: Tue, 29 Mar 2022 16:14:06 +0300 Subject: [PATCH] Revert "client: make lief an optional dependency" This reverts commit af930fd3a26ef4e199cc5790cc836a911b8ee0c4. --- src/rpcclient/requirements.txt | 1 + src/rpcclient/rpcclient/darwin/darwin_lief.py | 6 +----- src/rpcclient/rpcclient/lief.py | 6 +----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/rpcclient/requirements.txt b/src/rpcclient/requirements.txt index 5542c47d..c6e2ade1 100644 --- a/src/rpcclient/requirements.txt +++ b/src/rpcclient/requirements.txt @@ -8,3 +8,4 @@ dataclasses; python_version<"3.7" pygments objc_types_decoder pycrashreport>=0.0.8 +lief diff --git a/src/rpcclient/rpcclient/darwin/darwin_lief.py b/src/rpcclient/rpcclient/darwin/darwin_lief.py index 13ef0a8c..86f44ea9 100644 --- a/src/rpcclient/rpcclient/darwin/darwin_lief.py +++ b/src/rpcclient/rpcclient/darwin/darwin_lief.py @@ -1,12 +1,8 @@ -import logging import plistlib import struct from typing import Mapping -try: - import lief -except ImportError: - logging.warning('failed to import lief. install seperately to use LIEF features') +import lief from rpcclient.common import path_to_str from rpcclient.darwin.consts import kSecCodeMagicEntitlement diff --git a/src/rpcclient/rpcclient/lief.py b/src/rpcclient/rpcclient/lief.py index acb59bb7..33037166 100644 --- a/src/rpcclient/rpcclient/lief.py +++ b/src/rpcclient/rpcclient/lief.py @@ -1,11 +1,7 @@ -import logging from collections import namedtuple from typing import Mapping -try: - import lief -except ImportError: - logging.warning('failed to import lief. install seperately to use LIEF features') +import lief from rpcclient.common import path_to_str