@tehw0lf/wordlist-generator 0.14.3 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/esm2022/index.mjs +2 -0
  2. package/esm2022/lib/wordlist-generator.component.mjs +178 -0
  3. package/{esm2020 → esm2022}/lib/wordlist-generator.service.mjs +5 -5
  4. package/fesm2022/tehw0lf-wordlist-generator.mjs +222 -0
  5. package/fesm2022/tehw0lf-wordlist-generator.mjs.map +1 -0
  6. package/index.d.ts +0 -1
  7. package/lib/wordlist-generator.component.d.ts +1 -1
  8. package/package.json +14 -25
  9. package/esm2020/index.mjs +0 -3
  10. package/esm2020/lib/wordlist-generator.component.mjs +0 -161
  11. package/esm2020/lib/wordlist-generator.module.mjs +0 -62
  12. package/fesm2015/tehw0lf-wordlist-generator.mjs +0 -262
  13. package/fesm2015/tehw0lf-wordlist-generator.mjs.map +0 -1
  14. package/fesm2020/tehw0lf-wordlist-generator.mjs +0 -261
  15. package/fesm2020/tehw0lf-wordlist-generator.mjs.map +0 -1
  16. package/lib/wordlist-generator.module.d.ts +0 -18
  17. package/schematics/collection.json +0 -16
  18. package/schematics/ng-add/index.d.ts +0 -3
  19. package/schematics/ng-add/index.js +0 -46
  20. package/schematics/ng-add/index.js.map +0 -1
  21. package/schematics/ng-add/index.spec.d.ts +0 -1
  22. package/schematics/ng-add/index.spec.js +0 -102
  23. package/schematics/ng-add/index.spec.js.map +0 -1
  24. package/schematics/ng-add/package-config.d.ts +0 -12
  25. package/schematics/ng-add/package-config.js +0 -48
  26. package/schematics/ng-add/package-config.js.map +0 -1
  27. package/schematics/ng-add/schema.d.ts +0 -3
  28. package/schematics/ng-add/schema.js +0 -3
  29. package/schematics/ng-add/schema.js.map +0 -1
  30. package/schematics/ng-add/schema.json +0 -16
  31. package/schematics/ng-add/setup.d.ts +0 -3
  32. package/schematics/ng-add/setup.js +0 -50
  33. package/schematics/ng-add/setup.js.map +0 -1
  34. package/schematics/testing/file-content.d.ts +0 -10
  35. package/schematics/testing/file-content.js +0 -13
  36. package/schematics/testing/file-content.js.map +0 -1
  37. package/schematics/testing/test-app.d.ts +0 -12
  38. package/schematics/testing/test-app.js +0 -44
  39. package/schematics/testing/test-app.js.map +0 -1
  40. package/schematics/testing/test-library.d.ts +0 -11
  41. package/schematics/testing/test-library.js +0 -21
  42. package/schematics/testing/test-library.js.map +0 -1
  43. package/schematics/testing/test-project.d.ts +0 -11
  44. package/schematics/testing/test-project.js +0 -36
  45. package/schematics/testing/test-project.js.map +0 -1
  46. /package/{esm2020 → esm2022}/lib/filetypes.mjs +0 -0
  47. /package/{esm2020 → esm2022}/lib/parsers.mjs +0 -0
  48. /package/{esm2020 → esm2022}/tehw0lf-wordlist-generator.mjs +0 -0
