routersploit: fix broken ebuild, v3.0.0 bump, bluetooth option, deps

This commit is contained in:
blshkv 2018-06-07 10:15:54 +08:00
parent 9fdca2948e
commit 4e3dc391bd
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F
7 changed files with 93 additions and 86 deletions

View file

@ -0,0 +1 @@
DIST routersploit-3.0.0.tar.gz 418706 BLAKE2B d297929d0122656921a2fec0e2edde6c040ca1bf60ea5d5b477a08d8611e5142af38c40f9f16da7ac7f77ee7f2019e4027543d63cb5cef54015802489afbc9ec SHA512 0367a11c086e98db08691f25f6a45cf3e210948d9f06e91602230d87f091a28387b51cbc8bc6e9d7d0a2da0f5ab4cd404a683dee290956e8754a988e0912fa27

View file

@ -0,0 +1,64 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_6 )
inherit python-single-r1
# distutils-r1
if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/threat9/routersploit.git"
KEYWORDS=""
else
SRC_URI="https://github.com/threat9/routersploit/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
fi
DESCRIPTION="An open-source exploitation framework dedicated to embedded devices"
HOMEPAGE="https://github.com/threat9/routersploit/wiki"
LICENSE="BSD"
SLOT="0"
IUSE="doc desktopicons bluetooth"
DEPEND=">=dev-python/future-0.16.0[${PYTHON_USEDEP}]
>=dev-python/requests-2.9.1[${PYTHON_USEDEP}]
>=dev-python/paramiko-1.16.0[${PYTHON_USEDEP}]
>=dev-python/pysnmp-4.3.2[${PYTHON_USEDEP}]
>=dev-python/pycryptodome-2.6.1[${PYTHON_USEDEP}]
bluetooth? ( dev-python/bluepy )"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${P}"
src_prepare() {
#do not compile
rm -f Makefile
eapply_user
}
src_install() {
dodir /opt/${PN}
insinto /opt/${PN}
doins -r routersploit/ rsf.py
fperms +x /opt/${PN}/rsf.py
dosym "${EPREFIX}"/opt/${PN}/rsf.py /usr/bin/rsf
if use doc; then
einstalldocs /usr/share/doc/${PN}/
dodoc -r /{README.md,LICENSE}
fi
#FIXME: convert to desktop.eclass
if use desktopicons; then
dodir /usr/share/icons/${PN}/
cp ${FILES}/{routersploit.png,routersploit.svg} /usr/share/icons/${PN}/
dodir /usr/share/applications/${PN}/
cp ${FILES}*.desktop /usr/share/applications/${PN}/
fixperms +r +x /usr/share/applications/${PN}/*.desktop
fi
}

View file

@ -1,86 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 ) ## 3.x seems in the works.
inherit python-single-r1
# distutils-r1
if [[ ${PV} == "9999" ]] ; then
MY_P=${P}
EGIT_REPO_URI="git://github.com/threat9/routersploit.git"
inherit git-r3
else
MY_P=${PN}-${PV/_/-}
SRC_URI="https://github.com/threat9/routersploit/archive/v${PV}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
fi
DESCRIPTION="An open-source exploitation framework dedicated to embedded devices"
HOMEPAGE="https://github.com/threat9/routersploit/wiki"
LICENSE="BSD"
SLOT="0"
KEYWORDS=""
IUSE="-doc -desktopicons"
DEPEND="dev-python/beautifulsoup
dev-python/requests
dev-python/pysnmp
dev-python/pexpect
dev-python/paramiko
dev-python/future"
RDEPEND="${DEPEND}"
#TESTDEPEND="virtual/python-mock
# dev-python/flake8
# app-emulation/docker"
S=${WORKDIR}/routersploit-${PV}/routersploit
#ewarn " live version may at time break or not recevies pulls frequently may work may bork, the stale version tends too."
src_prepare() {
### clean up makefile and friends apear to be nothing but docker linting Q/A testing & invoking pretty q/a SUITE test wizbangs.
## taking out the trash.... @ /dev/null
rm -f {Makefile,*.sh,Dockerfile,.travis.yml, .git* ,req*.txt}
rm -r {./.git*,} ## drop git dir trash.. so as to not cp into install dirs.
eapply_user
}
src_install() {
# mkdir -m 0755 -p /opt/routersploit
# chuck/cp in /opt/routersploit/rsy.py & /opt/routersploit/routersploit submodules...
# chmod +X +R fixperms recursively..
## add docs if user give 2 rats to read them , have a nice day...
mkdir -p "${S}"/opt/${PN}
insinto "${S}"/opt/${PN}
doins -r "${S}"/opt/${PN}
# dobin /opt/${PN}/rsf.py
dosym /opt/${PN}/rsf.py /usr/bin/rsf
chown -R root:root "${S}/opt/${PN}"
# fperms -R +x +r {*.py,*.pyc} "${S}"/opt/"${PN}"
if use doc; then
einstalldocs /usr/share/doc/${PN}/
dodoc -r /{README.md,LICENSE}
fi
}
desktop_install() {
if use desktopicons; then
dodir /usr/share/icons/${PN}/
cp ${FILES}/{routersploit.png,routersploit.svg} /usr/share/icons/${PN}/
dodir /usr/share/applications/${PN}/
cp ${FILES}*.desktop /usr/share/applications/${PN}/
fixperms +r +x /usr/share/applications/${PN}/*.desktop
fi
}
pkg_postinst(){
elog "routersploit-${PV} has installed enjoy.. "
einfo "more info @ WIKI https://github.com/threat9/routersploit/wiki"
einfo "video demo also on wiki made with asciinema showing some of the basic features."
einfo "for more than your Home or Small biz routers I'd see the wiki, CLI takes some getting aqaunted with"
}

View file

@ -0,0 +1 @@
routersploit-3.0.0.ebuild

View file

@ -0,0 +1 @@
DIST bluepy-1.1.4.tar.gz 218850 BLAKE2B fd33b617ee36bf371da08c880e9032f80e5a095480dc5e671901c2eb898ed072c0cda7fdcb257a7bed6ae9d067eb616ff48df75c6a270678b8f9447937e4bd3d SHA512 40b285a093ab9eb627d41bee03b8cef84c94aafcd65f5cf162fb30ce350126556f984d363389ac7b209847c32484486f5042891ffa8c9eb7a30d58bbab31626f

View file

@ -0,0 +1,20 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_5,3_6} )
inherit distutils-r1
DESCRIPTION="Python interface to Bluetooth LE on Linux"
HOMEPAGE="https://github.com/IanHarvey/bluepy"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND="dev-libs/glib"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"

View file

@ -3,3 +3,5 @@
~app-exploits/the-backdoor-factory-3.4.1
=app-exploits/osslsigncode-1.7.1_p*
=app-exploits/routersploit-3*

View file

@ -264,3 +264,7 @@ dev-python/cfscrape
~dev-python/async_generator-1.9
~dev-python/py-1.5.3
~dev-python/attrs-17.4.0
#python3.6
=dev-python/pysnmp-4.4*
=dev-python/pysmi-0.1*