diff --git a/net/arp-scan/pkg-descr b/net/arp-scan/pkg-descr
index 71c2c3c88..ec91232ff 100644
--- a/net/arp-scan/pkg-descr
+++ b/net/arp-scan/pkg-descr
@@ -1,16 +1,16 @@
-ARP Scan sends ARP packets to hosts on the local network and displays
-any responses that are received.
+ARP Scan sends ARP packets to hosts on the local network and displays
+any responses that are received.
-The Address Resolution Protocol (ARP) uses a simple message format containing
+The Address Resolution Protocol (ARP) uses a simple message format containing
one address resolution request or response (usually IPv4).
-ARP Scan is a simple tool yet very powerful and it represent the only way
-to find a device using an arp response. Once you’ve found the MAC
-address, you can find more info about that device by matching that MAC
-address to it’s vendor.
+ARP Scan is a simple tool yet very powerful and it represent the only way
+to find a device using an arp response. Once you’ve found the MAC
+address, you can find more info about that device by matching that MAC
+address to it’s vendor.
-Arp scan techniques are very important to understand ARP/MAC responses
-for penetration tester and diagnosys purpose. It is the first tool for
-network monitoring, especially against ip collisions, arpspoof and all
-kind of hijack techniques, like Man-In-The-Middle Attack. It also helps
+Arp scan techniques are very important to understand ARP/MAC responses
+for penetration tester and diagnosys purpose. It is the first tool for
+network monitoring, especially against ip collisions, arpspoof and all
+kind of hijack techniques, like Man-In-The-Middle Attack. It also helps
in cases when someone is spoofing IP address and DoS-ing your server.
diff --git a/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/ServiceController.php b/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/ServiceController.php
index af7b58d6e..778fd06c8 100644
--- a/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/ServiceController.php
+++ b/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/ServiceController.php
@@ -87,5 +87,4 @@ class ServiceController extends ApiControllerBase
return array("message" => "error");
}
}
-
}
diff --git a/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/SettingsController.php b/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/SettingsController.php
index 9361fe723..059df5fc6 100644
--- a/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/SettingsController.php
+++ b/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/Api/SettingsController.php
@@ -41,31 +41,30 @@ class SettingsController extends ApiControllerBase
public function getAction()
{
// define list of configurable settings
- $result = array();
- if ($this->request->isGet()) {
- $mdl = new ARPscanner();
- $result['arpscanner'] = $mdl->getNodes();
- // returns: {"arpscanner":{"general":{"interface":
- // {"lan":{"value":"lan","selected":1}},"networks":
- // {"10.0.1.0\/24":{"value":"10.0.1.0\/24","selected":1}}}}}
-
- $backend = new Backend();
- $bckresult = trim($backend->configdRun("arpscanner interfaces"));
- $ifnames = json_decode($bckresult);
-
- $result['arpscanner']['general']['interface'] = array();
-
- if (is_array($ifnames) || is_object($ifnames))
- {
- foreach ($ifnames as &$arr) {
- $ifname = $arr[0];
- $result['arpscanner']['general']['interface'][$ifname] = array();
- $result['arpscanner']['general']['interface'][$ifname]['value'] = join(", ", array($ifname, " (".$arr[2].")") );
+ $result = array();
+ if ($this->request->isGet()) {
+ $mdl = new ARPscanner();
+ $result['arpscanner'] = $mdl->getNodes();
+ // returns: {"arpscanner":{"general":{"interface":
+ // {"lan":{"value":"lan","selected":1}},"networks":
+ // {"10.0.1.0\/24":{"value":"10.0.1.0\/24","selected":1}}}}}
+
+ $backend = new Backend();
+ $bckresult = trim($backend->configdRun("arpscanner interfaces"));
+ $ifnames = json_decode($bckresult);
+
+ $result['arpscanner']['general']['interface'] = array();
+
+ if (is_array($ifnames) || is_object($ifnames)) {
+ foreach ($ifnames as &$arr) {
+ $ifname = $arr[0];
+ $result['arpscanner']['general']['interface'][$ifname] = array();
+ $result['arpscanner']['general']['interface'][$ifname]['value'] = join(", ", array($ifname, " (".$arr[2].")"));
+ }
}
+ // $result['arpscanner']['general']['networks'] = '192.168.1.0/24,172.16.45.0/25';
}
- // $result['arpscanner']['general']['networks'] = '192.168.1.0/24,172.16.45.0/25';
- }
- return $result;
+ return $result;
}
/**
@@ -79,7 +78,7 @@ class SettingsController extends ApiControllerBase
// load model and update with provided data
$mdl = new ARPscanner();
$mdl->setNodes($this->request->getPost("arpscanner"));
-
+
// perform validation
$valMsgs = $mdl->performValidation();
foreach ($valMsgs as $field => $msg) {
@@ -88,7 +87,7 @@ class SettingsController extends ApiControllerBase
}
$result["validations"]["general.".$msg->getField()] = $msg->getMessage();
}
-
+
// serialize model to config and save
if ($valMsgs->count() == 0) {
$mdl->serializeToConfig();
@@ -98,6 +97,4 @@ class SettingsController extends ApiControllerBase
}
return $result;
}
-
-
}
diff --git a/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/IndexController.php b/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/IndexController.php
index ec5c9f438..275fbc9e3 100644
--- a/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/IndexController.php
+++ b/net/arp-scan/src/opnsense/mvc/app/controllers/OPNsense/ARPscanner/IndexController.php
@@ -45,7 +45,7 @@ class IndexController extends \OPNsense\Base\IndexController
$this->view->title = gettext('ARP Scan');
$this->view->general = $this->getForm("general");
$this->view->pick('OPNsense/ARPscanner/index');
-
+
$this->view->generalForm = $this->getForm("general");
}
}
diff --git a/net/arp-scan/src/opnsense/mvc/app/models/OPNsense/ARPscanner/ARPscanner.php b/net/arp-scan/src/opnsense/mvc/app/models/OPNsense/ARPscanner/ARPscanner.php
index dc22b94eb..9448a28d7 100644
--- a/net/arp-scan/src/opnsense/mvc/app/models/OPNsense/ARPscanner/ARPscanner.php
+++ b/net/arp-scan/src/opnsense/mvc/app/models/OPNsense/ARPscanner/ARPscanner.php
@@ -34,7 +34,8 @@ use OPNsense\Base\BaseModel;
class ARPscanner extends BaseModel
{
- public function test(){
+ public function test()
+ {
$command="/sbin/ifconfig -l -u";
exec($command, $output);
return $output;
diff --git a/net/arp-scan/src/opnsense/mvc/app/views/OPNsense/ARPscanner/index.volt b/net/arp-scan/src/opnsense/mvc/app/views/OPNsense/ARPscanner/index.volt
index 1b3a3b30a..ef95c9cba 100644
--- a/net/arp-scan/src/opnsense/mvc/app/views/OPNsense/ARPscanner/index.volt
+++ b/net/arp-scan/src/opnsense/mvc/app/views/OPNsense/ARPscanner/index.volt
@@ -28,11 +28,11 @@ POSSIBILITY OF SUCH DAMAGE.