This reverts commit 0a3e973d99
.
pull/76/head
parent
0a3e973d99
commit
2ba1732389
|
@ -1 +0,0 @@
|
||||||
.idea/
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class DNSMasqSpoof extends Module
|
class DNSMasqSpoof extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -41,9 +44,9 @@ class DNSMasqSpoof extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDep($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("dnsmasqspoof.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("dnsmasqspoof.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -64,7 +67,7 @@ class DNSMasqSpoof extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDep("dnsmasq")) {
|
if (!$this->checkDependency("dnsmasq")) {
|
||||||
$this->execBackground("/pineapple/modules/DNSMasqSpoof/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/DNSMasqSpoof/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
if grep addn-hosts /etc/dnsmasq.conf &> /dev/null; then
|
if grep addn-hosts /etc/dnsmasq.conf &> /dev/null; then
|
||||||
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
|
/etc/init.d/dnsmasq stop && /etc/init.d/dnsmasq start
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/DNSMasqSpoof.progress ]] && {
|
[[ -f /tmp/DNSMasqSpoof.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
if [ "$1" = "start" ]; then
|
if [ "$1" = "start" ]; then
|
||||||
echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
|
echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
|
||||||
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
|
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class DNSspoof extends Module
|
class DNSspoof extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -59,9 +62,9 @@ class DNSspoof extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDep($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("dnsspoof.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("dnsspoof.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -77,7 +80,7 @@ class DNSspoof extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDep("dnsspoof")) {
|
if (!$this->checkDependency("dnsspoof")) {
|
||||||
$this->execBackground("/pineapple/modules/DNSspoof/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/DNSspoof/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get dnsspoof.autostart.interface`
|
MYINTERFACE=`uci get dnsspoof.autostart.interface`
|
||||||
HOSTSFILE="/etc/pineapple/spoofhost"
|
HOSTSFILE="/etc/pineapple/spoofhost"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
logger "== DNSSpoof Dependencies Installer"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/DNSspoof.progress ]] && {
|
[[ -f /tmp/DNSspoof.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get dnsspoof.run.interface`
|
MYINTERFACE=`uci get dnsspoof.run.interface`
|
||||||
HOSTSFILE="/etc/pineapple/spoofhost"
|
HOSTSFILE="/etc/pineapple/spoofhost"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
//putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
//putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class Deauth extends Module
|
class Deauth extends Module
|
||||||
{
|
{
|
||||||
|
@ -53,9 +53,9 @@ class Deauth extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDep($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("deauth.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("deauth.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -71,7 +71,7 @@ class Deauth extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDep("mdk3")) {
|
if (!$this->checkDependency("mdk3")) {
|
||||||
$this->execBackground("/pineapple/modules/Deauth/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/Deauth/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -116,7 +116,7 @@ class Deauth extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/Deauth.progress')) {
|
if (!file_exists('/tmp/Deauth.progress')) {
|
||||||
if (!$this->checkDep("mdk3")) {
|
if (!$this->checkDependency("mdk3")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
LOG=/tmp/deauth.log
|
LOG=/tmp/deauth.log
|
||||||
MYPATH='/pineapple/modules/Deauth/'
|
MYPATH='/pineapple/modules/Deauth/'
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
LOG=/tmp/deauth.log
|
LOG=/tmp/deauth.log
|
||||||
MYPATH='/pineapple/modules/Deauth/'
|
MYPATH='/pineapple/modules/Deauth/'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
#export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/Deauth.progress ]] && {
|
[[ -f /tmp/Deauth.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class KeyManager extends Module
|
class KeyManager extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
{
|
{
|
||||||
switch ($this->request->action) {
|
switch ($this->request->action) {
|
||||||
case 'refreshInfo':
|
case 'refreshInfo':
|
||||||
$this->refreshInfo();
|
$this->refreshInfo();
|
||||||
break;
|
break;
|
||||||
case 'refreshOutput':
|
case 'refreshOutput':
|
||||||
$this->refreshOutput();
|
$this->refreshOutput();
|
||||||
break;
|
break;
|
||||||
case 'clearOutput':
|
case 'clearOutput':
|
||||||
$this->clearOutput();
|
$this->clearOutput();
|
||||||
break;
|
break;
|
||||||
case 'refreshStatus':
|
case 'refreshStatus':
|
||||||
|
@ -23,217 +25,250 @@ class KeyManager extends Module
|
||||||
case 'handleDependenciesStatus':
|
case 'handleDependenciesStatus':
|
||||||
$this->handleDependenciesStatus();
|
$this->handleDependenciesStatus();
|
||||||
break;
|
break;
|
||||||
case 'handleKey':
|
case 'handleKey':
|
||||||
$this->handleKey();
|
$this->handleKey();
|
||||||
break;
|
break;
|
||||||
case 'handleKeyStatus':
|
case 'handleKeyStatus':
|
||||||
$this->handleKeyStatus();
|
$this->handleKeyStatus();
|
||||||
break;
|
break;
|
||||||
case 'saveKnownHostsData':
|
case 'saveKnownHostsData':
|
||||||
$this->saveKnownHostsData();
|
$this->saveKnownHostsData();
|
||||||
break;
|
break;
|
||||||
case 'getKnownHostsData':
|
case 'getKnownHostsData':
|
||||||
$this->getKnownHostsData();
|
$this->getKnownHostsData();
|
||||||
break;
|
break;
|
||||||
case 'addToKnownHosts':
|
case 'addToKnownHosts':
|
||||||
$this->addToKnownHosts();
|
$this->addToKnownHosts();
|
||||||
break;
|
break;
|
||||||
case 'addToKnownHostsStatus':
|
case 'addToKnownHostsStatus':
|
||||||
$this->addToKnownHostsStatus();
|
$this->addToKnownHostsStatus();
|
||||||
break;
|
break;
|
||||||
case 'copyToRemoteHost':
|
case 'copyToRemoteHost':
|
||||||
$this->copyToRemoteHost();
|
$this->copyToRemoteHost();
|
||||||
break;
|
break;
|
||||||
case 'copyToRemoteHostStatus':
|
case 'copyToRemoteHostStatus':
|
||||||
$this->copyToRemoteHostStatus();
|
$this->copyToRemoteHostStatus();
|
||||||
break;
|
break;
|
||||||
case 'getSettings':
|
case 'getSettings':
|
||||||
$this->getSettings();
|
$this->getSettings();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDep($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("keymanager.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("keymanager.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
{
|
{
|
||||||
return trim(exec("cat /proc/cpuinfo | grep machine | awk -F: '{print $2}'"));
|
return trim(exec("cat /proc/cpuinfo | grep machine | awk -F: '{print $2}'"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function refreshInfo()
|
protected function refreshInfo()
|
||||||
{
|
{
|
||||||
$moduleInfo = @json_decode(file_get_contents("/pineapple/modules/KeyManager/module.info"));
|
$moduleInfo = @json_decode(file_get_contents("/pineapple/modules/KeyManager/module.info"));
|
||||||
$this->response = array('title' => $moduleInfo->title, 'version' => $moduleInfo->version);
|
$this->response = array('title' => $moduleInfo->title, 'version' => $moduleInfo->version);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleKey()
|
private function handleKey()
|
||||||
{
|
{
|
||||||
if (!file_exists("/root/.ssh/id_rsa")) {
|
if(!file_exists("/root/.ssh/id_rsa"))
|
||||||
$this->execBackground("/pineapple/modules/KeyManager/scripts/generate_key.sh");
|
{
|
||||||
$this->response = array('success' => true);
|
$this->execBackground("/pineapple/modules/KeyManager/scripts/generate_key.sh");
|
||||||
} else {
|
$this->response = array('success' => true);
|
||||||
exec("rm -rf /root/.ssh/id_rsa*");
|
}
|
||||||
$this->response = array('success' => true);
|
else
|
||||||
}
|
{
|
||||||
}
|
exec("rm -rf /root/.ssh/id_rsa*");
|
||||||
|
$this->response = array('success' => true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function handleKeyStatus()
|
private function handleKeyStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/KeyManager_key.progress')) {
|
if (!file_exists('/tmp/KeyManager_key.progress'))
|
||||||
|
{
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$this->response = array('success' => false);
|
$this->response = array('success' => false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDep("ssh-keyscan")) {
|
if(!$this->checkDependency("ssh-keyscan"))
|
||||||
$this->execBackground("/pineapple/modules/KeyManager/scripts/dependencies.sh install " . $this->request->destination);
|
{
|
||||||
$this->response = array('success' => true);
|
$this->execBackground("/pineapple/modules/KeyManager/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
} else {
|
$this->response = array('success' => true);
|
||||||
$this->execBackground("/pineapple/modules/KeyManager/scripts/dependencies.sh remove");
|
}
|
||||||
$this->response = array('success' => true);
|
else
|
||||||
}
|
{
|
||||||
}
|
$this->execBackground("/pineapple/modules/KeyManager/scripts/dependencies.sh remove");
|
||||||
|
$this->response = array('success' => true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function handleDependenciesStatus()
|
private function handleDependenciesStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/KeyManager.progress')) {
|
if (!file_exists('/tmp/KeyManager.progress'))
|
||||||
|
{
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$this->response = array('success' => false);
|
$this->response = array('success' => false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/KeyManager.progress')) {
|
if (!file_exists('/tmp/KeyManager.progress'))
|
||||||
if (!$this->checkDep("ssh-keyscan")) {
|
{
|
||||||
$installed = false;
|
if(!$this->checkDependency("ssh-keyscan"))
|
||||||
$install = "Not installed";
|
{
|
||||||
$installLabel = "danger";
|
$installed = false;
|
||||||
$processing = false;
|
$install = "Not installed";
|
||||||
} else {
|
$installLabel = "danger";
|
||||||
$installed = true;
|
$processing = false;
|
||||||
$install = "Installed";
|
}
|
||||||
$installLabel = "success";
|
else
|
||||||
$processing = false;
|
{
|
||||||
}
|
$installed = true;
|
||||||
|
$install = "Installed";
|
||||||
|
$installLabel = "success";
|
||||||
|
$processing = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!file_exists('/tmp/KeyManager_key.progress')) {
|
if (!file_exists('/tmp/KeyManager_key.progress'))
|
||||||
if (!file_exists("/root/.ssh/id_rsa")) {
|
{
|
||||||
$key = "Not generated";
|
if(!file_exists("/root/.ssh/id_rsa"))
|
||||||
$keyLabel = "danger";
|
{
|
||||||
$generated = false;
|
$key = "Not generated";
|
||||||
$generating = false;
|
$keyLabel = "danger";
|
||||||
} else {
|
$generated = false;
|
||||||
$key = "Generated";
|
$generating = false;
|
||||||
$keyLabel = "success";
|
}
|
||||||
$generated = true;
|
else
|
||||||
$generating = false;
|
{
|
||||||
}
|
$key = "Generated";
|
||||||
} else {
|
$keyLabel = "success";
|
||||||
$key = "Generating...";
|
$generated = true;
|
||||||
$keyLabel = "warning";
|
$generating = false;
|
||||||
$generated = false;
|
}
|
||||||
$generating = true;
|
}
|
||||||
}
|
else
|
||||||
} else {
|
{
|
||||||
$installed = false;
|
$key = "Generating...";
|
||||||
$install = "Installing...";
|
$keyLabel = "warning";
|
||||||
$installLabel = "warning";
|
$generated = false;
|
||||||
$processing = true;
|
$generating = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$installed = false;
|
||||||
|
$install = "Installing...";
|
||||||
|
$installLabel = "warning";
|
||||||
|
$processing = true;
|
||||||
|
|
||||||
$key = "Not generated";
|
$key = "Not generated";
|
||||||
$keyLabel = "danger";
|
$keyLabel = "danger";
|
||||||
$generating = false;
|
$generating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$device = $this->getDevice();
|
$device = $this->getDevice();
|
||||||
$sdAvailable = $this->isSDAvailable();
|
$sdAvailable = $this->isSDAvailable();
|
||||||
|
|
||||||
$this->response = array("device" => $device, "sdAvailable" => $sdAvailable, "installed" => $installed, "key" => $key, "keyLabel" => $keyLabel, "generating" => $generating, "generated" => $generated, "install" => $install, "installLabel" => $installLabel, "processing" => $processing);
|
$this->response = array("device" => $device, "sdAvailable" => $sdAvailable, "installed" => $installed, "key" => $key, "keyLabel" => $keyLabel, "generating" => $generating, "generated" => $generated, "install" => $install, "installLabel" => $installLabel, "processing" => $processing);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if (file_exists("/tmp/keymanager.log")) {
|
if (file_exists("/tmp/keymanager.log"))
|
||||||
$output = file_get_contents("/tmp/keymanager.log");
|
{
|
||||||
if (!empty($output))
|
$output = file_get_contents("/tmp/keymanager.log");
|
||||||
$this->response = $output;
|
if(!empty($output))
|
||||||
else
|
$this->response = $output;
|
||||||
$this->response = " ";
|
else
|
||||||
} else {
|
$this->response = " ";
|
||||||
$this->response = " ";
|
}
|
||||||
}
|
else
|
||||||
}
|
{
|
||||||
|
$this->response = " ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function clearOutput()
|
private function clearOutput()
|
||||||
{
|
{
|
||||||
exec("rm -rf /tmp/keymanager.log");
|
exec("rm -rf /tmp/keymanager.log");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function saveKnownHostsData()
|
private function saveKnownHostsData()
|
||||||
{
|
{
|
||||||
$filename = '/root/.ssh/known_hosts';
|
$filename = '/root/.ssh/known_hosts';
|
||||||
file_put_contents($filename, $this->request->knownHostsData);
|
file_put_contents($filename, $this->request->knownHostsData);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getKnownHostsData()
|
private function getKnownHostsData()
|
||||||
{
|
{
|
||||||
$knownHostsData = file_get_contents('/root/.ssh/known_hosts');
|
$knownHostsData = file_get_contents('/root/.ssh/known_hosts');
|
||||||
$this->response = array("knownHostsData" => $knownHostsData);
|
$this->response = array("knownHostsData" => $knownHostsData);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function addToKnownHostsStatus()
|
private function addToKnownHostsStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/KeyManager.progress')) {
|
if (!file_exists('/tmp/KeyManager.progress'))
|
||||||
$this->response = array('success' => true);
|
{
|
||||||
} else {
|
$this->response = array('success' => true);
|
||||||
$this->response = array('success' => false);
|
}
|
||||||
}
|
else
|
||||||
}
|
{
|
||||||
|
$this->response = array('success' => false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function addToKnownHosts()
|
private function addToKnownHosts()
|
||||||
{
|
{
|
||||||
$this->uciSet("keymanager.settings.host", $this->request->host);
|
$this->uciSet("keymanager.settings.host", $this->request->host);
|
||||||
$this->uciSet("keymanager.settings.port", $this->request->port);
|
$this->uciSet("keymanager.settings.port", $this->request->port);
|
||||||
|
|
||||||
$this->execBackground("/pineapple/modules/KeyManager/scripts/add_host.sh");
|
$this->execBackground("/pineapple/modules/KeyManager/scripts/add_host.sh");
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function copyToRemoteHostStatus()
|
private function copyToRemoteHostStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/KeyManager.progress')) {
|
if (!file_exists('/tmp/KeyManager.progress'))
|
||||||
$this->response = array('success' => true);
|
{
|
||||||
} else {
|
$this->response = array('success' => true);
|
||||||
$this->response = array('success' => false);
|
}
|
||||||
}
|
else
|
||||||
}
|
{
|
||||||
|
$this->response = array('success' => false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function copyToRemoteHost()
|
private function copyToRemoteHost()
|
||||||
{
|
{
|
||||||
$this->uciSet("keymanager.settings.host", $this->request->host);
|
$this->uciSet("keymanager.settings.host", $this->request->host);
|
||||||
$this->uciSet("keymanager.settings.port", $this->request->port);
|
$this->uciSet("keymanager.settings.port", $this->request->port);
|
||||||
$this->uciSet("keymanager.settings.user", $this->request->user);
|
$this->uciSet("keymanager.settings.user", $this->request->user);
|
||||||
|
|
||||||
$this->execBackground("/pineapple/modules/KeyManager/scripts/copy_key.sh " . $this->request->password);
|
$this->execBackground("/pineapple/modules/KeyManager/scripts/copy_key.sh ".$this->request->password);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getSettings()
|
private function getSettings()
|
||||||
{
|
{
|
||||||
$settings = array(
|
$settings = array(
|
||||||
'host' => $this->uciGet("keymanager.settings.host"),
|
'host' => $this->uciGet("keymanager.settings.host"),
|
||||||
'port' => $this->uciGet("keymanager.settings.port"),
|
'port' => $this->uciGet("keymanager.settings.port"),
|
||||||
'user' => $this->uciGet("keymanager.settings.user")
|
'user' => $this->uciGet("keymanager.settings.user")
|
||||||
);
|
);
|
||||||
$this->response = $settings;
|
$this->response = $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/KeyManager.progress ]] && {
|
[[ -f /tmp/KeyManager.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/KeyManager.progress ]] && {
|
[[ -f /tmp/KeyManager.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
logger "== KeyManager Install Script"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/KeyManager.progress ]] && {
|
[[ -f /tmp/KeyManager.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/KeyManager_key.progress ]] && {
|
[[ -f /tmp/KeyManager_key.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class LogManager extends Module
|
class LogManager extends Module
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class Occupineapple extends Module
|
class Occupineapple extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -53,9 +56,9 @@ class Occupineapple extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("occupineapple.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("occupineapple.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -71,7 +74,7 @@ class Occupineapple extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("mdk3")) {
|
if (!$this->checkDependency("mdk3")) {
|
||||||
$this->execBackground("/pineapple/modules/Occupineapple/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/Occupineapple/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -118,7 +121,7 @@ class Occupineapple extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/Occupineapple.progress')) {
|
if (!file_exists('/tmp/Occupineapple.progress')) {
|
||||||
if (!$this->checkDeps("mdk3")) {
|
if (!$this->checkDependency("mdk3")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -172,7 +175,7 @@ class Occupineapple extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("mdk3")) {
|
if ($this->checkDependency("mdk3")) {
|
||||||
if ($this->checkRunning("mdk3")) {
|
if ($this->checkRunning("mdk3")) {
|
||||||
exec("cat /tmp/occupineapple.log", $output);
|
exec("cat /tmp/occupineapple.log", $output);
|
||||||
if (!empty($output)) {
|
if (!empty($output)) {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
LOG=/tmp/occupineapple.log
|
LOG=/tmp/occupineapple.log
|
||||||
MYPATH='/pineapple/modules/Occupineapple/'
|
MYPATH='/pineapple/modules/Occupineapple/'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/Occupineapple.progress ]] && {
|
[[ -f /tmp/Occupineapple.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
LOG=/tmp/occupineapple.log
|
LOG=/tmp/occupineapple.log
|
||||||
MYPATH='/pineapple/modules/Occupineapple/'
|
MYPATH='/pineapple/modules/Occupineapple/'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class OnlineHashCrack extends Module
|
class OnlineHashCrack extends Module
|
||||||
{
|
{
|
||||||
|
@ -47,9 +49,9 @@ class OnlineHashCrack extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("onlinehashcrack.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("onlinehashcrack.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -65,9 +67,9 @@ class OnlineHashCrack extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if(!$this->checkDeps("curl"))
|
if(!$this->checkDependency("curl"))
|
||||||
{
|
{
|
||||||
$this->execBackground("/pineapple/modules/OnlineHashCrack/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/OnlineHashCrack/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -93,7 +95,7 @@ class OnlineHashCrack extends Module
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/OnlineHashCrack.progress'))
|
if (!file_exists('/tmp/OnlineHashCrack.progress'))
|
||||||
{
|
{
|
||||||
if(!$this->checkDeps("curl"))
|
if(!$this->checkDependency("curl"))
|
||||||
{
|
{
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/OnlineHashCrack.progress ]] && {
|
[[ -f /tmp/OnlineHashCrack.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/OnlineHashCrack.progress ]] && {
|
[[ -f /tmp/OnlineHashCrack.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/OnlineHashCrack.progress ]] && {
|
[[ -f /tmp/OnlineHashCrack.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class Responder extends Module
|
class Responder extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -53,9 +56,9 @@ class Responder extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("responder.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("responder.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkRunning($processName)
|
protected function checkRunning($processName)
|
||||||
|
@ -76,7 +79,7 @@ class Responder extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("python")) {
|
if (!$this->checkDependency("python")) {
|
||||||
$this->execBackground("/pineapple/modules/Responder/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/Responder/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -128,7 +131,7 @@ class Responder extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/Responder.progress')) {
|
if (!file_exists('/tmp/Responder.progress')) {
|
||||||
if (!$this->checkDeps("python")) {
|
if (!$this->checkDependency("python")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -183,7 +186,7 @@ class Responder extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("python")) {
|
if ($this->checkDependency("python")) {
|
||||||
if ($this->checkRunning("Responder.py")) {
|
if ($this->checkRunning("Responder.py")) {
|
||||||
if (file_exists("/pineapple/modules/Responder/dep/responder/logs/Responder-Session.log")) {
|
if (file_exists("/pineapple/modules/Responder/dep/responder/logs/Responder-Session.log")) {
|
||||||
if ($this->request->filter != "") {
|
if ($this->request->filter != "") {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get responder.autostart.interface`
|
MYINTERFACE=`uci get responder.autostart.interface`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/Responder.progress ]] && {
|
[[ -f /tmp/Responder.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get responder.run.interface`
|
MYINTERFACE=`uci get responder.run.interface`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class SSLsplit extends Module
|
class SSLsplit extends Module
|
||||||
{
|
{
|
||||||
|
@ -55,9 +56,9 @@ class SSLsplit extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("sslsplit.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("sslsplit.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -93,7 +94,7 @@ class SSLsplit extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("sslsplit")) {
|
if (!$this->checkDependency("sslsplit")) {
|
||||||
$this->execBackground("/pineapple/modules/SSLsplit/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/SSLsplit/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -134,7 +135,7 @@ class SSLsplit extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/SSLsplit.progress')) {
|
if (!file_exists('/tmp/SSLsplit.progress')) {
|
||||||
if (!$this->checkDeps("sslsplit")) {
|
if (!$this->checkDependency("sslsplit")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -214,7 +215,7 @@ class SSLsplit extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("sslsplit")) {
|
if ($this->checkDependency("sslsplit")) {
|
||||||
if ($this->checkRunning("sslsplit")) {
|
if ($this->checkRunning("sslsplit")) {
|
||||||
if (file_exists("/pineapple/modules/SSLsplit/connections.log")) {
|
if (file_exists("/pineapple/modules/SSLsplit/connections.log")) {
|
||||||
if ($this->request->filter != "") {
|
if ($this->request->filter != "") {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/SSLsplit.progress ]] && {
|
[[ -f /tmp/SSLsplit.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/SSLsplit_certificate.progress ]] && {
|
[[ -f /tmp/SSLsplit_certificate.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
require_once('/pineapple/modules/SiteSurvey/api/iwlist_parser.php');
|
require_once('/pineapple/modules/SiteSurvey/api/iwlist_parser.php');
|
||||||
|
|
||||||
class SiteSurvey extends Module
|
class SiteSurvey extends Module
|
||||||
|
@ -67,9 +70,9 @@ class SiteSurvey extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("sitesurvey.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("sitesurvey.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -90,7 +93,7 @@ class SiteSurvey extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("mdk3")) {
|
if (!$this->checkDependency("mdk3")) {
|
||||||
$this->execBackground("/pineapple/modules/SiteSurvey/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/SiteSurvey/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,7 +114,7 @@ class SiteSurvey extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/SiteSurvey.progress')) {
|
if (!file_exists('/tmp/SiteSurvey.progress')) {
|
||||||
if (!$this->checkDeps("iwlist")) {
|
if (!$this->checkDependency("iwlist")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
LOG=/tmp/SiteSurvey.log
|
LOG=/tmp/SiteSurvey.log
|
||||||
LOCK=/tmp/SiteSurvey_capture.lock
|
LOCK=/tmp/SiteSurvey_capture.lock
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
LOG=/tmp/SiteSurvey.log
|
LOG=/tmp/SiteSurvey.log
|
||||||
LOCK=/tmp/SiteSurvey_deauth.lock
|
LOCK=/tmp/SiteSurvey_deauth.lock
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
logger "== SITESURVEY INSTALL SCRIPT"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/SiteSurvey.progress ]] && {
|
[[ -f /tmp/SiteSurvey.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -12,10 +13,8 @@ touch /tmp/SiteSurvey.progress
|
||||||
if [ "$1" = "install" ]; then
|
if [ "$1" = "install" ]; then
|
||||||
if [ "$2" = "internal" ]; then
|
if [ "$2" = "internal" ]; then
|
||||||
opkg update
|
opkg update
|
||||||
opkg install mdk3
|
|
||||||
elif [ "$2" = "sd" ]; then
|
elif [ "$2" = "sd" ]; then
|
||||||
opkg update
|
opkg update
|
||||||
opkg install mdk3 --dest=sd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /etc/config/sitesurvey
|
touch /etc/config/sitesurvey
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class Status extends Module
|
class Status extends Module
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class dump1090 extends Module
|
class dump1090 extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -50,9 +53,9 @@ class dump1090 extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDep($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("dump1090.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("dump1090.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -68,7 +71,7 @@ class dump1090 extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDep("dump1090")) {
|
if (!$this->checkDependency("dump1090")) {
|
||||||
$this->execBackground("/pineapple/modules/dump1090/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/dump1090/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
logger "== DUMP1090 INSTALL SCRIPT"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/dump1090.progress ]] && {
|
[[ -f /tmp/dump1090.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
|
|
||||||
OPTIONS=''
|
OPTIONS=''
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class ettercap extends Module
|
class ettercap extends Module
|
||||||
{
|
{
|
||||||
|
@ -63,7 +64,7 @@ class ettercap extends Module
|
||||||
|
|
||||||
protected function checkDependency($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("ettercap.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("ettercap.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/ettercap.progress ]] && {
|
[[ -f /tmp/ettercap.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYCMD=`cat /tmp/ettercap.run`
|
MYCMD=`cat /tmp/ettercap.run`
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class ngrep extends Module
|
class ngrep extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -53,9 +56,9 @@ class ngrep extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("ngrep.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("ngrep.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -71,7 +74,7 @@ class ngrep extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("ngrep")) {
|
if (!$this->checkDependency("ngrep")) {
|
||||||
$this->execBackground("/pineapple/modules/ngrep/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/ngrep/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -104,7 +107,7 @@ class ngrep extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/ngrep.progress')) {
|
if (!file_exists('/tmp/ngrep.progress')) {
|
||||||
if (!$this->checkDeps("ngrep")) {
|
if (!$this->checkDependency("ngrep")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -144,7 +147,7 @@ class ngrep extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("ngrep")) {
|
if ($this->checkDependency("ngrep")) {
|
||||||
if ($this->checkRunning("ngrep")) {
|
if ($this->checkRunning("ngrep")) {
|
||||||
$path = "/pineapple/modules/ngrep/log";
|
$path = "/pineapple/modules/ngrep/log";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
logger "== Ngrep Install Script"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/ngrep.progress ]] && {
|
[[ -f /tmp/ngrep.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -18,6 +19,10 @@ if [ "$1" = "install" ]; then
|
||||||
opkg install ngrep --dest sd
|
opkg install ngrep --dest sd
|
||||||
fi
|
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
|
touch /etc/config/ngrep
|
||||||
echo "config ngrep 'module'" > /etc/config/ngrep
|
echo "config ngrep 'module'" > /etc/config/ngrep
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYCMD=`cat /tmp/ngrep.run`
|
MYCMD=`cat /tmp/ngrep.run`
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
//putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
//putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class nmap extends Module
|
class nmap extends Module
|
||||||
{
|
{
|
||||||
|
@ -44,15 +44,15 @@ class nmap extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDep($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("nmap.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("nmap.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// protected function getDevice()
|
protected function getDevice()
|
||||||
// {
|
{
|
||||||
// return trim(exec("cat /proc/cpuinfo | grep machine | awk -F: '{print $2}'"));
|
return trim(exec("cat /proc/cpuinfo | grep machine | awk -F: '{print $2}'"));
|
||||||
// }
|
}
|
||||||
|
|
||||||
protected function refreshInfo()
|
protected function refreshInfo()
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,6 @@ class nmap extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
error_log("handleDependencies()");
|
|
||||||
if (!$this->checkDependency("nmap")) {
|
if (!$this->checkDependency("nmap")) {
|
||||||
$this->execBackground("/pineapple/modules/nmap/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/nmap/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
|
@ -93,11 +92,9 @@ class nmap extends Module
|
||||||
private function togglenmap()
|
private function togglenmap()
|
||||||
{
|
{
|
||||||
if (!$this->checkRunning("nmap")) {
|
if (!$this->checkRunning("nmap")) {
|
||||||
error_log("nmap not running");
|
|
||||||
$full_cmd = $this->request->command . " -oN /tmp/nmap.scan 2>&1";
|
$full_cmd = $this->request->command . " -oN /tmp/nmap.scan 2>&1";
|
||||||
shell_exec("echo -e \"{$full_cmd}\" > /tmp/nmap.run");
|
shell_exec("echo -e \"{$full_cmd}\" > /tmp/nmap.run");
|
||||||
|
|
||||||
error_log("calling run script");
|
|
||||||
$this->execBackground("/pineapple/modules/nmap/scripts/nmap.sh start");
|
$this->execBackground("/pineapple/modules/nmap/scripts/nmap.sh start");
|
||||||
} else {
|
} else {
|
||||||
$this->execBackground("/pineapple/modules/nmap/scripts/nmap.sh stop");
|
$this->execBackground("/pineapple/modules/nmap/scripts/nmap.sh stop");
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
#export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
logger "== RUNNING NMAP INSTALL SCRIPT"
|
|
||||||
|
|
||||||
[[ -f /tmp/nmap.progress ]] && {
|
[[ -f /tmp/nmap.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -21,9 +19,9 @@ if [ "$1" = "install" ]; then
|
||||||
opkg install nmap --dest sd
|
opkg install nmap --dest sd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [ ! -f /usr/lib/libpcap.so ] && [ -f /usr/lib/libpcap.so.1.3 ]; then
|
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
|
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so.1.3
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
touch /etc/config/nmap
|
touch /etc/config/nmap
|
||||||
echo "config nmap 'module'" > /etc/config/nmap
|
echo "config nmap 'module'" > /etc/config/nmap
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
logger "== STARTING NMAP SCRIPT"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYCMD=`cat /tmp/nmap.run`
|
MYCMD=`cat /tmp/nmap.run`
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class p0f extends Module
|
class p0f extends Module
|
||||||
{
|
{
|
||||||
public function route()
|
public function route()
|
||||||
|
@ -47,9 +50,9 @@ class p0f extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("p0f.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("p0f.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -65,7 +68,7 @@ class p0f extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("p0f")) {
|
if (!$this->checkDependency("p0f")) {
|
||||||
$this->execBackground("/pineapple/modules/p0f/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/p0f/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -117,7 +120,7 @@ class p0f extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/p0f.progress')) {
|
if (!file_exists('/tmp/p0f.progress')) {
|
||||||
if (!$this->checkDeps("p0f")) {
|
if (!$this->checkDependency("p0f")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -172,7 +175,7 @@ class p0f extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("p0f")) {
|
if ($this->checkDependency("p0f")) {
|
||||||
if ($this->checkRunning("p0f")) {
|
if ($this->checkRunning("p0f")) {
|
||||||
$path = "/pineapple/modules/p0f/log";
|
$path = "/pineapple/modules/p0f/log";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get p0f.autostart.interface`
|
MYINTERFACE=`uci get p0f.autostart.interface`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/p0f.progress ]] && {
|
[[ -f /tmp/p0f.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get p0f.run.interface`
|
MYINTERFACE=`uci get p0f.run.interface`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class tcpdump extends Module
|
class tcpdump extends Module
|
||||||
{
|
{
|
||||||
|
@ -46,9 +47,9 @@ class tcpdump extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("tcpdump.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("tcpdump.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -64,7 +65,7 @@ class tcpdump extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("tcpdump")) {
|
if (!$this->checkDependency("tcpdump")) {
|
||||||
$this->execBackground("/pineapple/modules/tcpdump/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/tcpdump/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -97,7 +98,7 @@ class tcpdump extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/tcpdump.progress')) {
|
if (!file_exists('/tmp/tcpdump.progress')) {
|
||||||
if (!$this->checkDeps("tcpdump")) {
|
if (!$this->checkDependency("tcpdump")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -137,7 +138,7 @@ class tcpdump extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("tcpdump")) {
|
if ($this->checkDependency("tcpdump")) {
|
||||||
if (file_exists("/tmp/tcpdump_capture.log")) {
|
if (file_exists("/tmp/tcpdump_capture.log")) {
|
||||||
$output = file_get_contents("/tmp/tcpdump_capture.log");
|
$output = file_get_contents("/tmp/tcpdump_capture.log");
|
||||||
if (!empty($output)) {
|
if (!empty($output)) {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/tcpdump.progress ]] && {
|
[[ -f /tmp/tcpdump.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYCMD=`cat /tmp/tcpdump.run`
|
MYCMD=`cat /tmp/tcpdump.run`
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
# author: catatonicprime
|
# author: catatonicprime
|
||||||
# date: March 2018
|
# date: March 2018
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
touch /tmp/tor.progress
|
touch /tmp/tor.progress
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
class urlsnarf extends Module
|
class urlsnarf extends Module
|
||||||
{
|
{
|
||||||
|
@ -51,7 +52,7 @@ class urlsnarf extends Module
|
||||||
|
|
||||||
protected function checkDependency($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("urlsnarf.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("urlsnarf.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get urlsnarf.autostart.interface`
|
MYINTERFACE=`uci get urlsnarf.autostart.interface`
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/urlsnarf.progress ]] && {
|
[[ -f /tmp/urlsnarf.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYINTERFACE=`uci get urlsnarf.run.interface`
|
MYINTERFACE=`uci get urlsnarf.run.interface`
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php namespace pineapple;
|
<?php namespace pineapple;
|
||||||
|
|
||||||
|
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
|
||||||
|
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
|
||||||
|
|
||||||
require_once('/pineapple/modules/wps/api/iwlist_parser.php');
|
require_once('/pineapple/modules/wps/api/iwlist_parser.php');
|
||||||
|
|
||||||
class wps extends Module
|
class wps extends Module
|
||||||
|
@ -67,9 +70,9 @@ class wps extends Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkDeps($dependencyName)
|
protected function checkDependency($dependencyName)
|
||||||
{
|
{
|
||||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("wps.module.installed")));
|
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("wps.module.installed")));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDevice()
|
protected function getDevice()
|
||||||
|
@ -90,7 +93,7 @@ class wps extends Module
|
||||||
|
|
||||||
private function handleDependencies()
|
private function handleDependencies()
|
||||||
{
|
{
|
||||||
if (!$this->checkDeps("reaver")) {
|
if (!$this->checkDependency("reaver")) {
|
||||||
$this->execBackground("/pineapple/modules/wps/scripts/dependencies.sh install ".$this->request->destination);
|
$this->execBackground("/pineapple/modules/wps/scripts/dependencies.sh install ".$this->request->destination);
|
||||||
$this->response = array('success' => true);
|
$this->response = array('success' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,7 +114,7 @@ class wps extends Module
|
||||||
private function refreshStatus()
|
private function refreshStatus()
|
||||||
{
|
{
|
||||||
if (!file_exists('/tmp/wps.progress')) {
|
if (!file_exists('/tmp/wps.progress')) {
|
||||||
if (!$this->checkDeps("iwlist")) {
|
if (!$this->checkDependency("iwlist")) {
|
||||||
$installed = false;
|
$installed = false;
|
||||||
$install = "Not installed";
|
$install = "Not installed";
|
||||||
$installLabel = "danger";
|
$installLabel = "danger";
|
||||||
|
@ -163,7 +166,7 @@ class wps extends Module
|
||||||
|
|
||||||
private function refreshOutput()
|
private function refreshOutput()
|
||||||
{
|
{
|
||||||
if ($this->checkDeps("reaver") && $this->checkDeps("bully")) {
|
if ($this->checkDependency("reaver") && $this->checkDependency("bully")) {
|
||||||
if ($this->checkRunning("reaver") || $this->checkRunning("bully")) {
|
if ($this->checkRunning("reaver") || $this->checkRunning("bully")) {
|
||||||
$path = "/pineapple/modules/wps/log";
|
$path = "/pineapple/modules/wps/log";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
[[ -f /tmp/wps.progress ]] && {
|
[[ -f /tmp/wps.progress ]] && {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#2015 - Whistle Master
|
#2015 - Whistle Master
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||||
|
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||||
|
|
||||||
MYTIME=`date +%s`
|
MYTIME=`date +%s`
|
||||||
MYCMD=`cat /tmp/wps.run`
|
MYCMD=`cat /tmp/wps.run`
|
||||||
|
|
Loading…
Reference in New Issue