Modules fixes (#9)
parent
1f13b82ee9
commit
abe6d3060c
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "SSLsplit",
|
||||
"version": "1.0"
|
||||
"version": "1.1"
|
||||
}
|
|
@ -9,6 +9,7 @@ MYTIME=`date +%s`
|
|||
killall sslsplit
|
||||
|
||||
echo '1' > /proc/sys/net/ipv4/ip_forward
|
||||
iptables-save > /pineapple/modules/SSLsplit/rules/saved
|
||||
iptables -X
|
||||
iptables -F
|
||||
iptables -t nat -F
|
||||
|
|
|
@ -11,6 +11,7 @@ killall sslsplit
|
|||
if [ "$1" = "start" ]; then
|
||||
|
||||
echo '1' > /proc/sys/net/ipv4/ip_forward
|
||||
iptables-save > /pineapple/modules/SSLsplit/rules/saved
|
||||
iptables -X
|
||||
iptables -F
|
||||
iptables -t nat -F
|
||||
|
@ -37,5 +38,6 @@ elif [ "$1" = "stop" ]; then
|
|||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT
|
||||
|
||||
|
||||
iptables-restore < /pineapple/modules/SSLsplit/rules/saved
|
||||
fi
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "ettercap",
|
||||
"version": "1.4"
|
||||
"version": "1.5"
|
||||
}
|
|
@ -14,13 +14,13 @@ if [ "$1" = "install" ]; then
|
|||
if [ "$2" = "internal" ]; then
|
||||
opkg install ettercap
|
||||
|
||||
sed -i "/redir_command_on = \"iptables/ s/# *//" /etc/ettercap/etter.conf
|
||||
sed -i "/redir_command_off = \"iptables/ s/# *//" /etc/ettercap/etter.conf
|
||||
sed -i "/redir_command_on = \"iptables/ s/# *//" /etc/ettercap/etter.conf
|
||||
sed -i "/redir_command_off = \"iptables/ s/# *//" /etc/ettercap/etter.conf
|
||||
|
||||
sed -i 's/^\(ec_uid = \).*/\10/' /etc/ettercap/etter.conf
|
||||
sed -i 's/^\(ec_gid = \).*/\10/' /etc/ettercap/etter.conf
|
||||
sed -i 's/^\(ec_uid = \).*/\10/' /etc/ettercap/etter.conf
|
||||
sed -i 's/^\(ec_gid = \).*/\10/' /etc/ettercap/etter.conf
|
||||
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg install ettercap --dest sd
|
||||
|
@ -34,6 +34,10 @@ if [ "$1" = "install" ]; then
|
|||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
||||
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||
fi
|
||||
|
||||
touch /etc/config/ettercap
|
||||
echo "config ettercap 'module'" > /etc/config/ettercap
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "ngrep",
|
||||
"version": "1.4"
|
||||
"version": "1.5"
|
||||
}
|
|
@ -12,12 +12,16 @@ touch /tmp/ngrep.progress
|
|||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg update
|
||||
opkg install ngrep
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install ngrep --dest sd
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
||||
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||
fi
|
||||
|
||||
touch /etc/config/ngrep
|
||||
echo "config ngrep 'module'" > /etc/config/ngrep
|
||||
|
|
|
@ -7,10 +7,10 @@ class nmap extends Module
|
|||
public function route()
|
||||
{
|
||||
switch ($this->request->action) {
|
||||
case 'refreshInfo':
|
||||
$this->refreshInfo();
|
||||
break;
|
||||
case 'refreshOutput':
|
||||
case 'refreshInfo':
|
||||
$this->refreshInfo();
|
||||
break;
|
||||
case 'refreshOutput':
|
||||
$this->refreshOutput();
|
||||
break;
|
||||
case 'refreshStatus':
|
||||
|
@ -37,33 +37,30 @@ class nmap extends Module
|
|||
case 'deleteHistory':
|
||||
$this->deleteHistory();
|
||||
break;
|
||||
case 'downloadHistory':
|
||||
$this->downloadHistory();
|
||||
break;
|
||||
case 'downloadHistory':
|
||||
$this->downloadHistory();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkDependency($dependencyName)
|
||||
{
|
||||
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("nmap.module.installed")));
|
||||
}
|
||||
protected function checkDependency($dependencyName)
|
||||
{
|
||||
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("nmap.module.installed")));
|
||||
}
|
||||
|
||||
protected function getDevice()
|
||||
{
|
||||
return trim(exec("cat /proc/cpuinfo | grep machine | awk -F: '{print $2}'"));
|
||||
}
|
||||
protected function getDevice()
|
||||
{
|
||||
return trim(exec("cat /proc/cpuinfo | grep machine | awk -F: '{print $2}'"));
|
||||
}
|
||||
|
||||
protected function refreshInfo()
|
||||
{
|
||||
$moduleInfo = @json_decode(file_get_contents("/pineapple/modules/nmap/module.info"));
|
||||
$this->response = array('title' => $moduleInfo->title, 'version' => $moduleInfo->version);
|
||||
}
|
||||
protected function refreshInfo()
|
||||
{
|
||||
$moduleInfo = @json_decode(file_get_contents("/pineapple/modules/nmap/module.info"));
|
||||
$this->response = array('title' => $moduleInfo->title, 'version' => $moduleInfo->version);
|
||||
}
|
||||
|
||||
private function handleDependencies()
|
||||
{
|
||||
if (!file_exists("/usr/lib/libpcap.so.1.3") && file_exists("/usr/lib/libpcap.so")) {
|
||||
symlink("/usr/lib/libpcap.so", "/usr/lib/libpcap.so.1.3");
|
||||
}
|
||||
if(!$this->checkDependency("nmap"))
|
||||
{
|
||||
$this->execBackground("/pineapple/modules/nmap/scripts/dependencies.sh install ".$this->request->destination);
|
||||
|
@ -88,17 +85,17 @@ class nmap extends Module
|
|||
}
|
||||
}
|
||||
|
||||
private function scanStatus()
|
||||
{
|
||||
if (!$this->checkRunning("nmap"))
|
||||
{
|
||||
$this->response = array('success' => true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response = array('success' => false);
|
||||
}
|
||||
}
|
||||
private function scanStatus()
|
||||
{
|
||||
if (!$this->checkRunning("nmap"))
|
||||
{
|
||||
$this->response = array('success' => true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response = array('success' => false);
|
||||
}
|
||||
}
|
||||
|
||||
private function togglenmap()
|
||||
{
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "nmap",
|
||||
"version": "1.5"
|
||||
"version": "1.6"
|
||||
}
|
|
@ -12,12 +12,16 @@ touch /tmp/nmap.progress
|
|||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg update
|
||||
opkg install nmap
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install nmap --dest sd
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
||||
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||
fi
|
||||
|
||||
touch /etc/config/nmap
|
||||
echo "config nmap 'module'" > /etc/config/nmap
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "p0f",
|
||||
"version": "1.0"
|
||||
"version": "1.1"
|
||||
}
|
|
@ -18,6 +18,10 @@ if [ "$1" = "install" ]; then
|
|||
opkg update
|
||||
opkg install p0f --dest sd
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
||||
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||
fi
|
||||
|
||||
touch /etc/config/p0f
|
||||
echo "config p0f 'module'" > /etc/config/p0f
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "tcpdump",
|
||||
"version": "1.4"
|
||||
"version": "1.5"
|
||||
}
|
|
@ -12,12 +12,16 @@ touch /tmp/tcpdump.progress
|
|||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg update
|
||||
opkg install tcpdump
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install tcpdump --dest sd
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
||||
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||
fi
|
||||
|
||||
touch /etc/config/tcpdump
|
||||
echo "config tcpdump 'module'" > /etc/config/tcpdump
|
||||
|
|
|
@ -485,7 +485,7 @@ registerController('wps_OptionsController', ['$api', '$scope', '$rootScope', fun
|
|||
|
||||
angular.forEach($scope.reaverAdvancedOptions, function(value, key) {
|
||||
if(value.check != false)
|
||||
return_value += value.check + " " + value.val;
|
||||
return_value += value.check + " " + value.val + " ";
|
||||
});
|
||||
|
||||
return return_value;
|
||||
|
@ -507,7 +507,7 @@ registerController('wps_OptionsController', ['$api', '$scope', '$rootScope', fun
|
|||
|
||||
angular.forEach($scope.bullyAdvancedOptions, function(value, key) {
|
||||
if(value.check != false)
|
||||
return_value += value.check + " " + value.val;
|
||||
return_value += value.check + " " + value.val + " ";
|
||||
});
|
||||
|
||||
return return_value;
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"tetra"
|
||||
],
|
||||
"title": "wps",
|
||||
"version": "1.2"
|
||||
"version": "1.4"
|
||||
}
|
|
@ -12,7 +12,7 @@ touch /tmp/wps.progress
|
|||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg update
|
||||
|
||||
opkg install reaver
|
||||
opkg install bully
|
||||
|
@ -24,6 +24,10 @@ if [ "$1" = "install" ]; then
|
|||
opkg install bully --dest sd
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
||||
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||
fi
|
||||
|
||||
touch /etc/config/wps
|
||||
echo "config wps 'module'" > /etc/config/wps
|
||||
|
@ -32,6 +36,8 @@ if [ "$1" = "install" ]; then
|
|||
uci commit wps.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove reaver
|
||||
opkg remove bully
|
||||
rm -rf /etc/config/wps
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue