mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Add modules to repository
This commit is contained in:
309
Deauth/api/module.php
Normal file
309
Deauth/api/module.php
Normal file
@@ -0,0 +1,309 @@
|
||||
<?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 Deauth extends Module
|
||||
{
|
||||
public function route()
|
||||
{
|
||||
switch ($this->request->action) {
|
||||
case 'refreshInfo':
|
||||
$this->refreshInfo();
|
||||
break;
|
||||
case 'refreshOutput':
|
||||
$this->refreshOutput();
|
||||
break;
|
||||
case 'refreshStatus':
|
||||
$this->refreshStatus();
|
||||
break;
|
||||
case 'togglemdk3':
|
||||
$this->togglemdk3();
|
||||
break;
|
||||
case 'handleDependencies':
|
||||
$this->handleDependencies();
|
||||
break;
|
||||
case 'handleDependenciesStatus':
|
||||
$this->handleDependenciesStatus();
|
||||
break;
|
||||
case 'getInterfaces':
|
||||
$this->getInterfaces();
|
||||
break;
|
||||
case 'scanForNetworks':
|
||||
$this->scanForNetworks();
|
||||
break;
|
||||
case 'getSettings':
|
||||
$this->getSettings();
|
||||
break;
|
||||
case 'setSettings':
|
||||
$this->setSettings();
|
||||
break;
|
||||
case 'saveAutostartSettings':
|
||||
$this->saveAutostartSettings();
|
||||
break;
|
||||
case 'togglemdk3OnBoot':
|
||||
$this->togglemdk3OnBoot();
|
||||
break;
|
||||
case 'getListsData':
|
||||
$this->getListsData();
|
||||
break;
|
||||
case 'saveListsData':
|
||||
$this->saveListsData();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkDependency($dependencyName)
|
||||
{
|
||||
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("deauth.module.installed")));
|
||||
}
|
||||
|
||||
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/Deauth/module.info"));
|
||||
$this->response = array('title' => $moduleInfo->title, 'version' => $moduleInfo->version);
|
||||
}
|
||||
|
||||
private function handleDependencies()
|
||||
{
|
||||
if(!$this->checkDependency("mdk3"))
|
||||
{
|
||||
$this->execBackground("/pineapple/modules/Deauth/scripts/dependencies.sh install ".$this->request->destination);
|
||||
$this->response = array('success' => true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->execBackground("/pineapple/modules/Deauth/scripts/dependencies.sh remove");
|
||||
$this->response = array('success' => true);
|
||||
}
|
||||
}
|
||||
|
||||
private function togglemdk3OnBoot()
|
||||
{
|
||||
if(exec("cat /etc/rc.local | grep Deauth/scripts/autostart_deauth.sh") == "")
|
||||
{
|
||||
exec("sed -i '/exit 0/d' /etc/rc.local");
|
||||
exec("echo /pineapple/modules/Deauth/scripts/autostart_deauth.sh >> /etc/rc.local");
|
||||
exec("echo exit 0 >> /etc/rc.local");
|
||||
}
|
||||
else
|
||||
{
|
||||
exec("sed -i '/Deauth\/scripts\/autostart_deauth.sh/d' /etc/rc.local");
|
||||
}
|
||||
}
|
||||
|
||||
private function handleDependenciesStatus()
|
||||
{
|
||||
if (!file_exists('/tmp/Deauth.progress'))
|
||||
{
|
||||
$this->response = array('success' => true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response = array('success' => false);
|
||||
}
|
||||
}
|
||||
|
||||
private function togglemdk3()
|
||||
{
|
||||
if(!$this->checkRunning("mdk3"))
|
||||
{
|
||||
$this->uciSet("deauth.run.interface", $this->request->interface);
|
||||
|
||||
$this->execBackground("/pineapple/modules/Deauth/scripts/deauth.sh start");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->uciSet("deauth.run.interface", '');
|
||||
|
||||
$this->execBackground("/pineapple/modules/Deauth/scripts/deauth.sh stop");
|
||||
}
|
||||
}
|
||||
|
||||
private function refreshStatus()
|
||||
{
|
||||
if (!file_exists('/tmp/Deauth.progress'))
|
||||
{
|
||||
if (!$this->checkDependency("mdk3"))
|
||||
{
|
||||
$installed = false;
|
||||
$install = "Not installed";
|
||||
$installLabel = "danger";
|
||||
$processing = false;
|
||||
|
||||
$status = "Start";
|
||||
$statusLabel = "success";
|
||||
|
||||
$bootLabelON = "default";
|
||||
$bootLabelOFF = "danger";
|
||||
}
|
||||
else
|
||||
{
|
||||
$installed = true;
|
||||
$install = "Installed";
|
||||
$installLabel = "success";
|
||||
$processing = false;
|
||||
|
||||
if ($this->checkRunning("mdk3"))
|
||||
{
|
||||
$status = "Stop";
|
||||
$statusLabel = "danger";
|
||||
}
|
||||
else
|
||||
{
|
||||
$status = "Start";
|
||||
$statusLabel = "success";
|
||||
}
|
||||
|
||||
if(exec("cat /etc/rc.local | grep Deauth/scripts/autostart_deauth.sh") == "")
|
||||
{
|
||||
$bootLabelON = "default";
|
||||
$bootLabelOFF = "danger";
|
||||
}
|
||||
else
|
||||
{
|
||||
$bootLabelON = "success";
|
||||
$bootLabelOFF = "default";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$installed = false;
|
||||
$install = "Installing...";
|
||||
$installLabel = "warning";
|
||||
$processing = true;
|
||||
|
||||
$status = "Start";
|
||||
$statusLabel = "success";
|
||||
|
||||
$bootLabelON = "default";
|
||||
$bootLabelOFF = "danger";
|
||||
}
|
||||
|
||||
$device = $this->getDevice();
|
||||
$sdAvailable = $this->isSDAvailable();
|
||||
|
||||
$this->response = array("device" => $device, "sdAvailable" => $sdAvailable, "status" => $status, "statusLabel" => $statusLabel, "installed" => $installed, "install" => $install, "installLabel" => $installLabel, "bootLabelON" => $bootLabelON, "bootLabelOFF" => $bootLabelOFF, "processing" => $processing);
|
||||
}
|
||||
|
||||
private function refreshOutput()
|
||||
{
|
||||
if ($this->checkDependency("mdk3"))
|
||||
{
|
||||
if ($this->checkRunning("mdk3"))
|
||||
{
|
||||
exec ("cat /tmp/deauth.log", $output);
|
||||
if(!empty($output))
|
||||
$this->response = implode("\n", array_reverse($output));
|
||||
else
|
||||
$this->response = "Empty log...";
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response = "Deauth is not running...";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response = "mdk3 is not installed...";
|
||||
}
|
||||
}
|
||||
|
||||
private function getInterfaces()
|
||||
{
|
||||
exec("iwconfig 2> /dev/null | grep \"wlan*\" | awk '{print $1}'", $interfaceArray);
|
||||
|
||||
$this->response = array("interfaces" => $interfaceArray, "selected" => $this->uciGet("deauth.run.interface"));
|
||||
}
|
||||
|
||||
private function scanForNetworks()
|
||||
{
|
||||
$interface = escapeshellarg($this->request->interface);
|
||||
if (substr($interface, -4, -1) === "mon") {
|
||||
if ($interface == "'wlan1mon'") {
|
||||
exec("killall pineap");
|
||||
exec("killall pinejector");
|
||||
}
|
||||
exec("airmon-ng stop {$interface}");
|
||||
$interface = substr($interface, 0, -4) . "'";
|
||||
exec("iw dev {$interface} scan &> /dev/null");
|
||||
}
|
||||
exec("iwinfo {$interface} scan", $apScan);
|
||||
|
||||
$apArray = preg_split("/^Cell/m", implode("\n", $apScan));
|
||||
$returnArray = array();
|
||||
foreach ($apArray as $apData) {
|
||||
$apData = explode("\n", $apData);
|
||||
$accessPoint = array();
|
||||
$accessPoint['mac'] = substr($apData[0], -17);
|
||||
$accessPoint['ssid'] = substr(trim($apData[1]), 8, -1);
|
||||
if (mb_detect_encoding($accessPoint['ssid'], "auto") === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$accessPoint['channel'] = intval(substr(trim($apData[2]), -2));
|
||||
|
||||
$signalString = explode(" ", trim($apData[3]));
|
||||
$accessPoint['signal'] = substr($signalString[0], 8);
|
||||
$accessPoint['quality'] = substr($signalString[1], 9);
|
||||
|
||||
$security = substr(trim($apData[4]), 12);
|
||||
if ($security === "none") {
|
||||
$accessPoint['security'] = "Open";
|
||||
} else {
|
||||
$accessPoint['security'] = $security;
|
||||
}
|
||||
|
||||
if ($accessPoint['mac'] && trim($apData[1]) !== "ESSID: unknown") {
|
||||
array_push($returnArray, $accessPoint);
|
||||
}
|
||||
}
|
||||
$this->response = $returnArray;
|
||||
}
|
||||
|
||||
private function getSettings()
|
||||
{
|
||||
$settings = array(
|
||||
'speed' => $this->uciGet("deauth.settings.speed"),
|
||||
'channels' => $this->uciGet("deauth.settings.channels"),
|
||||
'mode' => $this->uciGet("deauth.settings.mode")
|
||||
);
|
||||
$this->response = array('settings' => $settings);
|
||||
}
|
||||
|
||||
private function setSettings()
|
||||
{
|
||||
$settings = $this->request->settings;
|
||||
$this->uciSet("deauth.settings.speed", $settings->speed);
|
||||
$this->uciSet("deauth.settings.channels", $settings->channels);
|
||||
$this->uciSet("deauth.settings.mode", $settings->mode);
|
||||
}
|
||||
|
||||
private function saveAutostartSettings()
|
||||
{
|
||||
$settings = $this->request->settings;
|
||||
$this->uciSet("deauth.autostart.interface", $settings->interface);
|
||||
}
|
||||
|
||||
private function getListsData()
|
||||
{
|
||||
$blacklistData = file_get_contents('/pineapple/modules/Deauth/lists/blacklist.lst');
|
||||
$whitelistData = file_get_contents('/pineapple/modules/Deauth/lists/whitelist.lst');
|
||||
$this->response = array("blacklistData" => $blacklistData, "whitelistData" => $whitelistData );
|
||||
}
|
||||
|
||||
private function saveListsData()
|
||||
{
|
||||
$filename = '/pineapple/modules/Deauth/lists/blacklist.lst';
|
||||
file_put_contents($filename, $this->request->blacklistData);
|
||||
|
||||
$filename = '/pineapple/modules/Deauth/lists/whitelist.lst';
|
||||
file_put_contents($filename, $this->request->whitelistData);
|
||||
}
|
||||
|
||||
}
|
||||
375
Deauth/js/module.js
Normal file
375
Deauth/js/module.js
Normal file
@@ -0,0 +1,375 @@
|
||||
registerController('Deauth_Controller', ['$api', '$scope', '$rootScope', '$interval', '$timeout', function($api, $scope, $rootScope, $interval, $timeout) {
|
||||
$scope.title = "Loading...";
|
||||
$scope.version = "Loading...";
|
||||
|
||||
$scope.refreshInfo = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: "refreshInfo"
|
||||
}, function(response) {
|
||||
$scope.title = response.title;
|
||||
$scope.version = "v"+response.version;
|
||||
})
|
||||
});
|
||||
|
||||
$scope.refreshInfo();
|
||||
|
||||
}]);
|
||||
|
||||
registerController('Deauth_ControlsController', ['$api', '$scope', '$rootScope', '$interval', '$timeout', function($api, $scope, $rootScope, $interval, $timeout) {
|
||||
$scope.status = "Loading...";
|
||||
$scope.statusLabel = "default";
|
||||
$scope.starting = false;
|
||||
|
||||
$scope.install = "Loading...";
|
||||
$scope.installLabel = "default";
|
||||
$scope.processing = false;
|
||||
|
||||
$scope.bootLabelON = "default";
|
||||
$scope.bootLabelOFF = "default";
|
||||
|
||||
$scope.interfaces = [];
|
||||
$scope.selectedInterface = "--";
|
||||
|
||||
$scope.saveSettingsLabel = "default";
|
||||
|
||||
$scope.device = '';
|
||||
$scope.sdAvailable = false;
|
||||
|
||||
$rootScope.status = {
|
||||
installed : false,
|
||||
refreshOutput : false
|
||||
};
|
||||
|
||||
$scope.refreshStatus = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: "refreshStatus"
|
||||
}, function(response) {
|
||||
$scope.status = response.status;
|
||||
$scope.statusLabel = response.statusLabel;
|
||||
|
||||
$rootScope.status.installed = response.installed;
|
||||
$scope.device = response.device;
|
||||
$scope.sdAvailable = response.sdAvailable;
|
||||
if(response.processing) $scope.processing = true;
|
||||
$scope.install = response.install;
|
||||
$scope.installLabel = response.installLabel;
|
||||
|
||||
$scope.bootLabelON = response.bootLabelON;
|
||||
$scope.bootLabelOFF = response.bootLabelOFF;
|
||||
})
|
||||
});
|
||||
|
||||
$scope.togglemdk3 = (function() {
|
||||
if($scope.status != "Stop")
|
||||
$scope.status = "Starting...";
|
||||
else
|
||||
$scope.status = "Stopping...";
|
||||
|
||||
$scope.statusLabel = "warning";
|
||||
$scope.starting = true;
|
||||
|
||||
$rootScope.status.refreshOutput = false;
|
||||
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'togglemdk3',
|
||||
interface: $scope.selectedInterface
|
||||
}, function(response) {
|
||||
$timeout(function(){
|
||||
$rootScope.status.refreshOutput = true;
|
||||
|
||||
$scope.starting = false;
|
||||
$scope.refreshStatus();
|
||||
$scope.getInterfaces();
|
||||
|
||||
}, 3000);
|
||||
})
|
||||
});
|
||||
|
||||
$scope.saveAutostartSettings = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'saveAutostartSettings',
|
||||
settings: { interface : $scope.selectedInterface }
|
||||
}, function(response) {
|
||||
$scope.saveSettingsLabel = "success";
|
||||
$timeout(function(){
|
||||
$scope.saveSettingsLabel = "default";
|
||||
}, 2000);
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$scope.togglemdk3OnBoot = (function() {
|
||||
if($scope.bootLabelON == "default")
|
||||
{
|
||||
$scope.bootLabelON = "success";
|
||||
$scope.bootLabelOFF = "default";
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope.bootLabelON = "default";
|
||||
$scope.bootLabelOFF = "danger";
|
||||
}
|
||||
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'togglemdk3OnBoot',
|
||||
}, function(response) {
|
||||
$scope.refreshStatus();
|
||||
})
|
||||
});
|
||||
|
||||
$scope.handleDependencies = (function(param) {
|
||||
if(!$rootScope.status.installed)
|
||||
$scope.install = "Installing...";
|
||||
else
|
||||
$scope.install = "Removing...";
|
||||
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'handleDependencies',
|
||||
destination: param
|
||||
}, function(response){
|
||||
if (response.success === true) {
|
||||
$scope.installLabel = "warning";
|
||||
$scope.processing = true;
|
||||
|
||||
$scope.handleDependenciesInterval = $interval(function(){
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'handleDependenciesStatus'
|
||||
}, function(response) {
|
||||
if (response.success === true){
|
||||
$scope.processing = false;
|
||||
$interval.cancel($scope.handleDependenciesInterval);
|
||||
$scope.refreshStatus();
|
||||
}
|
||||
});
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$scope.getInterfaces = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'getInterfaces'
|
||||
}, function(response) {
|
||||
$scope.interfaces = response.interfaces;
|
||||
if(response.selected != "")
|
||||
$scope.selectedInterface = response.selected;
|
||||
else
|
||||
$scope.selectedInterface = $scope.interfaces[0];
|
||||
});
|
||||
});
|
||||
|
||||
$scope.refreshStatus();
|
||||
$scope.getInterfaces();
|
||||
|
||||
}]);
|
||||
|
||||
registerController('Deauth_OutputController', ['$api', '$scope', '$rootScope', '$interval', function($api, $scope, $rootScope, $interval) {
|
||||
$scope.output = 'Loading...';
|
||||
$scope.filter = '';
|
||||
|
||||
$scope.refreshLabelON = "default";
|
||||
$scope.refreshLabelOFF = "danger";
|
||||
|
||||
$scope.refreshOutput = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: "refreshOutput"
|
||||
}, function(response) {
|
||||
$scope.output = response;
|
||||
})
|
||||
});
|
||||
|
||||
$scope.toggleAutoRefresh = (function() {
|
||||
if($scope.autoRefreshInterval)
|
||||
{
|
||||
$interval.cancel($scope.autoRefreshInterval);
|
||||
$scope.autoRefreshInterval = null;
|
||||
$scope.refreshLabelON = "default";
|
||||
$scope.refreshLabelOFF = "danger";
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope.refreshLabelON = "success";
|
||||
$scope.refreshLabelOFF = "default";
|
||||
|
||||
$scope.autoRefreshInterval = $interval(function(){
|
||||
$scope.refreshOutput();
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
|
||||
$scope.refreshOutput();
|
||||
|
||||
$rootScope.$watch('status.refreshOutput', function(param) {
|
||||
if(param) {
|
||||
$scope.refreshOutput();
|
||||
}
|
||||
});
|
||||
|
||||
}]);
|
||||
|
||||
registerController('Deauth_EditorController', ['$api', '$scope', '$rootScope', '$timeout', function($api, $scope, $rootScope, $timeout) {
|
||||
$scope.accessPoints = [];
|
||||
$scope.selectedAP = {};
|
||||
|
||||
$scope.scanLabel = "default";
|
||||
$scope.scan = "Scan";
|
||||
$scope.scanning = false;
|
||||
|
||||
$scope.saveListsLabel = "primary";
|
||||
$scope.saveLists = "Save";
|
||||
$scope.saving = false;
|
||||
|
||||
$scope.blacklistData = '';
|
||||
$scope.whitelistData = '';
|
||||
|
||||
$scope.clearWhitelist = (function() {
|
||||
$scope.whitelistData = '';
|
||||
});
|
||||
|
||||
$scope.clearBlacklist = (function() {
|
||||
$scope.blacklistData = '';
|
||||
});
|
||||
|
||||
$scope.getListsData = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'getListsData'
|
||||
}, function(response) {
|
||||
$scope.blacklistData = response.blacklistData;
|
||||
$scope.whitelistData = response.whitelistData;
|
||||
});
|
||||
});
|
||||
|
||||
$scope.saveListsData = (function() {
|
||||
$scope.saveListsLabel = "warning";
|
||||
$scope.saveLists = "Saving...";
|
||||
$scope.saving = true;
|
||||
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'saveListsData',
|
||||
blacklistData: $scope.blacklistData,
|
||||
whitelistData: $scope.whitelistData
|
||||
}, function(response) {
|
||||
$scope.saveListsLabel = "success";
|
||||
$scope.saveLists = "Saved";
|
||||
|
||||
$timeout(function(){
|
||||
$scope.saveListsLabel = "primary";
|
||||
$scope.saveLists = "Save";
|
||||
$scope.saving = false;
|
||||
}, 2000);
|
||||
});
|
||||
});
|
||||
|
||||
$scope.addWhitelist = (function() {
|
||||
if($scope.whitelistData != "")
|
||||
$scope.whitelistData = $scope.whitelistData + '\n' + '# ' + $scope.selectedAP.ssid + '\n' + $scope.selectedAP.mac;
|
||||
else
|
||||
$scope.whitelistData = '# ' + $scope.selectedAP.ssid + '\n' + $scope.selectedAP.mac;
|
||||
});
|
||||
|
||||
$scope.addBlacklist = (function() {
|
||||
if($scope.blacklistData != "")
|
||||
$scope.blacklistData = $scope.blacklistData + '\n' + '# ' + $scope.selectedAP.ssid + '\n' + $scope.selectedAP.mac;
|
||||
else
|
||||
$scope.blacklistData = '# ' + $scope.selectedAP.ssid + '\n' + $scope.selectedAP.mac;
|
||||
});
|
||||
|
||||
$scope.scanForNetworks = (function() {
|
||||
$scope.scanLabel = "warning";
|
||||
$scope.scan = "Scanning...";
|
||||
$scope.scanning = true;
|
||||
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'scanForNetworks',
|
||||
interface: $scope.selectedInterface
|
||||
}, function(response) {
|
||||
$scope.scanLabel = "success";
|
||||
$scope.scan = "Done";
|
||||
|
||||
$timeout(function(){
|
||||
$scope.scanLabel = "default";
|
||||
$scope.scan = "Scan";
|
||||
$scope.scanning = false;
|
||||
}, 2000);
|
||||
|
||||
$scope.accessPoints = response;
|
||||
$scope.selectedAP = $scope.accessPoints[0];
|
||||
});
|
||||
});
|
||||
|
||||
$scope.getInterfaces = (function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'getInterfaces'
|
||||
}, function(response) {
|
||||
$scope.interfaces = response.interfaces;
|
||||
if(response.selected != "")
|
||||
$scope.selectedInterface = response.selected;
|
||||
else
|
||||
$scope.selectedInterface = $scope.interfaces[0];
|
||||
});
|
||||
});
|
||||
|
||||
$scope.getInterfaces();
|
||||
$scope.getListsData();
|
||||
|
||||
}]);
|
||||
|
||||
registerController('Deauth_SettingsController', ['$api', '$scope', '$rootScope', '$timeout', function($api, $scope, $rootScope, $timeout) {
|
||||
$scope.settings = {
|
||||
speed : "",
|
||||
channels : "",
|
||||
mode : "whitelist"
|
||||
};
|
||||
|
||||
$scope.saveSettingsLabel = "primary";
|
||||
$scope.saveSettings = "Save";
|
||||
$scope.saving = false;
|
||||
|
||||
$scope.getSettings = function() {
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'getSettings'
|
||||
}, function(response) {
|
||||
$scope.settings = response.settings;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.setSettings = function() {
|
||||
$scope.saveSettingsLabel = "warning";
|
||||
$scope.saveSettings = "Saving...";
|
||||
$scope.saving = true;
|
||||
|
||||
$api.request({
|
||||
module: 'Deauth',
|
||||
action: 'setSettings',
|
||||
settings: $scope.settings
|
||||
}, function(response) {
|
||||
$scope.getSettings();
|
||||
|
||||
$scope.saveSettingsLabel = "success";
|
||||
$scope.saveSettings = "Saved";
|
||||
|
||||
$timeout(function(){
|
||||
$scope.saveSettingsLabel = "primary";
|
||||
$scope.saveSettings = "Save";
|
||||
$scope.saving = false;
|
||||
}, 2000);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getSettings();
|
||||
|
||||
}]);
|
||||
0
Deauth/lists/blacklist.lst
Normal file
0
Deauth/lists/blacklist.lst
Normal file
0
Deauth/lists/whitelist.lst
Normal file
0
Deauth/lists/whitelist.lst
Normal file
232
Deauth/module.html
Normal file
232
Deauth/module.html
Normal file
@@ -0,0 +1,232 @@
|
||||
<div class="panel panel-default" ng-controller="Deauth_Controller"><div class="panel-heading"><h4 class="panel-title pull-left">{{title}}</h4><span class="pull-right">{{version}}</span><div class="clearfix"></div></div></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default" ng-controller="Deauth_ControlsController">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
Controls
|
||||
<span class="dropdown">
|
||||
<ul class="dropdown-menu" aria-labelledby="poolDropdown">
|
||||
<li ng-click="saveAutostartSettings()"><a>Save settings for start on boot</a></li>
|
||||
</ul>
|
||||
<button class="btn btn-xs btn-{{saveSettingsLabel}} dropdown-toggle" type="button" id="poolDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td style="padding-bottom: .5em;" class="text-muted">Dependencies</td>
|
||||
<td ng-hide="$root.status.installed" style="text-align:right;padding-bottom: .5em;"><button type="button" style="width: 90px;" class="btn btn-{{installLabel}} btn-xs" data-toggle="modal" data-target="#dependenciesInstallModal" ng-disabled="processing">{{install}}</button></td>
|
||||
<td ng-show="$root.status.installed" style="text-align:right;padding-bottom: .5em;"><button type="button" style="width: 90px;" class="btn btn-{{installLabel}} btn-xs" data-toggle="modal" data-target="#dependenciesRemoveModal" ng-disabled="processing">{{install}}</button></td>
|
||||
</tr>
|
||||
<tr class="form-inline" ng-show="$root.status.installed">
|
||||
<td style="padding-bottom: .5em;" class="text-muted">mdk3</td>
|
||||
<td style="text-align:right;padding-bottom: .5em;">
|
||||
<select class="form-control input-sm" ng-disabled="starting || status == 'Stop'" ng-model="selectedInterface">
|
||||
<option ng-repeat="interface in interfaces">{{ interface }}</option>
|
||||
</select>
|
||||
<button type="button" style="width: 90px;" class="btn btn-{{statusLabel}} btn-xs" ng-disabled="starting" ng-click="togglemdk3()">{{status}}</button></td>
|
||||
</tr>
|
||||
<tr ng-show="$root.status.installed">
|
||||
<td style="padding-bottom: .5em;" class="text-muted">Start on boot</td>
|
||||
<td style="text-align:right;padding-bottom: .5em;">
|
||||
<div class="btn-group">
|
||||
<button ng-click="togglemdk3OnBoot()" class="btn btn-xs btn-{{bootLabelON}}">ON</button>
|
||||
<button ng-click="togglemdk3OnBoot()" class="btn btn-xs btn-{{bootLabelOFF}}">OFF</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="dependenciesInstallModal" tabindex="-1" role="dialog" aria-labelledby="dependenciesModalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="dependenciesInstallModalLabel">Install dependencies</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
All required dependencies have to be installed first. This may take a few minutes.<br /><br />
|
||||
Please wait, do not leave or refresh this page. Once the install is complete, this page will refresh automatically.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" ng-click="handleDependencies('internal')" data-dismiss="modal">Internal</button>
|
||||
<button type="button" class="btn btn-info" ng-hide="device == 'tetra' || sdAvailable == false" ng-click="handleDependencies('sd')" data-dismiss="modal">SD Card</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="dependenciesRemoveModal" tabindex="-1" role="dialog" aria-labelledby="dependenciesModalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="dependenciesRemoveModalLabel">Remove dependencies</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
All required dependencies will be removed. This may take a few minutes.<br /><br />
|
||||
Please wait, do not leave or refresh this page. Once the remove is complete, this page will refresh automatically.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-info" ng-click="handleDependencies()" data-dismiss="modal">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="Deauth_SettingsController">
|
||||
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Settings">
|
||||
<h4 class="panel-title">Settings</h4>
|
||||
</div>
|
||||
<div id="Settings" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-{{saveSettingsLabel}} btn-sm" ng-disabled="saving" ng-click="setSettings()">{{saveSettings}}</button>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-sm">Mode</span>
|
||||
<select ng-model="settings.mode" class="form-control input-sm">
|
||||
<option>normal</option>
|
||||
<option>whitelist</option>
|
||||
<option>blacklist</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-sm">Speed</span>
|
||||
<input type="text" class="form-control input-sm" ng-model="settings.speed" placeholder="Speed in packets per second">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-sm">Channels</span>
|
||||
<input type="text" class="form-control input-sm" ng-model="settings.channels" placeholder="Channels">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="Deauth_EditorController">
|
||||
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Editor">
|
||||
<h4 class="panel-title">Editor</h4>
|
||||
</div>
|
||||
<div id="Editor" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<select class="form-control input-sm" ng-model="selectedInterface">
|
||||
<option ng-repeat="interface in interfaces">{{ interface }}</option>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-{{scanLabel}} btn-sm" ng-disabled="scanning" ng-click="scanForNetworks()">{{scan}}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<select class="form-control input-sm" ng-disabled="accessPoints.length === 0" ng-options="ap.ssid for ap in accessPoints track by ap.mac" ng-model="selectedAP"></select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="button" ng-disabled="accessPoints.length === 0 || selectedAP == '--'" ng-click="addWhitelist()">Add to Whitelist</button>
|
||||
<button class="btn btn-default btn-sm" type="button" ng-disabled="accessPoints.length === 0 || selectedAP == '--'" ng-click="addBlacklist()">Add to Blacklist</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group pull-right">
|
||||
<button type="submit" class="btn btn-{{saveListsLabel}} btn-sm pull-right" ng-disabled="saving" ng-click="saveListsData()">{{saveLists}}</button>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
Whitelist
|
||||
<span class="dropdown">
|
||||
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="poolDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="poolDropdown">
|
||||
<li ng-click="clearWhitelist()"><a>Clear</a></li>
|
||||
</ul>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<textarea class="form-control" rows="15" ng-model="whitelistData"></textarea>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
Blacklist
|
||||
<span class="dropdown">
|
||||
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="poolDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="poolDropdown">
|
||||
<li ng-click="clearBlacklist()"><a>Clear</a></li>
|
||||
</ul>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<textarea class="form-control" rows="15" ng-model="blacklistData"></textarea>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="Deauth_OutputController">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title pull-left">Output</h4>
|
||||
<div class="pull-right">
|
||||
Auto-refresh <div class="btn-group">
|
||||
<button ng-click="toggleAutoRefresh()" class="btn btn-xs btn-{{refreshLabelON}}">ON</button>
|
||||
<button ng-click="toggleAutoRefresh()" class="btn btn-xs btn-{{refreshLabelOFF}}">OFF</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<button class="btn btn-primary btn-sm pull-right" ng-click="refreshOutput()">Refresh Log</button><div class="clearfix"></div>
|
||||
<pre class="scrollable-pre log-pre">{{output}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
10
Deauth/module.info
Normal file
10
Deauth/module.info
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Whistle Master",
|
||||
"description": "Deauthentication attacks of all devices connected to APs nearby",
|
||||
"devices": [
|
||||
"nano",
|
||||
"tetra"
|
||||
],
|
||||
"title": "Deauth",
|
||||
"version": "1.4"
|
||||
}
|
||||
99
Deauth/scripts/autostart_deauth.sh
Executable file
99
Deauth/scripts/autostart_deauth.sh
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/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
|
||||
|
||||
LOG=/tmp/deauth.log
|
||||
MYPATH='/pineapple/modules/Deauth/'
|
||||
|
||||
MYMONITOR=''
|
||||
MYINTERFACE=`uci get deauth.autostart.interface`
|
||||
|
||||
SPEED=`uci get deauth.settings.speed`
|
||||
CHANNEL=`uci get deauth.settings.channel`
|
||||
MODE=`uci get deauth.settings.mode`
|
||||
|
||||
WHITELIST=${MYPATH}lists/whitelist.lst
|
||||
TMPWHITELIST=${MYPATH}lists/whitelist.tmp
|
||||
BLACKLIST=${MYPATH}lists/blacklist.lst
|
||||
TMPBLACKLIST=${MYPATH}lists/blacklist.tmp
|
||||
|
||||
killall -9 mkd3
|
||||
rm ${TMPBLACKLIST}
|
||||
rm ${TMPWHITELIST}
|
||||
rm ${LOG}
|
||||
|
||||
echo -e "Starting Deauth..." > ${LOG}
|
||||
|
||||
if [ -z "$MYINTERFACE" ]; then
|
||||
MYINTERFACE=`iwconfig 2> /dev/null | grep "Mode:Master" | awk '{print $1}' | head -1`
|
||||
else
|
||||
MYFLAG=`iwconfig 2> /dev/null | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
|
||||
if [ -z "$MYFLAG" ]; then
|
||||
MYINTERFACE=`iwconfig 2> /dev/null | grep "Mode:Master" | awk '{print $1}' | head -1`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$MYMONITOR" ]; then
|
||||
MYMONITOR=`iwconfig 2> /dev/null | grep "Mode:Monitor" | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
|
||||
MYFLAG=`iwconfig 2> /dev/null | awk '{print $1}' | grep ${MYMONITOR}`
|
||||
|
||||
if [ -z "$MYFLAG" ]; then
|
||||
airmon-ng start ${MYINTERFACE}
|
||||
MYMONITOR=`iwconfig 2> /dev/null | grep "Mode:Monitor" | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
fi
|
||||
else
|
||||
MYFLAG=`iwconfig 2> /dev/null | awk '{print $1}' | grep ${MYMONITOR}`
|
||||
|
||||
if [ -z "$MYFLAG" ]; then
|
||||
airmon-ng start ${MYINTERFACE}
|
||||
MYMONITOR=`iwconfig 2> /dev/null | grep "Mode:Monitor" | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
fi
|
||||
fi
|
||||
|
||||
grep -hv -e ^# ${WHITELIST} -e ^$ > ${TMPWHITELIST}
|
||||
grep -hv -e ^# ${BLACKLIST} -e ^$ > ${TMPBLACKLIST}
|
||||
|
||||
echo -e "Interface : ${MYINTERFACE}" >> ${LOG}
|
||||
echo -e "Monitor : ${MYMONITOR}" >> ${LOG}
|
||||
|
||||
if [ -n "$SPEED" ]; then
|
||||
echo -e "Speed : ${SPEED}" >> ${LOG}
|
||||
SPEED="-s ${SPEED}"
|
||||
else
|
||||
echo -e "Speed : default" >> ${LOG}
|
||||
SPEED=
|
||||
fi
|
||||
|
||||
if [ -n "$CHANNEL" ]; then
|
||||
echo -e "Channel : ${CHANNEL}" >> ${LOG}
|
||||
CHANNEL="-c ${CHANNEL}"
|
||||
else
|
||||
echo -e "Channel : default" >> ${LOG}
|
||||
CHANNEL=
|
||||
fi
|
||||
|
||||
ifconfig ${MYINTERFACE} down
|
||||
ifconfig ${MYINTERFACE} up
|
||||
|
||||
if [ ${MODE} == "whitelist" ]; then
|
||||
echo -e "Mode : ${MODE}" >> ${LOG}
|
||||
MODE="-w ${TMPWHITELIST}"
|
||||
elif [ ${MODE} == "blacklist" ]; then
|
||||
echo -e "Mode : ${MODE}" >> ${LOG}
|
||||
MODE="-b ${TMPBLACKLIST}"
|
||||
elif [ ${MODE} == "normal" ]; then
|
||||
echo -e "Mode : ${MODE}" >> ${LOG}
|
||||
MODE=""
|
||||
else
|
||||
echo -e "Mode : default" >> ${LOG}
|
||||
MODE=""
|
||||
fi
|
||||
|
||||
uci set deauth.run.interface=${MYMONITOR}
|
||||
uci commit deauth.run.interface
|
||||
|
||||
mdk3 ${MYMONITOR} d ${SPEED} ${CHANNEL} ${MODE} >> ${LOG} &
|
||||
108
Deauth/scripts/deauth.sh
Executable file
108
Deauth/scripts/deauth.sh
Executable file
@@ -0,0 +1,108 @@
|
||||
#!/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
|
||||
|
||||
LOG=/tmp/deauth.log
|
||||
MYPATH='/pineapple/modules/Deauth/'
|
||||
|
||||
MYMONITOR=''
|
||||
MYINTERFACE=`uci get deauth.run.interface`
|
||||
|
||||
SPEED=`uci get deauth.settings.speed`
|
||||
CHANNEL=`uci get deauth.settings.channel`
|
||||
MODE=`uci get deauth.settings.mode`
|
||||
|
||||
WHITELIST=${MYPATH}lists/whitelist.lst
|
||||
TMPWHITELIST=${MYPATH}lists/whitelist.tmp
|
||||
BLACKLIST=${MYPATH}lists/blacklist.lst
|
||||
TMPBLACKLIST=${MYPATH}lists/blacklist.tmp
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
|
||||
killall -9 mkd3
|
||||
rm ${TMPBLACKLIST}
|
||||
rm ${TMPWHITELIST}
|
||||
rm ${LOG}
|
||||
|
||||
echo -e "Starting Deauth..." > ${LOG}
|
||||
|
||||
if [ -z "$MYINTERFACE" ]; then
|
||||
MYINTERFACE=`iwconfig 2> /dev/null | grep "Mode:Master" | awk '{print $1}' | head -1`
|
||||
else
|
||||
MYFLAG=`iwconfig 2> /dev/null | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
|
||||
if [ -z "$MYFLAG" ]; then
|
||||
MYINTERFACE=`iwconfig 2> /dev/null | grep "Mode:Master" | awk '{print $1}' | head -1`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$MYMONITOR" ]; then
|
||||
MYMONITOR=`iwconfig 2> /dev/null | grep "Mode:Monitor" | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
|
||||
MYFLAG=`iwconfig 2> /dev/null | awk '{print $1}' | grep ${MYMONITOR}`
|
||||
|
||||
if [ -z "$MYFLAG" ]; then
|
||||
airmon-ng start ${MYINTERFACE}
|
||||
MYMONITOR=`iwconfig 2> /dev/null | grep "Mode:Monitor" | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
fi
|
||||
else
|
||||
MYFLAG=`iwconfig 2> /dev/null | awk '{print $1}' | grep ${MYMONITOR}`
|
||||
|
||||
if [ -z "$MYFLAG" ]; then
|
||||
airmon-ng start ${MYINTERFACE}
|
||||
MYMONITOR=`iwconfig 2> /dev/null | grep "Mode:Monitor" | awk '{print $1}' | grep ${MYINTERFACE}`
|
||||
fi
|
||||
fi
|
||||
|
||||
grep -hv -e ^# ${WHITELIST} -e ^$ > ${TMPWHITELIST}
|
||||
grep -hv -e ^# ${BLACKLIST} -e ^$ > ${TMPBLACKLIST}
|
||||
|
||||
echo -e "Interface : ${MYINTERFACE}" >> ${LOG}
|
||||
echo -e "Monitor : ${MYMONITOR}" >> ${LOG}
|
||||
|
||||
if [ -n "$SPEED" ]; then
|
||||
echo -e "Speed : ${SPEED}" >> ${LOG}
|
||||
SPEED="-s ${SPEED}"
|
||||
else
|
||||
echo -e "Speed : default" >> ${LOG}
|
||||
SPEED=
|
||||
fi
|
||||
|
||||
if [ -n "$CHANNEL" ]; then
|
||||
echo -e "Channel : ${CHANNEL}" >> ${LOG}
|
||||
CHANNEL="-c ${CHANNEL}"
|
||||
else
|
||||
echo -e "Channel : default" >> ${LOG}
|
||||
CHANNEL=
|
||||
fi
|
||||
|
||||
ifconfig ${MYINTERFACE} down
|
||||
ifconfig ${MYINTERFACE} up
|
||||
|
||||
if [ ${MODE} == "whitelist" ]; then
|
||||
echo -e "Mode : ${MODE}" >> ${LOG}
|
||||
MODE="-w ${TMPWHITELIST}"
|
||||
elif [ ${MODE} == "blacklist" ]; then
|
||||
echo -e "Mode : ${MODE}" >> ${LOG}
|
||||
MODE="-b ${TMPBLACKLIST}"
|
||||
elif [ ${MODE} == "normal" ]; then
|
||||
echo -e "Mode : ${MODE}" >> ${LOG}
|
||||
MODE=""
|
||||
else
|
||||
echo -e "Mode : default" >> ${LOG}
|
||||
MODE=""
|
||||
fi
|
||||
|
||||
uci set deauth.run.interface=${MYMONITOR}
|
||||
uci commit deauth.run.interface
|
||||
|
||||
mdk3 ${MYMONITOR} d ${SPEED} ${CHANNEL} ${MODE} >> ${LOG} &
|
||||
|
||||
elif [ "$1" = "stop" ]; then
|
||||
killall -9 mdk3
|
||||
rm ${TMPBLACKLIST}
|
||||
rm ${TMPWHITELIST}
|
||||
rm ${LOG}
|
||||
fi
|
||||
39
Deauth/scripts/dependencies.sh
Executable file
39
Deauth/scripts/dependencies.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/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
|
||||
|
||||
[[ -f /tmp/Deauth.progress ]] && {
|
||||
exit 0
|
||||
}
|
||||
|
||||
touch /tmp/Deauth.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg update
|
||||
opkg install mdk3
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg update
|
||||
opkg install mdk3 --dest sd
|
||||
fi
|
||||
|
||||
touch /etc/config/deauth
|
||||
echo "config deauth 'run'" > /etc/config/deauth
|
||||
echo "config deauth 'settings'" >> /etc/config/deauth
|
||||
echo "config deauth 'autostart'" >> /etc/config/deauth
|
||||
echo "config deauth 'module'" >> /etc/config/deauth
|
||||
|
||||
uci set deauth.settings.mode='normal'
|
||||
uci commit deauth.settings.mode
|
||||
|
||||
uci set deauth.module.installed=1
|
||||
uci commit deauth.module.installed
|
||||
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove mdk3
|
||||
rm -rf /etc/config/deauth
|
||||
fi
|
||||
|
||||
rm /tmp/Deauth.progress
|
||||
Reference in New Issue
Block a user