@@ -1,262 +0,0 @@
1
- import * as i4 from '@angular/cdk/drag-drop';
2
- import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
3
- import * as i0 from '@angular/core';
4
- import { Injectable, Component, ViewEncapsulation, Input, NgModule } from '@angular/core';
5
- import * as i1 from '@angular/forms';
6
- import { Validators, ReactiveFormsModule } from '@angular/forms';
7
- import { from, Subject } from 'rxjs';
8
- import { map, tap, reduce, takeUntil } from 'rxjs/operators';
9
- import { product } from 'cartesian-product-generator';
10
- import * as i3 from '@angular/common';
11
- import { CommonModule } from '@angular/common';
12
- import * as i5 from '@angular/material/form-field';
13
- import { MatFormFieldModule } from '@angular/material/form-field';
14
- import * as i6 from '@angular/material/icon';
15
- import { MatIconModule } from '@angular/material/icon';
16
- import * as i7 from '@angular/material/input';
17
- import { MatInputModule } from '@angular/material/input';
18
- import * as i8 from '@angular/material/menu';
19
- import { MatMenuModule } from '@angular/material/menu';
20
- import * as i9 from '@angular/material/button';
21
- import { MatButtonModule } from '@angular/material/button';
22
- import { ClipboardModule } from '@angular/cdk/clipboard';
23
- import { BrowserModule } from '@angular/platform-browser';
24
- import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
25
-
26
- /* eslint-disable no-shadow */
27
- var FileType;
28
- (function (FileType) {
29
- FileType["plaintext"] = "txt";
30
- FileType["xml"] = "xml";
31
- })(FileType || (FileType = {}));
32
-
33
- const toPlaintext = (wordlist) => ({
34
- wordlist,
35
- contentType: 'text/plain'
36
- });
37
- const toXML = (wordlist) => {
38
- const head = '<wordlist><word>';
39
- const glue = '</word><word>';
40
- const tail = '</word></wordlist>';
41
- return {
42
- wordlist: head + wordlist.replace(/\n/g, glue) + tail,
43
- contentType: 'text/xml'
44
- };
45
- };
46
-
47
- class WordlistGeneratorService {
48
- constructor() {
49
- //
50
- }
51
- generateWordlist(...charsets) {
52
- return from(product(...charsets)).pipe(map((word) => {
53
- return word.join('');
54
- }));
55
- }
56
- }
57
- WordlistGeneratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
58
- WordlistGeneratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorService, providedIn: 'root' });
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorService, decorators: [{
60
- type: Injectable,
61
- args: [{
62
- providedIn: 'root'
63
- }]
64
- }], ctorParameters: function () { return []; } });
65
-
66
- /* eslint-disable @angular-eslint/component-selector */
67
- class WordlistGeneratorComponent {
68
- constructor(formBuilder, wordlistGenerator) {
69
- this.formBuilder = formBuilder;
70
- this.wordlistGenerator = wordlistGenerator;
71
- this.buttonStyle = {
72
- 'background-color': '#333333',
73
- color: '#cc7832'
74
- };
75
- this.dragStyle = { color: '#cc7832' };
76
- this.textStyle = { color: '#cc7832' };
77
- this.displayWordlist = false;
78
- this.fileType = FileType.plaintext;
79
- this.fileTypes = Object.values(FileType);
80
- this.filteredCharset = [];
81
- this.prefix = '';
82
- this.suffix = '';
83
- this.unsubscribe$ = new Subject();
84
- this.removeDuplicates = (unfiltered) => [...new Set(unfiltered)].join('');
85
- }
86
- ngOnInit() {
87
- this.generateForm();
88
- }
89
- ngOnDestroy() {
90
- this.unsubscribe$.next();
91
- this.unsubscribe$.complete();
92
- }
93
- get charsets() {
94
- if (this.charsetForm) {
95
- return this.charsetForm.get('charsets');
96
- }
97
- return undefined;
98
- }
99
- addCharset() {
100
- if (this.charsets) {
101
- this.charsets.push(this.formBuilder.control('', Validators.required));
102
- }
103
- }
104
- cloneCharset(index) {
105
- if (this.charsets) {
106
- const charset = this.charsets.value[index];
107
- this.charsets.insert(index, this.formBuilder.control(charset, Validators.required));
108
- }
109
- }
110
- downloadWordlist() {
111
- if (this.charsets) {
112
- if (this.filteredCharset !== this.filterCharset(this.charsets.value)) {
113
- this.generateWordlist();
114
- }
115
- const filename = `wordlist_${this.wordsGenerated}_words_${this.charsets.length}_positions.${this.fileType}`;
116
- this.getWordlist()
117
- .pipe(tap((wordlist) => {
118
- if (wordlist.length > 0) {
119
- const parsed = this.parseWordlist(wordlist);
120
- const file = new Blob([parsed.wordlist], {
121
- type: parsed.contentType
122
- });
123
- if (window.navigator.msSaveOrOpenBlob) {
124
- window.navigator.msSaveOrOpenBlob(file, filename);
125
- }
126
- else {
127
- const a = document.createElement('a');
128
- const url = URL.createObjectURL(file);
129
- a.href = url;
130
- a.download = filename;
131
- document.body.appendChild(a);
132
- a.click();
133
- setTimeout(() => {
134
- document.body.removeChild(a);
135
- window.URL.revokeObjectURL(url);
136
- }, 0);
137
- }
138
- }
139
- }))
140
- .subscribe();
141
- }
142
- }
143
- drop(event) {
144
- if (this.charsets) {
145
- moveItemInArray(this.charsets.controls, event.previousIndex, event.currentIndex);
146
- this.charsets.updateValueAndValidity();
147
- }
148
- }
149
- generateForm() {
150
- this.charsetForm = this.formBuilder.group({
151
- charsets: this.formBuilder.array([
152
- this.formBuilder.control('', Validators.required)
153
- ]),
154
- prefix: this.formBuilder.control(''),
155
- suffix: this.formBuilder.control('')
156
- });
157
- }
158
- generateWordlist() {
159
- var _a, _b, _c, _d;
160
- if (this.charsetForm && this.charsets && this.charsets.valid) {
161
- this.filteredCharset = this.filterCharset(this.charsets.value);
162
- this.prefix = ((_a = this.charsetForm.get('prefix')) === null || _a === void 0 ? void 0 : _a.value)
163
- ? (_b = this.charsetForm.get('prefix')) === null || _b === void 0 ? void 0 : _b.value
164
- : '';
165
- this.suffix = ((_c = this.charsetForm.get('suffix')) === null || _c === void 0 ? void 0 : _c.value)
166
- ? (_d = this.charsetForm.get('suffix')) === null || _d === void 0 ? void 0 : _d.value
167
- : '';
168
- this.wordsGenerated = this.filteredCharset
169
- .map((charset) => charset.length)
170
- .reduce((previousLength, currentLength) => previousLength * currentLength);
171
- this.displayWordlist = this.wordsGenerated <= 100;
172
- this.wordlist$ = this.getWordlist();
173
- }
174
- }
175
- getWordlist() {
176
- return this.wordlistGenerator
177
- .generateWordlist(...this.filteredCharset)
178
- .pipe(reduce((wordlist, word) => `${wordlist}${this.prefix}${word}${this.suffix}\n`, ''), takeUntil(this.unsubscribe$));
179
- }
180
- filterCharset(charsets) {
181
- return charsets.map((charset) => this.removeDuplicates(charset));
182
- }
183
- parseWordlist(wordlist) {
184
- switch (this.fileType) {
185
- case FileType.plaintext:
186
- return toPlaintext(wordlist);
187
- case FileType.xml:
188
- return toXML(wordlist);
189
- }
190
- }
191
- removeCharset(i) {
192
- if (this.charsets && this.charsets.length > 1) {
193
- this.charsets.removeAt(i);
194
- }
195
- }
196
- }
197
- WordlistGeneratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: WordlistGeneratorService }], target: i0.ɵɵFactoryTarget.Component });
198
- WordlistGeneratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WordlistGeneratorComponent, selector: "wordlist-generator", inputs: { buttonStyle: "buttonStyle", dragStyle: "dragStyle", textStyle: "textStyle" }, ngImport: i0, template: "<div class=\"meta-container\" fxLayout=\"row wrap\">\n <div class=\"form-container\" fxLayout=\"column\" fxFlex>\n <div fxLayout=\"row wrap\">\n <button\n class=\"generate-wordlist\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n (click)=\"generateWordlist()\"\n >\n Generate wordlist\n </button>\n <button\n class=\"choose-format\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n [matMenuTriggerFor]=\"menu\"\n *ngIf=\"wordlist$\"\n >\n Choose format\n </button>\n <mat-menu #menu=\"matMenu\">\n <button\n [ngStyle]=\"buttonStyle\"\n mat-menu-item\n *ngFor=\"let type of fileTypes\"\n (click)=\"fileType = type\"\n >\n {{ type }}\n </button>\n </mat-menu>\n <button\n class=\"download-wordlist\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n *ngIf=\"wordlist$\"\n (click)=\"downloadWordlist()\"\n >\n Download as\n <ng-container *ngIf=\"this.fileType\">{{ this.fileType }}</ng-container>\n </button>\n </div>\n <form *ngIf=\"charsetForm\" [formGroup]=\"charsetForm\">\n <mat-form-field class=\"fixed-width\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">prefix (optional)</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"prefix\"\n formControlName=\"prefix\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </mat-form-field>\n <div formArrayName=\"charsets\">\n <div class=\"charset\"></div>\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div\n class=\"charset-container\"\n cdkDrag\n *ngFor=\"let charset of charsets?.controls; let i = index\"\n >\n <mat-icon class=\"drag-indicator\" [ngStyle]=\"dragStyle\"\n >drag_indicator</mat-icon\n >\n <mat-form-field class=\"charset\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">\n character set for string position {{ i }}\n </mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"position-{{ i }}\"\n [formControlName]=\"i\"\n (keydown.enter)=\"$event.preventDefault()\"\n required\n />\n </mat-form-field>\n <button\n mat-raised-button\n class=\"clone-charset\"\n [ngStyle]=\"buttonStyle\"\n (click)=\"cloneCharset(i)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n <button\n mat-raised-button\n class=\"remove-charset\"\n [ngStyle]=\"buttonStyle\"\n (click)=\"removeCharset(i)\"\n [disabled]=\"this.charsets?.value.length === 1\"\n >\n <mat-icon>remove</mat-icon>\n </button>\n <button\n mat-raised-button\n [ngStyle]=\"buttonStyle\"\n (click)=\"addCharset()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <mat-form-field class=\"fixed-width\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">suffix (optional)</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"suffix\"\n formControlName=\"suffix\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </mat-form-field>\n </form>\n </div>\n <div class=\"wordlist-container\" *ngIf=\"wordlist$\" fxLayout=\"column\" fxFlex>\n <ng-container *ngIf=\"displayWordlist; else wordlistTooLarge\">\n <h3 class=\"wordlist-header\">Generated wordlist:</h3>\n <code class=\"wordlist\">\n {{ wordlist$ | async }}\n </code></ng-container\n >\n <ng-template #wordlistTooLarge>\n The generated wordlist is too large to be displayed. You can still\n download it.\n </ng-template>\n </div>\n</div>\n", styles: [".meta-container{max-width:100vw}.meta-container .form-container{float:left}.meta-container .form-container .charset-container .drag-indicator{margin-right:10px}.meta-container .form-container .charset-container .clone-charset{margin:0 10px}.meta-container .form-container .charset-container .remove-charset{margin-right:10px}.meta-container .form-container .charset{width:18.875em}.meta-container .form-container .charset-container:not(:last-child) .add-charset{display:none}.meta-container .form-container .choose-format{margin:0 34px 10px;width:150px}.meta-container .form-container .generate-wordlist,.meta-container .form-container .download-wordlist{margin:0 0 10px;width:150px}.meta-container .wordlist-container{max-height:80vh}.meta-container .wordlist-container .wordlist-header{margin-top:0}.meta-container .wordlist-container .wordlist{margin-left:1em;overflow-wrap:normal;width:1%}.mat-menu-panel{width:150px}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.fixed-width{width:21em}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorComponent, decorators: [{
200
- type: Component,
201
- args: [{ selector: 'wordlist-generator', encapsulation: ViewEncapsulation.None, template: "<div class=\"meta-container\" fxLayout=\"row wrap\">\n <div class=\"form-container\" fxLayout=\"column\" fxFlex>\n <div fxLayout=\"row wrap\">\n <button\n class=\"generate-wordlist\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n (click)=\"generateWordlist()\"\n >\n Generate wordlist\n </button>\n <button\n class=\"choose-format\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n [matMenuTriggerFor]=\"menu\"\n *ngIf=\"wordlist$\"\n >\n Choose format\n </button>\n <mat-menu #menu=\"matMenu\">\n <button\n [ngStyle]=\"buttonStyle\"\n mat-menu-item\n *ngFor=\"let type of fileTypes\"\n (click)=\"fileType = type\"\n >\n {{ type }}\n </button>\n </mat-menu>\n <button\n class=\"download-wordlist\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n *ngIf=\"wordlist$\"\n (click)=\"downloadWordlist()\"\n >\n Download as\n <ng-container *ngIf=\"this.fileType\">{{ this.fileType }}</ng-container>\n </button>\n </div>\n <form *ngIf=\"charsetForm\" [formGroup]=\"charsetForm\">\n <mat-form-field class=\"fixed-width\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">prefix (optional)</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"prefix\"\n formControlName=\"prefix\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </mat-form-field>\n <div formArrayName=\"charsets\">\n <div class=\"charset\"></div>\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div\n class=\"charset-container\"\n cdkDrag\n *ngFor=\"let charset of charsets?.controls; let i = index\"\n >\n <mat-icon class=\"drag-indicator\" [ngStyle]=\"dragStyle\"\n >drag_indicator</mat-icon\n >\n <mat-form-field class=\"charset\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">\n character set for string position {{ i }}\n </mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"position-{{ i }}\"\n [formControlName]=\"i\"\n (keydown.enter)=\"$event.preventDefault()\"\n required\n />\n </mat-form-field>\n <button\n mat-raised-button\n class=\"clone-charset\"\n [ngStyle]=\"buttonStyle\"\n (click)=\"cloneCharset(i)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n <button\n mat-raised-button\n class=\"remove-charset\"\n [ngStyle]=\"buttonStyle\"\n (click)=\"removeCharset(i)\"\n [disabled]=\"this.charsets?.value.length === 1\"\n >\n <mat-icon>remove</mat-icon>\n </button>\n <button\n mat-raised-button\n [ngStyle]=\"buttonStyle\"\n (click)=\"addCharset()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <mat-form-field class=\"fixed-width\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">suffix (optional)</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"suffix\"\n formControlName=\"suffix\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </mat-form-field>\n </form>\n </div>\n <div class=\"wordlist-container\" *ngIf=\"wordlist$\" fxLayout=\"column\" fxFlex>\n <ng-container *ngIf=\"displayWordlist; else wordlistTooLarge\">\n <h3 class=\"wordlist-header\">Generated wordlist:</h3>\n <code class=\"wordlist\">\n {{ wordlist$ | async }}\n </code></ng-container\n >\n <ng-template #wordlistTooLarge>\n The generated wordlist is too large to be displayed. You can still\n download it.\n </ng-template>\n </div>\n</div>\n", styles: [".meta-container{max-width:100vw}.meta-container .form-container{float:left}.meta-container .form-container .charset-container .drag-indicator{margin-right:10px}.meta-container .form-container .charset-container .clone-charset{margin:0 10px}.meta-container .form-container .charset-container .remove-charset{margin-right:10px}.meta-container .form-container .charset{width:18.875em}.meta-container .form-container .charset-container:not(:last-child) .add-charset{display:none}.meta-container .form-container .choose-format{margin:0 34px 10px;width:150px}.meta-container .form-container .generate-wordlist,.meta-container .form-container .download-wordlist{margin:0 0 10px;width:150px}.meta-container .wordlist-container{max-height:80vh}.meta-container .wordlist-container .wordlist-header{margin-top:0}.meta-container .wordlist-container .wordlist{margin-left:1em;overflow-wrap:normal;width:1%}.mat-menu-panel{width:150px}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.fixed-width{width:21em}\n"] }]
202
- }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: WordlistGeneratorService }]; }, propDecorators: { buttonStyle: [{
203
- type: Input
204
- }], dragStyle: [{
205
- type: Input
206
- }], textStyle: [{
207
- type: Input
208
- }] } });
209
-
210
- class WordlistGeneratorModule {
211
- }
212
- WordlistGeneratorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
213
- WordlistGeneratorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorModule, declarations: [WordlistGeneratorComponent], imports: [CommonModule,
214
- BrowserModule,
215
- BrowserAnimationsModule,
216
- DragDropModule,
217
- ReactiveFormsModule,
218
- ClipboardModule,
219
- MatFormFieldModule,
220
- MatIconModule,
221
- MatInputModule,
222
- MatMenuModule,
223
- MatButtonModule], exports: [WordlistGeneratorComponent] });
224
- WordlistGeneratorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorModule, providers: [WordlistGeneratorService], imports: [CommonModule,
225
- BrowserModule,
226
- BrowserAnimationsModule,
227
- DragDropModule,
228
- ReactiveFormsModule,
229
- ClipboardModule,
230
- MatFormFieldModule,
231
- MatIconModule,
232
- MatInputModule,
233
- MatMenuModule,
234
- MatButtonModule] });
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WordlistGeneratorModule, decorators: [{
236
- type: NgModule,
237
- args: [{
238
- declarations: [WordlistGeneratorComponent],
239
- imports: [
240
- CommonModule,
241
- BrowserModule,
242
- BrowserAnimationsModule,
243
- DragDropModule,
244
- ReactiveFormsModule,
245
- ClipboardModule,
246
- MatFormFieldModule,
247
- MatIconModule,
248
- MatInputModule,
249
- MatMenuModule,
250
- MatButtonModule
251
- ],
252
- exports: [WordlistGeneratorComponent],
253
- providers: [WordlistGeneratorService]
254
- }]
255
- }] });
256
-
257
- /**
258
- * Generated bundle index. Do not edit.
259
- */
260
-
261
- export { WordlistGeneratorComponent, WordlistGeneratorModule };
262
- //# sourceMappingURL=tehw0lf-wordlist-generator.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tehw0lf-wordlist-generator.mjs","sources":["../../../../libs/wordlist-generator/src/lib/filetypes.ts","../../../../libs/wordlist-generator/src/lib/parsers.ts","../../../../libs/wordlist-generator/src/lib/wordlist-generator.service.ts","../../../../libs/wordlist-generator/src/lib/wordlist-generator.component.ts","../../../../libs/wordlist-generator/src/lib/wordlist-generator.component.html","../../../../libs/wordlist-generator/src/lib/wordlist-generator.module.ts","../../../../libs/wordlist-generator/src/tehw0lf-wordlist-generator.ts"],"sourcesContent":["/* eslint-disable no-shadow */\nexport enum FileType {\n plaintext = 'txt',\n xml = 'xml'\n}\n","export const toPlaintext = (\n wordlist: string\n): { wordlist: string; contentType: string } => ({\n wordlist,\n contentType: 'text/plain'\n});\n\nexport const toXML = (\n wordlist: string\n): { wordlist: string; contentType: string } => {\n const head = '<wordlist><word>';\n const glue = '</word><word>';\n const tail = '</word></wordlist>';\n return {\n wordlist: head + wordlist.replace(/\\n/g, glue) + tail,\n contentType: 'text/xml'\n };\n};\n","import { Injectable } from '@angular/core';\nimport { product } from 'cartesian-product-generator';\nimport { from, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WordlistGeneratorService {\n constructor() {\n //\n }\n\n generateWordlist(...charsets: string[]): Observable<string> {\n return from(product(...charsets)).pipe(\n map((word: string[]) => {\n return word.join('');\n })\n );\n }\n}\n","import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';\nimport { UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Observable, Subject } from 'rxjs';\nimport { reduce, takeUntil, tap } from 'rxjs/operators';\n\nimport { FileType } from './filetypes';\nimport { toPlaintext, toXML } from './parsers';\nimport { WordlistGeneratorService } from './wordlist-generator.service';\n\n/* eslint-disable @angular-eslint/component-selector */\n@Component({\n selector: 'wordlist-generator',\n templateUrl: './wordlist-generator.component.html',\n styleUrls: ['./wordlist-generator.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class WordlistGeneratorComponent implements OnInit, OnDestroy {\n @Input() buttonStyle = {\n 'background-color': '#333333',\n color: '#cc7832'\n };\n\n @Input() dragStyle = { color: '#cc7832' };\n @Input() textStyle = { color: '#cc7832' };\n\n charsetForm: UntypedFormGroup | undefined;\n wordsGenerated: number | undefined;\n wordlist$: Observable<string> | undefined;\n\n displayWordlist = false;\n fileType = FileType.plaintext;\n fileTypes = Object.values(FileType);\n filteredCharset: string[] = [];\n prefix = '';\n suffix = '';\n\n private unsubscribe$ = new Subject<void>();\n\n constructor(\n private formBuilder: UntypedFormBuilder,\n private wordlistGenerator: WordlistGeneratorService\n ) {}\n\n ngOnInit(): void {\n this.generateForm();\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n get charsets(): UntypedFormArray | undefined {\n if (this.charsetForm) {\n return this.charsetForm.get('charsets') as UntypedFormArray;\n }\n return undefined;\n }\n\n addCharset(): void {\n if (this.charsets) {\n this.charsets.push(this.formBuilder.control('', Validators.required));\n }\n }\n\n cloneCharset(index: number): void {\n if (this.charsets) {\n const charset = this.charsets.value[index];\n this.charsets.insert(\n index,\n this.formBuilder.control(charset, Validators.required)\n );\n }\n }\n\n downloadWordlist(): void {\n if (this.charsets) {\n if (this.filteredCharset !== this.filterCharset(this.charsets.value)) {\n this.generateWordlist();\n }\n const filename = `wordlist_${this.wordsGenerated}_words_${this.charsets.length}_positions.${this.fileType}`;\n this.getWordlist()\n .pipe(\n tap((wordlist: string) => {\n if (wordlist.length > 0) {\n const parsed = this.parseWordlist(wordlist);\n const file = new Blob([parsed.wordlist], {\n type: parsed.contentType\n });\n if ((window.navigator as any).msSaveOrOpenBlob) {\n (window.navigator as any).msSaveOrOpenBlob(file, filename);\n } else {\n const a = document.createElement('a');\n const url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n })\n )\n .subscribe();\n }\n }\n\n drop(event: CdkDragDrop<string[]>): void {\n if (this.charsets) {\n moveItemInArray(\n this.charsets.controls,\n event.previousIndex,\n event.currentIndex\n );\n this.charsets.updateValueAndValidity();\n }\n }\n\n generateForm(): void {\n this.charsetForm = this.formBuilder.group({\n charsets: this.formBuilder.array([\n this.formBuilder.control('', Validators.required)\n ]),\n prefix: this.formBuilder.control(''),\n suffix: this.formBuilder.control('')\n });\n }\n\n generateWordlist(): void {\n if (this.charsetForm && this.charsets && this.charsets.valid) {\n this.filteredCharset = this.filterCharset(this.charsets.value);\n this.prefix = this.charsetForm.get('prefix')?.value\n ? this.charsetForm.get('prefix')?.value\n : '';\n this.suffix = this.charsetForm.get('suffix')?.value\n ? this.charsetForm.get('suffix')?.value\n : '';\n\n this.wordsGenerated = this.filteredCharset\n .map((charset: string) => charset.length)\n .reduce(\n (previousLength: number, currentLength: number) =>\n previousLength * currentLength\n );\n this.displayWordlist = this.wordsGenerated <= 100;\n this.wordlist$ = this.getWordlist();\n }\n }\n\n getWordlist(): Observable<string> {\n return this.wordlistGenerator\n .generateWordlist(...this.filteredCharset)\n .pipe(\n reduce(\n (wordlist: string, word: string) =>\n `${wordlist}${this.prefix}${word}${this.suffix}\\n`,\n ''\n ),\n takeUntil(this.unsubscribe$)\n );\n }\n\n filterCharset(charsets: string[]): string[] {\n return charsets.map((charset: string) => this.removeDuplicates(charset));\n }\n\n parseWordlist(wordlist: string): { wordlist: string; contentType: string } {\n switch (this.fileType) {\n case FileType.plaintext:\n return toPlaintext(wordlist);\n case FileType.xml:\n return toXML(wordlist);\n }\n }\n\n removeCharset(i: number): void {\n if (this.charsets && this.charsets.length > 1) {\n this.charsets.removeAt(i);\n }\n }\n\n removeDuplicates = (unfiltered: string): string =>\n [...new Set(unfiltered)].join('');\n}\n","<div class=\"meta-container\" fxLayout=\"row wrap\">\n <div class=\"form-container\" fxLayout=\"column\" fxFlex>\n <div fxLayout=\"row wrap\">\n <button\n class=\"generate-wordlist\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n (click)=\"generateWordlist()\"\n >\n Generate wordlist\n </button>\n <button\n class=\"choose-format\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n [matMenuTriggerFor]=\"menu\"\n *ngIf=\"wordlist$\"\n >\n Choose format\n </button>\n <mat-menu #menu=\"matMenu\">\n <button\n [ngStyle]=\"buttonStyle\"\n mat-menu-item\n *ngFor=\"let type of fileTypes\"\n (click)=\"fileType = type\"\n >\n {{ type }}\n </button>\n </mat-menu>\n <button\n class=\"download-wordlist\"\n [ngStyle]=\"buttonStyle\"\n mat-raised-button\n *ngIf=\"wordlist$\"\n (click)=\"downloadWordlist()\"\n >\n Download as\n <ng-container *ngIf=\"this.fileType\">{{ this.fileType }}</ng-container>\n </button>\n </div>\n <form *ngIf=\"charsetForm\" [formGroup]=\"charsetForm\">\n <mat-form-field class=\"fixed-width\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">prefix (optional)</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"prefix\"\n formControlName=\"prefix\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </mat-form-field>\n <div formArrayName=\"charsets\">\n <div class=\"charset\"></div>\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div\n class=\"charset-container\"\n cdkDrag\n *ngFor=\"let charset of charsets?.controls; let i = index\"\n >\n <mat-icon class=\"drag-indicator\" [ngStyle]=\"dragStyle\"\n >drag_indicator</mat-icon\n >\n <mat-form-field class=\"charset\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">\n character set for string position {{ i }}\n </mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"position-{{ i }}\"\n [formControlName]=\"i\"\n (keydown.enter)=\"$event.preventDefault()\"\n required\n />\n </mat-form-field>\n <button\n mat-raised-button\n class=\"clone-charset\"\n [ngStyle]=\"buttonStyle\"\n (click)=\"cloneCharset(i)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n <button\n mat-raised-button\n class=\"remove-charset\"\n [ngStyle]=\"buttonStyle\"\n (click)=\"removeCharset(i)\"\n [disabled]=\"this.charsets?.value.length === 1\"\n >\n <mat-icon>remove</mat-icon>\n </button>\n <button\n mat-raised-button\n [ngStyle]=\"buttonStyle\"\n (click)=\"addCharset()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <mat-form-field class=\"fixed-width\" appearance=\"outline\">\n <mat-label [ngStyle]=\"textStyle\">suffix (optional)</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n type=\"text\"\n id=\"suffix\"\n formControlName=\"suffix\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </mat-form-field>\n </form>\n </div>\n <div class=\"wordlist-container\" *ngIf=\"wordlist$\" fxLayout=\"column\" fxFlex>\n <ng-container *ngIf=\"displayWordlist; else wordlistTooLarge\">\n <h3 class=\"wordlist-header\">Generated wordlist:</h3>\n <code class=\"wordlist\">\n {{ wordlist$ | async }}\n </code></ng-container\n >\n <ng-template #wordlistTooLarge>\n The generated wordlist is too large to be displayed. You can still\n download it.\n </ng-template>\n </div>\n</div>\n","import { ClipboardModule } from '@angular/cdk/clipboard';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nimport { WordlistGeneratorComponent } from './wordlist-generator.component';\nimport { WordlistGeneratorService } from './wordlist-generator.service';\n\n@NgModule({\n declarations: [WordlistGeneratorComponent],\n imports: [\n CommonModule,\n BrowserModule,\n BrowserAnimationsModule,\n DragDropModule,\n ReactiveFormsModule,\n ClipboardModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatMenuModule,\n MatButtonModule\n ],\n exports: [WordlistGeneratorComponent],\n providers: [WordlistGeneratorService]\n})\nexport class WordlistGeneratorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.WordlistGeneratorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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