pentoo-mobile: add lief tool

This commit is contained in:
blshkv 2018-12-04 12:04:01 +08:00
parent a6ffb9c69f
commit 9b04aa9483
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F
4 changed files with 42 additions and 16 deletions

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python
import lief
import sys
if len(sys.argv) < 3:
print("Run: lief_inject <nativelib>.so <libfrida-gadget>.so ")
sys.exit(1)
libnative = lief.parse(sys.argv[1])
libnative.add_library(sys.argv[2]) # Injection!
libnative.write(sys.argv[2])

View file

@ -6,20 +6,23 @@ EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6} )
inherit distutils-r1
DESCRIPTION=" library to instrument executable formats"
DESCRIPTION="Library to instrument executable formats"
HOMEPAGE="https://lief.quarkslab.com/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip
https://github.com/lief-project/LIEF/releases/download/0.9.0/lief-0.9.0-py2.7-linux.egg
https://github.com/lief-project/LIEF/releases/download/0.9.0/lief-0.9.0-py3.6-linux.egg
"
https://github.com/lief-project/LIEF/releases/download/0.9.0/lief-0.9.0-py3.6-linux.egg"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND=""
#dev-python/requests[${PYTHON_USEDEP}]
# dev-python/beautifulsoup:4[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"
QA_FLAGS_IGNORED="usr/lib.*/python.*/site-packages/_pylief.*\.so"
#S="${WORKDIR}/API-${PN}.com-${PV}"
RDEPEND=""
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
src_install() {
distutils-r1_src_install
dobin ${FILESDIR}/lief_inject.py
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blshkv@pentoo.org</email>
</maintainer>
<upstream>
<remote-id type="github">lief-project/LIEF</remote-id>
<remote-id type="pypi">lief</remote-id>
</upstream>
</pkgmetadata>

View file

@ -11,16 +11,16 @@ IUSE="+android +ios pentoo-full"
KEYWORDS="amd64 arm x86"
#projects to add?
#https://github.com/mwrlabs/mercury
#https://github.com/504ensicslabs/lime
#https://github.com/mwrlabs/drozer
#https://github.com/JesusFreke/smali
#https://code.google.com/p/lime-forensics/downloads/list
#https://github.com/iSECPartners/android-ssl-bypass
#https://github.com/iSECPartners/ios-ssl-kill-switch
PDEPEND="
dev-util/frida-tools
dev-util/objection
PDEPEND="dev-util/frida-tools
pentoo-full? (
dev-util/objection
dev-util/appmon
dev-python/lief
)
android? ( !arm? ( dev-util/apktool
dev-util/dex2jar
dev-util/android-tools