mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-17 20:30:58 +02:00
wifi-pumpkin: cleanup
This commit is contained in:
parent
f48af1c4ac
commit
1894bfd4bc
4 changed files with 22 additions and 94 deletions
|
|
@ -1,27 +0,0 @@
|
|||
#coding: utf-8
|
||||
from core.utility.collection import SettingsINI
|
||||
from os import path,popen,remove,system,chdir
|
||||
import sys
|
||||
from shutil import copy
|
||||
YELLOW = '\033[33m'
|
||||
RED = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
def notinstall(app):
|
||||
print '[%s✘%s] %s is not %sinstalled%s.'%(RED,ENDC,app,YELLOW,ENDC)
|
||||
|
||||
def check_dep_pumpkin():
|
||||
# check hostapd
|
||||
hostapd = popen('which hostapd').read().split('\n')
|
||||
if not path.isfile(hostapd[0]): notinstall('hostapd')
|
||||
# checck source.tar.gz tamplate module
|
||||
if '/usr/sbin/wifi-pumpkin' in sys.argv[0]:
|
||||
chdir('/usr/share/wifi-pumpkin')
|
||||
|
||||
# check if hostapd is found and save path
|
||||
settings = SettingsINI('core/config/app/config.ini')
|
||||
hostapd_path = settings.get_setting('accesspoint','hostapd_path')
|
||||
if not path.isfile(hostapd_path) and len(hostapd[0]) > 2:
|
||||
return settings.set_setting('accesspoint','hostapd_path',hostapd[0])
|
||||
elif not path.isfile(hostapd[0]):
|
||||
return settings.set_setting('accesspoint','hostapd_path','0')
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#coding: utf-8
|
||||
from core.utility.collection import SettingsINI
|
||||
from os import path,popen,remove,system
|
||||
from shutil import copy
|
||||
YELLOW = '\033[33m'
|
||||
RED = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
def notinstall(app):
|
||||
print '[%s✘%s] %s is not %sinstalled%s.'%(RED,ENDC,app,YELLOW,ENDC)
|
||||
|
||||
def check_dep_pumpkin():
|
||||
# check hostapd
|
||||
hostapd = popen('which hostapd').read().split('\n')
|
||||
if not path.isfile(hostapd[0]): notinstall('hostapd')
|
||||
# checck source.tar.gz tamplate module
|
||||
if '/usr/sbin/wifi-pumpkin' in sys.argv[0]:
|
||||
chdir('/usr/lib64/wifi-pumpkin')
|
||||
|
||||
# check if hostapd is found and save path
|
||||
settings = SettingsINI('core/config/app/config.ini')
|
||||
hostapd_path = settings.get_setting('accesspoint','hostapd_path')
|
||||
if not path.isfile(hostapd_path) and len(hostapd[0]) > 2:
|
||||
return settings.set_setting('accesspoint','hostapd_path',hostapd[0])
|
||||
elif not path.isfile(hostapd[0]):
|
||||
return settings.set_setting('accesspoint','hostapd_path','0')
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
--- check_depen.py.orig 2017-01-02 17:13:47.000000000 +0800
|
||||
+++ check_depen.py 2017-01-02 17:12:44.000000000 +0800
|
||||
@@ -1,6 +1,7 @@
|
||||
#coding: utf-8
|
||||
from core.utility.collection import SettingsINI
|
||||
-from os import path,popen,remove,system
|
||||
+from os import path,popen,remove,system,chdir
|
||||
+import sys
|
||||
from shutil import copy
|
||||
YELLOW = '\033[33m'
|
||||
RED = '\033[91m'
|
||||
@@ -15,7 +16,7 @@
|
||||
if not path.isfile(hostapd[0]): notinstall('hostapd')
|
||||
# checck source.tar.gz tamplate module
|
||||
if '/usr/sbin/wifi-pumpkin' in sys.argv[0]:
|
||||
- chdir('/usr/lib64/wifi-pumpkin')
|
||||
+ chdir('/usr/share/wifi-pumpkin')
|
||||
|
||||
# check if hostapd is found and save path
|
||||
settings = SettingsINI('core/config/app/config.ini')
|
||||
|
|
@ -18,35 +18,36 @@ SLOT="0"
|
|||
KEYWORDS="~amd64"
|
||||
IUSE="plugins"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="net-wireless/hostapd
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
net-wireless/hostapd
|
||||
net-wireless/rfkill
|
||||
dev-python/PyQt4
|
||||
dev-python/twisted-web
|
||||
dev-python/PyQt4[${PYTHON_USEDEP}]
|
||||
dev-python/twisted-web[${PYTHON_USEDEP}]
|
||||
net-analyzer/scapy[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
|
||||
dev-python/python-nmap
|
||||
dev-python/netaddr
|
||||
dev-python/config
|
||||
virtual/python-dnspython
|
||||
dev-python/isc_dhcp_leases
|
||||
dev-python/netifaces
|
||||
dev-python/pcapy
|
||||
dev-python/configparser
|
||||
dev-python/netfilterqueue
|
||||
dev-python/configobj
|
||||
>=dev-python/libarchive-c-2.1
|
||||
>=dev-python/python-magic-0.4.8
|
||||
dev-python/pefile
|
||||
dev-python/capstone-python
|
||||
dev-python/hyperframe
|
||||
dev-python/h2
|
||||
dev-python/python-nmap[${PYTHON_USEDEP}]
|
||||
dev-python/netaddr[${PYTHON_USEDEP}]
|
||||
dev-python/config[${PYTHON_USEDEP}]
|
||||
virtual/python-dnspython[${PYTHON_USEDEP}]
|
||||
dev-python/isc_dhcp_leases[${PYTHON_USEDEP}]
|
||||
dev-python/netifaces[${PYTHON_USEDEP}]
|
||||
dev-python/pcapy[${PYTHON_USEDEP}]
|
||||
dev-python/configparser[${PYTHON_USEDEP}]
|
||||
dev-python/netfilterqueue[${PYTHON_USEDEP}]
|
||||
dev-python/configobj[${PYTHON_USEDEP}]
|
||||
>=dev-python/libarchive-c-2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-magic-0.4.8[${PYTHON_USEDEP}]
|
||||
dev-python/pefile[${PYTHON_USEDEP}]
|
||||
dev-python/capstone-python[${PYTHON_USEDEP}]
|
||||
dev-python/hyperframe[${PYTHON_USEDEP}]
|
||||
dev-python/h2[${PYTHON_USEDEP}]
|
||||
=net-proxy/mitmproxy-0.11*[${PYTHON_USEDEP}]
|
||||
|
||||
plugins? ( net-dns/dnsmasq
|
||||
net-analyzer/driftnet
|
||||
net-analyzer/ettercap
|
||||
=net-proxy/mitmproxy-0.11*[${PYTHON_USEDEP}]
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue