Module changes for 2.7.0 Release. (#90)

* DWall: Specify *plaintext* in module description.

* ettercap: Remove ettercap
pull/93/head
Marc 2020-03-12 22:13:48 +00:00 committed by GitHub
parent 7ea0c30f98
commit f1ca07b311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 3 additions and 1298 deletions

View File

@ -1,10 +1,10 @@
{
"author": "Sebkinne",
"description": "Display's HTTP URLs, Cookies, POST DATA, and images from browsing clients.",
"description": "Display's Plaintext HTTP URLs, Cookies, POST DATA, and images from browsing clients.",
"devices": [
"nano",
"tetra"
],
"title": "DWall",
"version": "1.3"
}
"version": "1.4"
}

View File

@ -1,300 +0,0 @@
<?php namespace pineapple;
class ettercap extends Module
{
public function route()
{
switch ($this->request->action) {
case 'refreshInfo':
$this->refreshInfo();
break;
case 'refreshOutput':
$this->refreshOutput();
break;
case 'clearOutput':
$this->clearOutput();
break;
case 'refreshStatus':
$this->refreshStatus();
break;
case 'toggleettercap':
$this->toggleettercap();
break;
case 'handleDependencies':
$this->handleDependencies();
break;
case 'handleDependenciesStatus':
$this->handleDependenciesStatus();
break;
case 'refreshHistory':
$this->refreshHistory();
break;
case 'viewHistory':
$this->viewHistory();
break;
case 'deleteHistory':
$this->deleteHistory();
break;
case 'downloadHistory':
$this->downloadHistory();
break;
case 'getInterfaces':
$this->getInterfaces();
break;
case 'getFilters':
$this->getFilters();
break;
case 'showFilter':
$this->showFilter();
break;
case 'deleteFilter':
$this->deleteFilter();
break;
case 'saveFilterData':
$this->saveFilterData();
break;
case 'compileFilterData':
$this->compileFilterData();
break;
}
}
protected function checkDependency($dependencyName)
{
return ($this->checkDependency($dependencyName) && ($this->uciGet("ettercap.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/ettercap/module.info"));
$this->response = array('title' => $moduleInfo->title, 'version' => $moduleInfo->version);
}
private function handleDependencies()
{
if (!$this->checkDependency("ettercap")) {
$this->execBackground("/pineapple/modules/ettercap/scripts/dependencies.sh install ".$this->request->destination);
$this->response = array('success' => true);
} else {
$this->execBackground("/pineapple/modules/ettercap/scripts/dependencies.sh remove");
$this->response = array('success' => true);
}
}
private function handleDependenciesStatus()
{
if (!file_exists('/tmp/ettercap.progress')) {
$this->response = array('success' => true);
} else {
$this->response = array('success' => false);
}
}
private function toggleettercap()
{
if (!$this->checkRunning("ettercap")) {
$full_cmd = $this->request->command . " -T -w /pineapple/modules/ettercap/log/log_".time().".pcap -m /pineapple/modules/ettercap/log/log_".time().".log";
shell_exec("echo -e \"{$full_cmd}\" > /tmp/ettercap.run");
$this->execBackground("/pineapple/modules/ettercap/scripts/ettercap.sh start");
} else {
$this->execBackground("/pineapple/modules/ettercap/scripts/ettercap.sh stop");
}
}
private function refreshStatus()
{
if (!file_exists('/tmp/ettercap.progress')) {
if (!$this->checkDependency("ettercap")) {
$installed = false;
$install = "Not installed";
$installLabel = "danger";
$processing = false;
$status = "Start";
$statusLabel = "success";
} else {
$installed = true;
$install = "Installed";
$installLabel = "success";
$processing = false;
if ($this->checkRunning("ettercap")) {
$status = "Stop";
$statusLabel = "danger";
} else {
$status = "Start";
$statusLabel = "success";
}
}
} else {
$installed = false;
$install = "Installing...";
$installLabel = "warning";
$processing = true;
$status = "Start";
$statusLabel = "success";
}
$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);
}
private function refreshOutput()
{
if ($this->checkDependency("ettercap")) {
if ($this->checkRunning("ettercap")) {
$path = "/pineapple/modules/ettercap/log";
$latest_ctime = 0;
$latest_filename = '';
$d = dir($path);
while (false !== ($entry = $d->read())) {
$filepath = "{$path}/{$entry}";
if (is_file($filepath) && filectime($filepath) > $latest_ctime && substr_compare($filepath, ".log", -4, 4) == 0) {
$latest_ctime = filectime($filepath);
$latest_filename = $entry;
}
}
if ($latest_filename != "") {
$log_date = gmdate("F d Y H:i:s", filemtime("/pineapple/modules/ettercap/log/".$latest_filename));
if ($this->request->filter != "") {
$filter = $this->request->filter;
$cmd = "cat /pineapple/modules/ettercap/log/".$latest_filename." | ".$filter;
} else {
$cmd = "cat /pineapple/modules/ettercap/log/".$latest_filename;
}
exec($cmd, $output);
if (!empty($output)) {
$this->response = implode("\n", array_reverse($output));
} else {
$this->response = "Empty log...";
}
}
} else {
$this->response = "ettercap is not running...";
}
} else {
$this->response = "ettercap is not installed...";
}
}
private function getInterfaces()
{
$this->response = array();
exec("cat /proc/net/dev | tail -n +3 | cut -f1 -d: | sed 's/ //g'", $interfaceArray);
foreach ($interfaceArray as $interface) {
array_push($this->response, $interface);
}
}
private function refreshHistory()
{
$this->streamFunction = function () {
$log_list = array_reverse(glob("/pineapple/modules/ettercap/log/*.pcap"));
echo '[';
for ($i=0;$i<count($log_list);$i++) {
$info = explode("_", basename($log_list[$i]));
$entryDate = gmdate('Y-m-d H-i-s', $info[1]);
$entryName = basename($log_list[$i], ".pcap");
echo json_encode(array($entryDate, $entryName.".log", $entryName.".pcap"));
if ($i!=count($log_list)-1) {
echo ',';
}
}
echo ']';
};
}
private function downloadHistory()
{
$this->response = array("download" => $this->downloadFile("/pineapple/modules/ettercap/log/".$this->request->file));
}
private function viewHistory()
{
$log_date = gmdate("F d Y H:i:s", filemtime("/pineapple/modules/ettercap/log/".$this->request->file));
exec("cat /pineapple/modules/ettercap/log/".$this->request->file, $output);
if (!empty($output)) {
$this->response = array("output" => implode("\n", $output), "date" => $log_date);
} else {
$this->response = array("output" => "Empty log...", "date" => $log_date);
}
}
private function deleteHistory()
{
$file = basename($this->request->file, ".pcap");
exec("rm -rf /pineapple/modules/ettercap/log/".$file.".*");
}
private function getFilters()
{
$this->response = array();
if ($this->request->compiled) {
$filterList = array_reverse(glob("/pineapple/modules/ettercap/filters/*.ef"));
array_push($this->response, "--");
foreach ($filterList as $filter) {
array_push($this->response, basename($filter));
}
} else {
$filterList = array_reverse(glob("/pineapple/modules/ettercap/filters/*.filter"));
array_push($this->response, "--");
foreach ($filterList as $filter) {
array_push($this->response, basename($filter));
}
}
}
private function showFilter()
{
$filterData = file_get_contents('/pineapple/modules/ettercap/filters/'.$this->request->filter);
$this->response = array("filterData" => $filterData);
}
private function deleteFilter()
{
exec("rm -rf /pineapple/modules/ettercap/filters/".basename($this->request->filter, '.filter').".*");
}
private function compileFilterData()
{
$filename = "/pineapple/modules/ettercap/filters/".$this->request->filter;
$filename_ef = "/pineapple/modules/ettercap/filters/".basename($this->request->filter, '.filter').".ef";
$cmd = "etterfilter -o ".$filename_ef." ".$filename." 2>&1";
exec($cmd, $output);
if (!empty($output)) {
$this->response = implode("\n", $output);
} else {
$this->response = "Empty log...";
}
}
private function saveFilterData()
{
$filename = "/pineapple/modules/ettercap/filters/".$this->request->filter;
file_put_contents($filename, $this->request->filterData);
}
}

