From 63575ca9fee0dfb885caa1ea48a05adcc54fd43e Mon Sep 17 00:00:00 2001 From: blshkv Date: Fri, 1 May 2020 11:49:01 +0800 Subject: [PATCH] crackmapexec: workaround for https://github.com/byt3bl33d3r/CrackMapExec/issues/361 --- ...9.ebuild => crackmapexec-5.0.1_p20200430.ebuild} | 13 +++---------- .../crackmapexec/files/remove_thirdparty.patch | 11 +++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) rename net-analyzer/crackmapexec/{crackmapexec-5.0.1_p20200429.ebuild => crackmapexec-5.0.1_p20200430.ebuild} (90%) create mode 100644 net-analyzer/crackmapexec/files/remove_thirdparty.patch diff --git a/net-analyzer/crackmapexec/crackmapexec-5.0.1_p20200429.ebuild b/net-analyzer/crackmapexec/crackmapexec-5.0.1_p20200430.ebuild similarity index 90% rename from net-analyzer/crackmapexec/crackmapexec-5.0.1_p20200429.ebuild rename to net-analyzer/crackmapexec/crackmapexec-5.0.1_p20200430.ebuild index c43a1e944..677b95dcf 100644 --- a/net-analyzer/crackmapexec/crackmapexec-5.0.1_p20200429.ebuild +++ b/net-analyzer/crackmapexec/crackmapexec-5.0.1_p20200430.ebuild @@ -11,7 +11,7 @@ DESCRIPTION="A swiss army knife for pentesting Windows/Active Directory environm HOMEPAGE="https://github.com/byt3bl33d3r/CrackMapExec/releases" EGIT_REPO_URI="https://github.com/byt3bl33d3r/CrackMapExec.git" -EGIT_COMMIT="a20d28a885653f335e27d6b2ecd5353f322f8b28" +EGIT_COMMIT="db9166fdf1310878f1084a0463753996ac74c833" #https://github.com/byt3bl33d3r/CrackMapExec/issues/354 EGIT_OVERRIDE_COMMIT_ARTKOND_INVOKE_VNC="906c7476b9490817a6defa63e86a5b8c52690182" @@ -67,20 +67,13 @@ QA_FLAGS_IGNORED="usr/lib.*/python.*/site-packages/cme/data/mimipenguin/.*" QA_PRESTRIPPED="usr/lib.*/python.*/site-packages/cme/data/mimipenguin/.*" #invoke: https://github.com/byt3bl33d3r/CrackMapExec/issues/317 +#thirdparty: https://github.com/byt3bl33d3r/CrackMapExec/issues/361 PATCHES=( "${FILESDIR}/invoke-vnc_python3.patch" + "${FILESDIR}/remove_thirdparty.patch" ) python_prepare_all() { sed -i -e '/bs4/d' setup.py || die distutils-r1_python_prepare_all } - -python_install() { - # cme/thirdparty/ must be present - rm -r cme/thirdparty/* - python_export PYTHON_SITEDIR - keepdir ${PYTHON_SITEDIR}/cme/thirdparty/ - - distutils-r1_python_install -} diff --git a/net-analyzer/crackmapexec/files/remove_thirdparty.patch b/net-analyzer/crackmapexec/files/remove_thirdparty.patch new file mode 100644 index 000000000..0cc0b3c8f --- /dev/null +++ b/net-analyzer/crackmapexec/files/remove_thirdparty.patch @@ -0,0 +1,11 @@ +--- a/cme/__init__.py.orig 2020-05-01 11:35:54.713778827 +0800 ++++ b/cme/__init__.py 2020-05-01 11:36:06.428778696 +0800 +@@ -4,8 +4,3 @@ + import cme + + monkey.patch_all() +- +-thirdparty_modules = os.path.join(os.path.dirname(cme.__file__), 'thirdparty') +- +-for module in os.listdir(thirdparty_modules): +- sys.path.insert(0, os.path.join(thirdparty_modules, module))