From 69c5d43a196ade011e0c204e54b1c023d9a16d2e Mon Sep 17 00:00:00 2001 From: gpascal123 Date: Tue, 7 Oct 2025 11:07:14 +0200 Subject: [PATCH 1/3] - Added title - Changed the default value of benchmark type --- .../masks/masks.component.html | 6 + .../masks/masks.component.ts | 11 +- .../wrbulk/wrbulk.component.html | 129 +++++++++--------- .../wrbulk/wrbulk.component.ts | 10 +- 4 files changed, 82 insertions(+), 74 deletions(-) diff --git a/src/app/tasks/import-supertasks/masks/masks.component.html b/src/app/tasks/import-supertasks/masks/masks.component.html index 7dc737823..cde205c90 100644 --- a/src/app/tasks/import-supertasks/masks/masks.component.html +++ b/src/app/tasks/import-supertasks/masks/masks.component.html @@ -1,3 +1,8 @@ + + + @@ -29,3 +34,4 @@ + diff --git a/src/app/tasks/import-supertasks/masks/masks.component.ts b/src/app/tasks/import-supertasks/masks/masks.component.ts index 29ee00a91..8722152b5 100644 --- a/src/app/tasks/import-supertasks/masks/masks.component.ts +++ b/src/app/tasks/import-supertasks/masks/masks.component.ts @@ -14,10 +14,10 @@ import { Router } from '@angular/router'; import { JPretask } from '@models/pretask.model'; -import { JCrackerBinaryType } from '../../../core/_models/cracker-binary.model'; -import { ResponseWrapper } from '../../../core/_models/response.model'; -import { SERV } from '../../../core/_services/main.config'; +import { SERV } from '@services/main.config'; +import { JCrackerBinaryType } from '@src/app/core/_models/cracker-binary.model'; +import { ResponseWrapper } from '@src/app/core/_models/response.model'; import { JsonAPISerializer } from '@src/app/core/_services/api/serializer-service'; /** @@ -46,7 +46,7 @@ export class MasksComponent implements OnInit, OnDestroy { /** Select Options. */ selectBenchmarktype = benchmarkType; - selectCrackertype: any; + selectCrackertype = undefined; /** Select Options Mapping */ selectCrackertypeMap = { @@ -78,7 +78,6 @@ export class MasksComponent implements OnInit, OnDestroy { private serializer: JsonAPISerializer ) { this.buildForm(); - titleService.set(['Import SuperTask - Mask']); } /** @@ -106,7 +105,7 @@ export class MasksComponent implements OnInit, OnDestroy { isSmall: new FormControl(false), isCpuTask: new FormControl(false), optFlag: new FormControl(false), - useNewBench: new FormControl(false), + useNewBench: new FormControl(true), crackerBinaryId: new FormControl(1), masks: new FormControl('') }); diff --git a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.html b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.html index 026f17bb2..5598ad7e4 100644 --- a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.html +++ b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.html @@ -1,66 +1,71 @@ - - -
-
- - -
- -
- -
-
- - -
-
- - -
- - - - - - -
- + + + + +
+
+ + + + +
+
- - -
-
-
- - - - Wordlists - - - +
+ + +
+
+ + +
+ + + + + + +
+ +
+
+ + +
+
+ + + + Wordlists + + + - - - Rules - - - + + + Rules + + + - - - Other - - - - + + + Other + + + + +
-
\ No newline at end of file + diff --git a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts index 2680a0ee5..eda24211e 100644 --- a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts +++ b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts @@ -20,7 +20,6 @@ import { UnsubscribeService } from '@services/unsubscribe.service'; import { CRACKER_TYPE_FIELD_MAPPING } from '@src/app/core/_constants/select.config'; import { benchmarkType } from '@src/app/core/_constants/tasks.config'; -import { PageTitle } from '@src/app/core/_decorators/autotitle'; import { transformSelectOptions } from '@src/app/shared/utils/forms'; @Component({ @@ -28,7 +27,6 @@ import { transformSelectOptions } from '@src/app/shared/utils/forms'; templateUrl: './wrbulk.component.html', standalone: false }) -@PageTitle(['Import SuperTask - Wordlist/Rules Bulk']) export class WrbulkComponent implements OnInit, OnDestroy { /** * Horizontal menu and redirection links. @@ -46,7 +44,7 @@ export class WrbulkComponent implements OnInit, OnDestroy { /** Select Options. */ selectBenchmarktype = benchmarkType; - selectCrackertype: any; + selectCrackertype = undefined; /** Select Options Mapping */ selectCrackertypeMap = { @@ -95,7 +93,7 @@ export class WrbulkComponent implements OnInit, OnDestroy { maxAgents: new FormControl(0), isSmall: new FormControl(false), isCpuTask: new FormControl(false), - useNewBench: new FormControl(false), + useNewBench: new FormControl(true), crackerBinaryId: new FormControl(1), attackCmd: new FormControl(this.uiService.getUIsettings('hashlistAlias').value, [Validators.required]), baseFiles: new FormControl([]), @@ -192,7 +190,7 @@ export class WrbulkComponent implements OnInit, OnDestroy { if (this.createForm.valid) { const formValue = this.createForm.value; const attackCmd: string = formValue.attackCmd; - const crackerBinaryId: any = formValue.crackerBinaryId; + const crackerBinaryId: number = formValue.crackerBinaryId; const baseFiles: [] = formValue.baseFiles; const iterFiles: [] = formValue.iterFiles; @@ -286,7 +284,7 @@ export class WrbulkComponent implements OnInit, OnDestroy { * Updates the form based on the provided event data. * @param event - The event data containing attack command and files. */ - onUpdateForm(event: any): void { + onUpdateForm(event): void { if (event.type === 'CMD') { this.createForm.patchValue({ attackCmd: event.attackCmd, From 4b429f32304d74f9d562534b2186de78609b8d3b Mon Sep 17 00:00:00 2001 From: gpascal123 Date: Tue, 7 Oct 2025 11:21:44 +0200 Subject: [PATCH 2/3] Removed the check if at least one base file is selected. --- src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts index eda24211e..8797bf107 100644 --- a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts +++ b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts @@ -219,13 +219,6 @@ export class WrbulkComponent implements OnInit, OnDestroy { hasError = true; // Set error flag } - // Check if at least one base file is selected - if (!baseFiles || baseFiles.length === 0) { - const warning = 'You need to select at least one base file!'; - this.alert.showErrorMessage(warning); - hasError = true; // Set error flag - } - // Check if at least one iter file is selected if (!iterFiles || iterFiles.length === 0) { const warning = 'You need to select at least one iteration file!'; From e0a22c4500efd5b1b8ad337e329e3dedd8d708c4 Mon Sep 17 00:00:00 2001 From: gpascal123 Date: Tue, 7 Oct 2025 11:24:20 +0200 Subject: [PATCH 3/3] Removed unused code. --- src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts index 8797bf107..f358fda01 100644 --- a/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts +++ b/src/app/tasks/import-supertasks/wrbulk/wrbulk.component.ts @@ -191,7 +191,6 @@ export class WrbulkComponent implements OnInit, OnDestroy { const formValue = this.createForm.value; const attackCmd: string = formValue.attackCmd; const crackerBinaryId: number = formValue.crackerBinaryId; - const baseFiles: [] = formValue.baseFiles; const iterFiles: [] = formValue.iterFiles; const attackAlias = this.uiService.getUIsettings('hashlistAlias').value;