mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Update Modules for 2.6.0+ (Wave 1) (#71)
* Misc: Ignore JetBrains IDE files * Modules: Update Modules for 2.6.0 (1) * SiteSurvey: Actually install mdk3 dependency. * Modules: Bump version numbers for updated modules
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<?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
|
||||
{
|
||||
public function route()
|
||||
@@ -56,9 +53,9 @@ class ngrep extends Module
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkDependency($dependencyName)
|
||||
protected function checkDeps($dependencyName)
|
||||
{
|
||||
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("ngrep.module.installed")));
|
||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("ngrep.module.installed")));
|
||||
}
|
||||
|
||||
protected function getDevice()
|
||||
@@ -74,7 +71,7 @@ class ngrep extends Module
|
||||
|
||||
private function handleDependencies()
|
||||
{
|
||||
if (!$this->checkDependency("ngrep")) {
|
||||
if (!$this->checkDeps("ngrep")) {
|
||||
$this->execBackground("/pineapple/modules/ngrep/scripts/dependencies.sh install ".$this->request->destination);
|
||||
$this->response = array('success' => true);
|
||||
} else {
|
||||
@@ -107,7 +104,7 @@ class ngrep extends Module
|
||||
private function refreshStatus()
|
||||
{
|
||||
if (!file_exists('/tmp/ngrep.progress')) {
|
||||
if (!$this->checkDependency("ngrep")) {
|
||||
if (!$this->checkDeps("ngrep")) {
|
||||
$installed = false;
|
||||
$install = "Not installed";
|
||||
$installLabel = "danger";
|
||||
@@ -147,7 +144,7 @@ class ngrep extends Module
|
||||
|
||||
private function refreshOutput()
|
||||
{
|
||||
if ($this->checkDependency("ngrep")) {
|
||||
if ($this->checkDeps("ngrep")) {
|
||||
if ($this->checkRunning("ngrep")) {
|
||||
$path = "/pineapple/modules/ngrep/log";
|
||||
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
"tetra"
|
||||
],
|
||||
"title": "ngrep",
|
||||
"version": "1.6"
|
||||
"version": "1.7"
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
#2015 - Whistle Master
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
logger "== Ngrep Install Script"
|
||||
|
||||
[[ -f /tmp/ngrep.progress ]] && {
|
||||
exit 0
|
||||
@@ -19,10 +18,6 @@ if [ "$1" = "install" ]; then
|
||||
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
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/sh
|
||||
#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`
|
||||
MYCMD=`cat /tmp/ngrep.run`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user