View File

@ -1,11 +0,0 @@
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding", "Accept-Rubbish!");
}
}
if (ip.proto == TCP && tcp.src == 80) {
replace("img src=", "img src=\"https://hak5.org/images/logo/Hak5--727x346.png\" ");
replace("IMG SRC=", "img src=\"https://hak5.org/images/logo/Hak5--727x346.png\" ");
msg("Filter Ran.\n");
}

View File

@ -1,10 +0,0 @@
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding", "Accept-Rubbish!");
}
}
if (ip.proto == TCP && tcp.src == 80) {
replace("pineapple", "WiFi Pineapple");
msg("Filter Ran.\n");
}

View File

@ -1,17 +0,0 @@
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding", "Accept-Rubbish!");
}
if (search(DATA.data, "gzip")) {
replace("gzip", " ");
}
}
if (ip.proto == TCP && tcp.src == 80) {
replace("<title>", "<title>WiFi Pineapple<\/title><body><p><img src="https://hak5.org/images/logo/Hak5--727x346.png"></p></body>");
replace("<TITLE>", "<title>WiFi Pineapple<\/title><body><p><img src="https://hak5.org/images/logo/Hak5--727x346.png"></p></body>");
replace("</title>", " ");
replace("</TITLE>", " ");
replace("<body>", " ");
replace("<BODY>", " ");
msg("Filter Ran.\n");
}

View File

@ -1,540 +0,0 @@
registerController('ettercap_Controller', ['$api', '$scope', '$rootScope', '$interval', '$timeout', function($api, $scope, $rootScope, $interval, $timeout) {
$scope.title = "Loading...";
$scope.version = "Loading...";
$scope.refreshInfo = (function() {
$api.request({
module: 'ettercap',
action: "refreshInfo"
}, function(response) {
$scope.title = response.title;
$scope.version = "v" + response.version;
})
});
$scope.refreshInfo();
}]);
registerController('ettercap_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.device = '';
$scope.sdAvailable = false;
$rootScope.status = {
installed: false,
refreshOutput: false,
refreshHistory: false,
refreshFilters: false
};
$scope.refreshStatus = (function() {
$api.request({
module: "ettercap",
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.toggleettercap = (function() {
if ($scope.status != "Stop")
$scope.status = "Starting...";
else
$scope.status = "Stopping...";
$scope.statusLabel = "warning";
$scope.starting = true;
$rootScope.status.refreshOutput = false;
$rootScope.status.refreshHistory = false;
$api.request({
module: 'ettercap',
action: 'toggleettercap',
command: $rootScope.command
}, function(response) {
$timeout(function() {
$rootScope.status.refreshOutput = true;
$rootScope.status.refreshHistory = true;
$scope.starting = false;
$scope.refreshStatus();
}, 2000);
})
});
$scope.handleDependencies = (function(param) {
if (!$rootScope.status.installed)
$scope.install = "Installing...";
else
$scope.install = "Removing...";
$api.request({
module: 'ettercap',
action: 'handleDependencies',
destination: param
}, function(response) {
if (response.success === true) {
$scope.installLabel = "warning";
$scope.processing = true;
$scope.handleDependenciesInterval = $interval(function() {
$api.request({
module: 'ettercap',
action: 'handleDependenciesStatus'
}, function(response) {
if (response.success === true) {
$scope.processing = false;
$interval.cancel($scope.handleDependenciesInterval);
$scope.refreshStatus();
}
});
}, 5000);
}
});
});
$scope.refreshStatus();
}]);
registerController('ettercap_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: "ettercap",
action: "refreshOutput",
filter: $scope.filter
}, function(response) {
$scope.output = response;
})
});
$scope.clearFilter = (function() {
$scope.filter = '';
$scope.refreshOutput();
});
$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('ettercap_HistoryController', ['$api', '$scope', '$rootScope', function($api, $scope, $rootScope) {
$scope.history = [];
$scope.historyOutput = 'Loading...';
$scope.historyDate = 'Loading...';
$scope.refreshHistory = (function() {
$api.request({
module: "ettercap",
action: "refreshHistory"
}, function(response) {
$scope.history = response;
})
});
$scope.viewHistory = (function(param) {
$api.request({
module: "ettercap",
action: "viewHistory",
file: param
}, function(response) {
$scope.historyOutput = response.output;
$scope.historyDate = response.date;
})
});
$scope.deleteHistory = (function(param) {
$api.request({
module: "ettercap",
action: "deleteHistory",
file: param
}, function(response) {
$scope.refreshHistory();
})
});
$scope.downloadHistory = (function(param) {
$api.request({
module: 'ettercap',
action: 'downloadHistory',
file: param
}, function(response) {
if (response.error === undefined) {
window.location = '/api/?download=' + response.download;
}
});
});
$scope.refreshHistory();
$rootScope.$watch('status.refreshHistory', function(param) {
if (param) {
$scope.refreshHistory();
}
});
}]);
registerController('ettercap_OptionsController', ['$api', '$scope', '$rootScope', function($api, $scope, $rootScope) {
$scope.command = "ettercap ";
$scope.target1 = "";
$scope.target2 = "";
$scope.filters = [];
$scope.selectedFilter = "--";
$scope.interfaces = [];
$scope.selectedInterface = "--";
$scope.mitm = "--";
$scope.arpParameters = "--";
$scope.portParameters = "--";
$scope.visualization = "--";
$scope.proto = "--";
$scope.visualizationOptions = {
option1: false,
option2: false,
option3: false
};
$scope.protoOptions = {
option1: false,
option2: false,
option3: false,
option4: false,
option5: false,
option6: false
};
$scope.update = (function(param) {
$scope.command = "ettercap " + updateInterface() + updateOptions() + updateProto() + updateVisualization() + updateFilter() + updateMITM() + updateTarget1() + updateTarget2()
$rootScope.command = $scope.command;
});
$scope.getFilters = (function() {
$api.request({
module: 'ettercap',
action: 'getFilters',
compiled: true
}, function(response) {
$scope.filters = response;
$scope.selectedFilter = "--";
$rootScope.status.refreshFilters = false;
});
});
function updateInterface() {
var return_value = "";
if ($scope.selectedInterface != "--")
return_value = "-i " + $scope.selectedInterface + " ";
return return_value;
}
function updateOptions() {
var return_value = "";
angular.forEach($scope.visualizationOptions, function(value, key) {
if (value != false)
return_value += value + " ";
});
angular.forEach($scope.protoOptions, function(value, key) {
if (value != false)
return_value += value + " ";
});
return return_value;
}
function updateTarget1() {
var return_value = "";
if ($scope.target1 != "")
return_value = "/" + $scope.target1 + "/ ";
return return_value;
}
function updateTarget2() {
var return_value = "";
if ($scope.target2 != "")
return_value = "/" + $scope.target2 + "/ ";
return return_value;
}
function updateMITM() {
var return_value = "";
if ($scope.mitm != "--")
if ($scope.mitm == "-M arp" && $scope.arpParameters != "--")
return_value = $scope.mitm + ":" + $scope.arpParameters + " ";
else if ($scope.mitm == "-M port" && $scope.portParameters != "--")
return_value = $scope.mitm + ":" + $scope.portParameters + " ";
else
return_value = $scope.mitm + " ";
return return_value;
}
function updateFilter() {
var return_value = "";
if ($scope.selectedFilter != "--")
return_value = "-F /pineapple/modules/ettercap/filters/" + $scope.selectedFilter + " ";
return return_value;
}
function updateVisualization() {
var return_value = "";
if ($scope.visualization != "--")
return_value = $scope.visualization + " ";
return return_value;
}
function updateProto() {
var return_value = "";
if ($scope.proto != "--")
return_value = $scope.proto + " ";
return return_value;
}
$scope.getInterfaces = (function() {
$api.request({
module: 'ettercap',
action: 'getInterfaces'
}, function(response) {
$scope.interfaces = response;
});
});
$scope.getInterfaces();
$scope.getFilters();
$scope.update();
$rootScope.$watch('status.refreshFilters', function(param) {
if (param) {
$scope.getFilters();
}
});
}]);
registerController('ettercap_EditorController', ['$api', '$scope', '$rootScope', '$timeout', function($api, $scope, $rootScope, $timeout) {
$scope.filters = [];
$scope.selectedFilter = "--";
$scope.filterData = '';
$scope.saveFilterLabel = "primary";
$scope.saveFilter = "New Filter";
$scope.saving = false;
$scope.compileFilterLabel = "primary";
$scope.compileFilter = "Compile Filter";
$scope.compiling = false;
$scope.deleteFilterLabel = "danger";
$scope.deleteFilter = "Delete Filter";
$scope.deleting = false;
$scope.filterName = "";
$scope.getFilters = (function() {
$api.request({
module: 'ettercap',
action: 'getFilters',
compiled: false
}, function(response) {
$scope.filters = response;
});
});
$scope.showFilter = (function() {
$scope.output = "";
if ($scope.selectedFilter != "--") {
$scope.filterName = $scope.selectedFilter;
$scope.saveFilter = "Save Filter";
$api.request({
module: 'ettercap',
action: 'showFilter',
filter: $scope.selectedFilter
}, function(response) {
$scope.filterData = response.filterData;
});
} else {
$scope.filterName = "";
$scope.filterData = "";
$scope.saveFilter = "New Filter";
}
});
$scope.deleteFilterData = (function() {
$scope.deleteFilterLabel = "warning";
$scope.deleteFilter = "Deleting...";
$scope.deleting = true;
$api.request({
module: 'ettercap',
action: 'deleteFilter',
filter: $scope.selectedFilter
}, function(response) {
$scope.deleteFilterLabel = "success";
$scope.deleteFilter = "Deleted";
$timeout(function() {
$scope.deleteFilterLabel = "danger";
$scope.deleteFilter = "Delete Filter";
$scope.deleting = false;
}, 2000);
$scope.getFilters();
$scope.selectedFilter = '--';
$scope.filterName = "";
$scope.filterData = "";
$scope.saveFilter = "New Filter";
$rootScope.status.refreshFilters = true;
});
});
$scope.compileFilterData = (function() {
if ($scope.selectedFilter != "--" && $scope.filterName != "") {
$scope.compileFilterLabel = "warning";
$scope.compileFilter = "Compiling...";
$scope.compiling = true;
$api.request({
module: 'ettercap',
action: 'compileFilterData',
filterData: $scope.filterData,
filter: $scope.selectedFilter
}, function(response) {
$scope.compileFilterLabel = "success";
$scope.compileFilter = "Compiled";
$timeout(function() {
$scope.compileFilterLabel = "primary";
$scope.compileFilter = "Compile Filter";
$scope.compiling = false;
}, 2000);
$rootScope.status.refreshFilters = true;
$scope.output = response;
});
}
});
$scope.saveFilterData = (function() {
if ($scope.selectedFilter != "--" && $scope.filterName != "") {
$scope.saveFilterLabel = "warning";
$scope.saveFilter = "Saving...";
$scope.saving = true;
$api.request({
module: 'ettercap',
action: 'saveFilterData',
filterData: $scope.filterData,
filter: $scope.selectedFilter
}, function(response) {
$scope.saveFilterLabel = "success";
$scope.saveFilter = "Saved";
$timeout(function() {
$scope.saveFilterLabel = "primary";
$scope.saveFilter = "Save Filter";
$scope.saving = false;
}, 2000);
});
} else if ($scope.selectedFilter == "--" && $scope.filterName != "") {
$scope.saveFilterLabel = "warning";
$scope.saveFilter = "Saving...";
$scope.saving = true;
if ($scope.filterName.search(".filter") == -1)
$scope.filterName = $scope.filterName + ".filter";
$api.request({
module: 'ettercap',
action: 'saveFilterData',
filterData: $scope.filterData,
filter: $scope.filterName
}, function(response) {
$scope.saveFilterLabel = "success";
$scope.saveFilter = "Saved";
$timeout(function() {
$scope.saveFilterLabel = "primary";
$scope.saveFilter = "Save Filter";
$scope.saving = false;
}, 2000);
$scope.getFilters();
$scope.selectedFilter = $scope.filterName;
$rootScope.status.refreshFIlters = true;
});
}
});
$scope.getFilters();
}]);

View File

@ -1 +0,0 @@
Logs will be saved here.

View File

@ -1,339 +0,0 @@
<div class="panel panel-default" ng-controller="ettercap_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="ettercap_ControlsController">
<div class="panel-heading">
<h3 class="panel-title">Controls</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 ng-show="$root.status.installed">
<td style="padding-bottom: .5em;" class="text-muted">ettercap</td>
<td style="text-align:right;padding-bottom: .5em;"><button type="button" style="width: 90px;" class="btn btn-{{statusLabel}} btn-xs" ng-disabled="starting" ng-click="toggleettercap()">{{status}}</button></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">&times;</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">&times;</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="ettercap_OptionsController">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Options">
<h4 class="panel-title">Options</h4>
</div>
<div id="Options" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Command</span>
<input type="text" class="form-control input-sm" ng-model="command" placeholder="ettercap command">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Interface</span>
<select ng-change="update()" ng-model="selectedInterface" class="form-control input-sm">
<option>--</option>
<option ng-repeat="interface in interfaces">{{ interface }}</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Target 1</span>
<input ng-change="update()" type="text" class="form-control input-sm" ng-model="target1" placeholder="Target 1">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Target 2</span>
<input ng-change="update()" type="text" class="form-control input-sm" ng-model="target2" placeholder="Target 2">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Filter</span>
<select ng-change="update()" ng-model="selectedFilter" class="form-control input-sm">
<option ng-repeat="filter in filters">{{ filter }}</option>
</select>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#MITM">MITM</div>
<div id="MITM" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Perform a mitm attack</span>
<select ng-change="update()" ng-model="mitm" class="form-control input-sm">
<option>--</option>
<option value="-M arp">arp</option>
<option value="-M icmp">icmp</option>
<option value="-M dhcp">dhcp</option>
<option value="-M port">port</option>
</select>
</div>
</div>
<div ng-show="mitm=='-M arp'" class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Parameters</span>
<select ng-change="update()" ng-model="arpParameters" class="form-control input-sm">
<option>--</option>
<option value="oneway">oneway</option>
<option value="remote">remote</option>
<option value="oneway,remote">oneway,remote</option>
</select>
</div>
</div>
<div ng-show="mitm=='-M port'" class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Parameters</span>
<select ng-change="update()" ng-model="portParameters" class="form-control input-sm">
<option>--</option>
<option value="remote">remote</option>
<option value="tree">tree</option>
<option value="remote,tree">remote,tree</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Visualization">Visualization</div>
<div id="Visualization" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Visualization method</span>
<select ng-change="update()" ng-model="visualization" class="form-control input-sm">
<option>--</option>
<option value="-V hex">hex</option>
<option value="-V ascii">ascii</option>
<option value="-V text">text</option>
<option value="-V ebcdic">ebcdic</option>
<option value="-V html">html</option>
<option value="-V utf8">utf8</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="visualizationOptions.option1" ng-true-value="'-d'"> Resolves ip addresses into hostnames</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="visualizationOptions.option2" ng-true-value="'-E'"> Print extended header for every packet</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="visualizationOptions.option3" ng-true-value="'-Q'"> Do not display user and password</label></div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Others">Others</div>
<div id="Others" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Sniff only PROTO packets</span>
<select ng-change="update()" ng-model="proto" class="form-control input-sm">
<option>--</option>
<option value="-t tcp">tcp</option>
<option value="-t udp">udp</option>
<option value="-t all">all</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="protoOptions.option1" ng-true-value="'-o'"> Don't sniff, only perform the mitm attack</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="protoOptions.option2" ng-true-value="'-p'"> Do not put the iface in promisc mode</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="protoOptions.option3" ng-true-value="'-u'"> Do not forward packets</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="protoOptions.option4" ng-true-value="'-R'"> Use reversed TARGET matching</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="protoOptions.option5" ng-true-value="'-q'"> Do not display packet contents</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="protoOptions.option6" ng-true-value="'-z'"> Do not perform the initial ARP scan</label></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="ettercap_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">
<span class="input-group-addon input-sm">Filter</span>
<select ng-change="showFilter()" ng-model="selectedFilter" class="form-control input-sm">
<option ng-repeat="filter in filters">{{ filter }}</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Name</span>
<input type="text" class="form-control input-sm" ng-disabled="selectedFilter != '--'" ng-model="filterName" placeholder="New Filter name">
</div>
</div>
<div class="form-group">
<div class="btn-group pull-right">
<button class="btn btn-{{saveFilterLabel}} btn-sm" ng-disabled="saving || filterName == ''" ng-click="saveFilterData()">{{saveFilter}}</button>
<button class="btn btn-{{compileFilterLabel}} btn-sm" ng-disabled="compiling || selectedFilter == '--'" ng-click="compileFilterData()">{{compileFilter}}</button>
<button class="btn btn-{{deleteFilterLabel}} btn-sm" ng-disabled="deleting || selectedFilter == '--'" ng-click="deleteFilterData()">{{deleteFilter}}</button>
</div>
<div class="clearfix"></div>
<textarea class="form-control" rows="20" ng-model="filterData"></textarea>
<pre class="scrollable-pre log-pre">{{output}}</pre>
</div>
</div>
</div>
</div>
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="ettercap_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">
<div class="input-group">
<span class="input-group-addon input-sm">Filter</span>
<input type="text" class="form-control input-sm" placeholder="Piped commands used to filter output (e.g. grep, awk)" ng-model="filter">
<div class="input-group-btn">
<button class="btn btn-default btn-sm" ng-click="clearFilter()">Clear Filter</button>
<button class="btn btn-primary btn-sm" ng-click="refreshOutput()">Refresh Log</button>
</div>
</div>
<pre class="scrollable-pre log-pre">{{output}}</pre>
</div>
</div>
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="ettercap_HistoryController">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#History">
<h4 class="panel-title">History <span class="badge">{{history.length}}</span></h4>
</div>
<div id="History" class="panel-collapse collapse">
<div class="panel-body">
<button class="btn btn-primary btn-sm pull-right" ng-click="refreshHistory()">Refresh History</button><div class="clearfix"></div>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover" ng-hide="(history.length == 0)">
<thead>
<tr>
<th>Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="entry in history" ng-if="entry != ''">
<td>{{entry[0]}}</td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-fixed-length btn-sm btn-default" data-toggle="modal" data-target="#historyModal" ng-click="viewHistory(entry[1])">View</button>
<button type="button" class="btn btn-sm btn-default" ng-click="downloadHistory(entry[1])">Download log</button>
<button type="button" class="btn btn-sm btn-default" ng-click="downloadHistory(entry[2])">Download pcap</button>
<button type="button" class="btn btn-fixed-length btn-sm btn-danger" ng-click="deleteHistory(entry[2])">Delete</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="well" ng-show="(history.length === 0)">No history...</div>
</div>
</div>
<div class="modal fade" id="historyModal" tabindex="-1" role="dialog" aria-labelledby="historyModalLabel">
<div class="modal-dialog modal-lg" 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">&times;</span></button>
<h4 class="modal-title" id="historyModalLabel">View History - {{historyDate}}</h4>
</div>
<div class="modal-body">
<pre class="scrollable-pre log-pre">{{historyOutput}}</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,10 +0,0 @@
{
"author": "Whistle Master",
"description": "(FW2.5.4 or below) Perform man-in-the-middle attacks using ettercap",
"devices": [
"nano",
"tetra"
],
"title": "ettercap",
"version": "1.7"
}

View File

@ -1,52 +0,0 @@
#!/bin/sh
#2015 - Whistle Master
[[ -f /tmp/ettercap.progress ]] && {
exit 0
}
touch /tmp/ettercap.progress
if [ "$1" = "install" ]; then
if [ "$2" = "internal" ]; then
opkg install ettercap
sed -i "/redir_command_on = \"iptables/ s/# *//" /etc/ettercap/etter.conf
sed -i "/redir_command_off = \"iptables/ s/# *//" /etc/ettercap/etter.conf
sed -i 's/^\(ec_uid = \).*/\10/' /etc/ettercap/etter.conf
sed -i 's/^\(ec_gid = \).*/\10/' /etc/ettercap/etter.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
elif [ "$2" = "sd" ]; then
opkg install ettercap --dest sd
sed -i "/redir_command_on = \"iptables/ s/# *//" /etc/ettercap/etter.conf
sed -i "/redir_command_off = \"iptables/ s/# *//" /etc/ettercap/etter.conf
sed -i 's/^\(ec_uid = \).*/\10/' /etc/ettercap/etter.conf
sed -i 's/^\(ec_gid = \).*/\10/' /etc/ettercap/etter.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
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/ettercap
echo "config ettercap 'module'" > /etc/config/ettercap
uci set ettercap.module.installed=1
uci commit ettercap.module.installed
elif [ "$1" = "remove" ]; then
opkg remove ettercap
rm -rf /etc/config/ettercap
fi
rm /tmp/ettercap.progress

View File

@ -1,15 +0,0 @@
#!/bin/sh
#2015 - Whistle Master
MYTIME=`date +%s`
MYCMD=`cat /tmp/ettercap.run`
if [ "$1" = "start" ]; then
eval ${MYCMD}
rm -rf /tmp/ettercap.run
elif [ "$1" = "stop" ]; then
killall -9 ettercap
rm -rf /tmp/ettercap.run
fi