Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Commit a1ac92c

Browse files
committed
Renamed ressources folder to match the scan name
1 parent 4769dd9 commit a1ac92c

2 files changed

Lines changed: 19 additions & 29 deletions

File tree

scb-scanprocesses/ncrack-process/src/main/resources/forms/default/approve-results.html renamed to scb-scanprocesses/ncrack-process/src/main/resources/forms/ncrack/approve-results.html

File renamed without changes.

scb-scanprocesses/ncrack-process/src/main/resources/forms/default/configure-target.html renamed to scb-scanprocesses/ncrack-process/src/main/resources/forms/ncrack/configure-target.html

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,20 @@ <h2>Please configure the Scan</h2>
3232
camForm.on('variables-fetched', function () {
3333
$scope.context = camForm.variableManager.variableValue('DEFAULT_CONTEXT');
3434

35-
$scope.targetList = [{
35+
$scope.target = {
3636
name: camForm.variableManager.variableValue('DEFAULT_TARGET_NAME'),
37-
location: camForm.variableManager.variableValue('DEFAULT_TARGET_LOCATION')
38-
}];
39-
40-
$scope.addTarget = function () {
41-
$scope.targetList.push({'name':'', 'location': ''});
42-
};
43-
44-
$scope.checkForEnter = function ($event) {
45-
if ($event.key === 'Enter') {
46-
$scope.addTarget();
47-
$event.stopPropagation();
48-
$event.preventDefault();
37+
location: camForm.variableManager.variableValue('DEFAULT_TARGET_LOCATION'),
38+
attributes: {
39+
NCRACK_PARAMETER: ''
4940
}
5041
};
5142
});
5243

5344
camForm.on('submit', function () {
54-
camForm.variableManager.destroyVariable('PROCESS_TARGETS');
5545
camForm.variableManager.createVariable({
5646
name: 'PROCESS_TARGETS',
5747
type: 'Object',
58-
value: JSON.stringify($scope.targetList),
48+
value: JSON.stringify([ $scope.target ]),
5949
valueInfo: {
6050
serializationDataFormat: 'application/json',
6151
objectTypeName: 'java.lang.String'
@@ -68,11 +58,11 @@ <h2>Please configure the Scan</h2>
6858
<div class="row">
6959

7060
<div class="col-xs-12">
71-
<h3>Scan Target</h3>
61+
<h3>Ncrack Target</h3>
7262

7363
<!-- Target Hosts -->
7464
<div class="form-group">
75-
<div class="controls row form-group" ng-repeat="target in targetList track by $index">
65+
<div class="controls row form-group">
7666
<div class="col-xs-5">
7767
<label>Target Name</label>
7868
<input required class="form-control"
@@ -83,27 +73,27 @@ <h3>Scan Target</h3>
8373
ng-model="target.name"/>
8474
</div>
8575
<div class="col-xs-6">
86-
<label>Target Hosts</label>
76+
<label>Target URL</label>
8777
<input required class="form-control"
8878
type="text"
89-
placeholder="Hostname/IP address"
79+
placeholder="ssh://example.com:22"
9080
ng-minlength="3"
9181
ng-maxlength="100"
9282
ng-model="target.location"
93-
ng-keydown="checkForEnter($event)"
9483
/>
9584
</div>
96-
<div class="col-xs-1">
97-
<button class="btn btn-danger btn-lg"
98-
ng-click="targetList.splice($index, 1)"
99-
ng-disabled="targetList.length === 1"
100-
style="position: absolute; right: 15px; top: 0;">
101-
<span class="glyphicon glyphicon-trash"></span>
102-
</button>
85+
<div class="col-xs-12">
86+
<label>Ncrack Parameters</label>
87+
<input required class="form-control"
88+
type="text"
89+
placeholder="--user admin --pass 123456"
90+
ng-minlength="3"
91+
ng-maxlength="100"
92+
ng-model="target.attributes.NCRACK_PARAMETER"
93+
/>
10394
</div>
10495
</div>
105-
<button class="btn btn-primary" ng-click="addTarget()">Add Host</button>
106-
<code class="hidden">{{ targetList }}</code>
96+
<code class="">{{ target }}</code>
10797
</div>
10898

10999
<!-- Context (Project/Team/System...) -->

0 commit comments

Comments
 (0)