Updates to nmap and urlsnarf (#79)

* nmap: Check internal space available to avoid confusion with large depends.

* arpspoof: fix accidental recursion.
pull/83/head
Marc 2019-10-02 18:33:32 +01:00 committed by GitHub
parent e85ef10b35
commit dd7a5d3ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 337 additions and 244 deletions

View File

@ -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()

View File

@ -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;

View File

@ -1,62 +1,100 @@
<div class="panel panel-default" ng-controller="nmap_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="panel panel-default" ng-controller="nmap_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="nmap_ControlsController">
<div class="panel-heading">
<h3 class="panel-title">Controls</h3>
<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">nmap</td>
<td style="text-align:right;padding-bottom: .5em;">
<button type="button" style="width: 90px;" class="btn btn-{{statusLabel}} btn-xs"
ng-disabled="starting || $root.command == 'nmap '" ng-click="togglenmap()">
{{status}}
</button>
</td>
</tr>
</table>
</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">nmap</td>
<td style="text-align:right;padding-bottom: .5em;"><button type="button" style="width: 90px;" class="btn btn-{{statusLabel}} btn-xs" ng-disabled="starting || $root.command == 'nmap '" ng-click="togglenmap()">{{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="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.<br/><br/>
<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>
<span ng-show="sdAvailable == false && internalAvailable == false">
There is not enough internal storage available to install the nmap dependencies.
Please insert an correctly formatted SD card.
</span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-info" ng-hide="internalAvailable == false"
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-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 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 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>
@ -67,169 +105,210 @@
<h4 class="panel-title">Options</h4>
</div>
<div id="Options" class="panel-collapse collapse">
<div class="panel-body">
<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="nmap command">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Target</span>
<input ng-change="update()" type="text" class="form-control input-sm" ng-model="target" placeholder="Target">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Profile</span>
<select ng-change="update()" ng-model="profile" class="form-control input-sm">
<option>--</option>
<option value="">Regular scan</option>
<option value="-T4 -A -v">Intense scan</option>
<option value="-sS -sU -T4 -A -v">Intense scan plus UDP</option>
<option value="-p 1-65535 -T4 -A -v">Intense scan, all TCP ports</option>
<option value="-T4 -A -v -Pn">Intense scan, no ping</option>
<option value="-sn">Ping scan</option>
<option value="-T4 -F">Quick scan</option>
<option value="-sV -T4 -O -F --version-light">Quick scan plus</option>
<option value="-sn --traceroute">Quick traceroute</option>
<option value="-sS -sU -T4 -A -v -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53">Slow comprehensive scan</option>
</select>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Scan">Scan</div>
<div id="Scan" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Timing</span>
<select ng-change="update()" ng-model="timing" class="form-control input-sm">
<option>--</option>
<option value="-T0">Paranoid</option>
<option value="-T1">Sneaky</option>
<option value="-T2">Polite</option>
<option value="-T3">Normal</option>
<option value="-T4">Aggresive</option>
<option value="-T5">Insane</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">TCP scan</span>
<select ng-change="update()" ng-model="tcp" class="form-control input-sm">
<option>--</option>
<option value="-sA">ACK scan</option>
<option value="-sF">FIN scan</option>
<option value="-sM">Maimon scan</option>
<option value="-sN">Null scan</option>
<option value="-sS">TCP SYN scan</option>
<option value="-sT">TCP connect scan</option>
<option value="-sW">Window scan</option>
<option value="-sX">Xmas Tree scan</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Non-TCP scan</span>
<select ng-change="update()" ng-model="nontcp" class="form-control input-sm">
<option>--</option>
<option value="-sU">UDP scan</option>
<option value="-sO">IP protocol scan</option>
<option value="-sL">List scan</option>
<option value="-sn">No port scan</option>
<option value="-sY">SCTP INIT port scan</option>
<option value="-sZ">SCTP cookie-echo port scan</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="scanOptions.option1" ng-true-value="'-A'"> Enable all advanced/aggressive options</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="scanOptions.option2" ng-true-value="'-O'"> OS detection</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="scanOptions.option3" ng-true-value="'-sV'"> Version detection</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="scanOptions.option4" ng-true-value="'-n'"> Disable reverse DNS resolution</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="scanOptions.option5" ng-true-value="'-6'"> IPv6 support</label></div>
</div>
</div>
<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="nmap command">
</div>
</div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Ping">Ping</div>
<div id="Ping" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="pingOptions.option1" ng-true-value="'-Pn'"> No ping before scanning</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="pingOptions.option2" ng-true-value="'-PE'"> ICMP ping</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="pingOptions.option3" ng-true-value="'-PP'"> ICMP timestamp request</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="pingOptions.option4" ng-true-value="'-PM'"> ICMP netmask request</label></div>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Target</span>
<input ng-change="update()" type="text" class="form-control input-sm" ng-model="target"
placeholder="Target">
</div>
</div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Target">Target</div>
<div id="Target" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="targetOptions.option1" ng-true-value="'-F'"> Fast scan</label></div>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Profile</span>
<select ng-change="update()" ng-model="profile" class="form-control input-sm">
<option>--</option>
<option value="">Regular scan</option>
<option value="-T4 -A -v">Intense scan</option>
<option value="-sS -sU -T4 -A -v">Intense scan plus UDP</option>
<option value="-p 1-65535 -T4 -A -v">Intense scan, all TCP ports</option>
<option value="-T4 -A -v -Pn">Intense scan, no ping</option>
<option value="-sn">Ping scan</option>
<option value="-T4 -F">Quick scan</option>
<option value="-sV -T4 -O -F --version-light">Quick scan plus</option>
<option value="-sn --traceroute">Quick traceroute</option>
<option value="-sS -sU -T4 -A -v -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53">Slow
comprehensive scan
</option>
</select>
</div>
</div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Other">Other</div>
<div id="Other" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="otherOptions.option1" ng-true-value="'-f'"> Fragment IP packets</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="otherOptions.option2" ng-true-value="'--packet-trace'"> Packet trace</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="otherOptions.option3" ng-true-value="'-r'"> Disable randomizing scanned ports</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()" ng-model="otherOptions.option4" ng-true-value="'--traceroute'"> Trace routes to targets</label></div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Scan">Scan</div>
<div id="Scan" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Timing</span>
<select ng-change="update()" ng-model="timing" class="form-control input-sm">
<option>--</option>
<option value="-T0">Paranoid</option>
<option value="-T1">Sneaky</option>
<option value="-T2">Polite</option>
<option value="-T3">Normal</option>
<option value="-T4">Aggresive</option>
<option value="-T5">Insane</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">TCP scan</span>
<select ng-change="update()" ng-model="tcp" class="form-control input-sm">
<option>--</option>
<option value="-sA">ACK scan</option>
<option value="-sF">FIN scan</option>
<option value="-sM">Maimon scan</option>
<option value="-sN">Null scan</option>
<option value="-sS">TCP SYN scan</option>
<option value="-sT">TCP connect scan</option>
<option value="-sW">Window scan</option>
<option value="-sX">Xmas Tree scan</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon input-sm">Non-TCP scan</span>
<select ng-change="update()" ng-model="nontcp" class="form-control input-sm">
<option>--</option>
<option value="-sU">UDP scan</option>
<option value="-sO">IP protocol scan</option>
<option value="-sL">List scan</option>
<option value="-sn">No port scan</option>
<option value="-sY">SCTP INIT port scan</option>
<option value="-sZ">SCTP cookie-echo port scan</option>
</select>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="scanOptions.option1" ng-true-value="'-A'">
Enable all advanced/aggressive options</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="scanOptions.option2" ng-true-value="'-O'">
OS detection</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="scanOptions.option3"
ng-true-value="'-sV'"> Version detection</label>
</div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="scanOptions.option4" ng-true-value="'-n'">
Disable reverse DNS resolution</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="scanOptions.option5" ng-true-value="'-6'">
IPv6 support</label></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Ping">Ping</div>
<div id="Ping" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="pingOptions.option1"
ng-true-value="'-Pn'"> No ping before
scanning</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="pingOptions.option2"
ng-true-value="'-PE'"> ICMP ping</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="pingOptions.option3"
ng-true-value="'-PP'"> ICMP timestamp
request</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="pingOptions.option4"
ng-true-value="'-PM'"> ICMP netmask request</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Target">Target</div>
<div id="Target" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="targetOptions.option1"
ng-true-value="'-F'"> Fast scan</label></div>
</div>
</div>
</div>
</div>
</div>
<div ng-show="profile=='--'" class="panel panel-default">
<div class="panel-heading pointer" data-toggle="collapse" data-target="#Other">Other</div>
<div id="Other" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group">
<div class="input-group">
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="otherOptions.option1"
ng-true-value="'-f'"> Fragment IP packets</label>
</div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="otherOptions.option2"
ng-true-value="'--packet-trace'"> Packet
trace</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="otherOptions.option3"
ng-true-value="'-r'"> Disable randomizing scanned
ports</label></div>
<div class="checkbox"><label><input type="checkbox" ng-change="update()"
ng-model="otherOptions.option4"
ng-true-value="'--traceroute'"> Trace routes to
targets</label></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default" ng-show="$root.status.installed" ng-controller="nmap_OutputController">
<div class="panel-heading">
<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 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 Scan</button><div class="clearfix"></div>
<pre class="scrollable-pre log-pre">{{output}}</pre>
<button class="btn btn-primary btn-sm pull-right" ng-click="refreshOutput()">Refresh Scan</button>
<div class="clearfix"></div>
<pre class="scrollable-pre log-pre">{{output}}</pre>
</div>
</div>
@ -239,48 +318,57 @@
</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</button>
<button type="button" class="btn btn-fixed-length btn-sm btn-danger" ng-click="deleteHistory(entry[1])">Delete</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="well" ng-show="(history.length === 0)">No history...</div>
<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
</button>
<button type="button" class="btn btn-fixed-length btn-sm btn-danger"
ng-click="deleteHistory(entry[1])">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 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

@ -6,5 +6,5 @@
"tetra"
],
"title": "nmap",
"version": "1.8"
"version": "1.9"
}

View File

@ -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";

View File

@ -6,5 +6,5 @@
"tetra"
],
"title": "urlsnarf",
"version": "1.7"
"version": "1.8"
}