diff --git a/nmap/api/module.php b/nmap/api/module.php
index ff94358..790c6fd 100644
--- a/nmap/api/module.php
+++ b/nmap/api/module.php
@@ -142,7 +142,10 @@ class nmap extends Module
$device = $this->getDevice();
$sdAvailable = $this->isSDAvailable();
- $this->response = array("device" => $device, "sdAvailable" => $sdAvailable, "status" => $status, "statusLabel" => $statusLabel, "installed" => $installed, "install" => $install, "installLabel" => $installLabel, "processing" => $processing);
+ // 2143000 is the installed size of nmap.
+ $internalAvailable = (disk_free_space("/") - 64000) > 2143000;
+
+ $this->response = array("device" => $device, "internalAvailable" => $internalAvailable, "sdAvailable" => $sdAvailable, "status" => $status, "statusLabel" => $statusLabel, "installed" => $installed, "install" => $install, "installLabel" => $installLabel, "processing" => $processing);
}
private function refreshOutput()
diff --git a/nmap/js/module.js b/nmap/js/module.js
index 5b29fdf..02369a5 100644
--- a/nmap/js/module.js
+++ b/nmap/js/module.js
@@ -27,6 +27,7 @@ registerController('nmap_ControlsController', ['$api', '$scope', '$rootScope', '
$scope.device = '';
$scope.sdAvailable = false;
+ $scope.internalAvailable = false;
$rootScope.status = {
installed: false,
@@ -45,6 +46,7 @@ registerController('nmap_ControlsController', ['$api', '$scope', '$rootScope', '
$rootScope.status.installed = response.installed;
$scope.device = response.device;
$scope.sdAvailable = response.sdAvailable;
+ $scope.internalAvailable = response.internalAvailable;
if (response.processing) $scope.processing = true;
$scope.install = response.install;
$scope.installLabel = response.installLabel;
diff --git a/nmap/module.html b/nmap/module.html
index 4c62e4e..12d85fc 100644
--- a/nmap/module.html
+++ b/nmap/module.html
@@ -1,62 +1,100 @@
-
+
-
Controls
+ Controls
+
+
+
+
+ | Dependencies |
+
+
+ |
+
+
+ |
+
+
+ | nmap |
+
+
+ |
+
+
-
-
-
- | Dependencies |
- |
- |
-
-
- | nmap |
- |
-
-
-
-
-
-
-
-
- All required dependencies have to be installed first. This may take a few minutes.
- Please wait, do not leave or refresh this page. Once the install is complete, this page will refresh automatically.
-
-
-
-
-
+
+
+
+
+
+ All required dependencies have to be installed first. This may take a few minutes.
+ Please wait, do not leave or refresh this page. Once the install is complete, this page will
+ refresh automatically.
-
-
- All required dependencies will be removed. This may take a few minutes.
- Please wait, do not leave or refresh this page. Once the remove is complete, this page will refresh automatically.
+
+
+
+
+
+
+ All required dependencies will be removed. This may take a few minutes.
+ Please wait, do not leave or refresh this page. Once the remove is complete, this page will
+ refresh automatically.
+
+
+
+
-
-
-
-
@@ -67,169 +105,210 @@
Options
-
+
-
+
Output
-
- Auto-refresh
-
-
-
-
-
+
+ Auto-refresh
+
+
+
+
+
+
-
-
{{output}}
+
+
+
{{output}}
@@ -239,48 +318,57 @@
-
-
-
-
-
- | Date |
- Action |
-
-
-
-
- | {{entry[0]}} |
-
-
-
-
-
-
- |
-
-
-
-
-
No history...
+
+
+
+
+
+
+ | Date |
+ Action |
+
+
+
+
+ | {{entry[0]}} |
+
+
+
+
+
+
+ |
+
+
+
+
+
No history...
-
+
diff --git a/nmap/module.info b/nmap/module.info
index 8c66da3..79d035c 100644
--- a/nmap/module.info
+++ b/nmap/module.info
@@ -6,5 +6,5 @@
"tetra"
],
"title": "nmap",
- "version": "1.8"
+ "version": "1.9"
}
\ No newline at end of file
diff --git a/urlsnarf/api/module.php b/urlsnarf/api/module.php
index c0b66f6..5b1c8a9 100644
--- a/urlsnarf/api/module.php
+++ b/urlsnarf/api/module.php
@@ -49,7 +49,7 @@ class urlsnarf extends Module
}
}
- protected function checkDependency($dependencyName)
+ protected function checkDep($dependencyName)
{
return ($this->checkDependency($dependencyName) && ($this->uciGet("urlsnarf.module.installed")));
}
@@ -67,7 +67,7 @@ class urlsnarf extends Module
private function handleDependencies()
{
- if (!$this->checkDependency("urlsnarf")) {
+ if (!$this->checkDep("urlsnarf")) {
$this->execBackground("/pineapple/modules/urlsnarf/scripts/dependencies.sh install ".$this->request->destination);
$this->response = array('success' => true);
} else {
@@ -119,7 +119,7 @@ class urlsnarf extends Module
private function refreshStatus()
{
if (!file_exists('/tmp/urlsnarf.progress')) {
- if (!$this->checkDependency("urlsnarf")) {
+ if (!$this->checkDep("urlsnarf")) {
$installed = false;
$install = "Not installed";
$installLabel = "danger";
@@ -173,7 +173,7 @@ class urlsnarf extends Module
private function refreshOutput()
{
- if ($this->checkDependency("urlsnarf")) {
+ if ($this->checkDep("urlsnarf")) {
if ($this->checkRunning("urlsnarf")) {
$path = "/pineapple/modules/urlsnarf/log";
diff --git a/urlsnarf/module.info b/urlsnarf/module.info
index 216f69e..f783c13 100644
--- a/urlsnarf/module.info
+++ b/urlsnarf/module.info
@@ -6,5 +6,5 @@
"tetra"
],
"title": "urlsnarf",
- "version": "1.7"
+ "version": "1.8"
}