Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<grid-main>
<app-page-subtitle [subtitle]="'Health Check'"></app-page-subtitle>
<div fxLayout="row wrap" fxLayoutAlign="start center" fxLayoutGap="10px">
<simulate-form-field label="Created" message="{{ formatUnixTimestamp(healthc.time, this.dateFormat) }}"></simulate-form-field>
<simulate-form-field label="Created" message="{{ healthc.status | HCstatus | lowercase | titlecase }}"></simulate-form-field>
<simulate-form-field label="Created" message="{{ formatUnixTimestamp(healthc?.time, this.dateFormat) }}"></simulate-form-field>
<simulate-form-field label="Created" message="{{ healthc?.status | HCstatus | lowercase | titlecase }}"></simulate-form-field>
</div>
</grid-main>

Expand Down
12 changes: 6 additions & 6 deletions src/app/hashlists/edit-hashlist/edit-hashlist.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</div>
</div>
<div fxLayout="row wrap" fxLayoutAlign="start center" fxLayoutGap="10px">
<simulate-form-field label="Hash Type" message="{{ hashtype.id }} - {{ hashtype.description }}"></simulate-form-field>
<simulate-form-field label="Using hashcat brain" [message]="editedHashlist.useBrain ? 'Yes' : 'No'">
<simulate-form-field label="Hash Type" message="{{ hashtype?.id }} - {{ hashtype?.description }}"></simulate-form-field>
<simulate-form-field label="Using hashcat brain" [message]="editedHashlist?.useBrain ? 'Yes' : 'No'">
</simulate-form-field>
<input-text title="Format" formControlName="format"></input-text>
<input-text title="Hashes" formControlName="hashCount"></input-text>
Expand All @@ -36,13 +36,13 @@
<div fxLayout="row" fxLayoutGap="5px">
<grid-buttons>
<button-submit [name]="'Import pre-cracked hashes'" (click)="importCrackedHashes()"></button-submit>
<button-submit *ngIf="editedHashlist.cracked > 0" [name]="'Generate Wordlist'" (click)="exportWordlist()"></button-submit>
<button-submit *ngIf="editedHashlist.cracked > 0" [name]="'Export Left Hashes'" (click)="exportLeftHashes()"></button-submit>
<button-submit *ngIf="editedHashlist?.cracked > 0" [name]="'Generate Wordlist'" (click)="exportWordlist()"></button-submit>
<button-submit *ngIf="editedHashlist?.cracked > 0" [name]="'Export Left Hashes'" (click)="exportLeftHashes()"></button-submit>
</grid-buttons>
</div>
<br *ngIf="editedHashlist.cracked > 0">
<br *ngIf="editedHashlist?.cracked > 0">

<mat-accordion *ngIf="editedHashlist.cracked > 0">
<mat-accordion *ngIf="editedHashlist?.cracked > 0">
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
},
{
label: 'Bug Report / Enhancement',
routerLink: ['https://github.com/h1ashtopolis/server/issues/new/choose'],
routerLink: ['https://github.com/hashtopolis/server/issues/new/choose'],
icon: 'faGithub',
external: true
},
Expand Down
41 changes: 17 additions & 24 deletions src/app/shared/report-builder/datasources/hashlists.datasource.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { catchError, finalize, of } from 'rxjs';
import { SERV } from 'src/app/core/_services/main.config';
import { Hashlist } from 'src/app/hashlists/hashlist.model';

import { JHashlist } from '@models/hashlist.model';
import { JTask } from '@models/task.model';

import { JsonAPISerializer } from '@services/api/serializer-service';

import { ReportBaseDataSource } from './base.datasource';
import { Hashlist } from 'src/app/hashlists/hashlist.model';
import { SERV } from 'src/app/core/_services/main.config';

export class HashlistReportDataSource extends ReportBaseDataSource<Hashlist> {
private _hashlistId = 0;
Expand All @@ -25,7 +30,10 @@ export class HashlistReportDataSource extends ReportBaseDataSource<Hashlist> {
finalize(() => (this.loading = false))
)
.subscribe((response) => {
const res = this.getReport(response);
const responseBody = { data: response.data, included: response.included };
const hashlist = new JsonAPISerializer().deserialize<JHashlist>(responseBody);

const res = this.getReport(hashlist);
this.setData(res);
})
);
Expand All @@ -40,7 +48,7 @@ export class HashlistReportDataSource extends ReportBaseDataSource<Hashlist> {
const workflow = [];
let preCommand;
const files = [];
data['tasks'].forEach((item) => {
data.tasks.forEach((item: JTask) => {
if (item.keyspace && typeof item.keyspace === 'number') {
sum += item.keyspace;
}
Expand All @@ -66,10 +74,9 @@ export class HashlistReportDataSource extends ReportBaseDataSource<Hashlist> {
...preCommand,
ul: [
{
text: `Keyspace: ${item.keyspace} (Progress: ${(
(item.keyspaceProgress / item.keyspace) *
100
).toFixed(2)}%)`,
text: `Keyspace: ${item.keyspace} (Progress: ${((item.keyspaceProgress / item.keyspace) * 100).toFixed(
2
)}%)`,
margin: [0, 0, 0, 5]
},
// TODO implement Cracked entries for each task
Expand All @@ -86,22 +93,8 @@ export class HashlistReportDataSource extends ReportBaseDataSource<Hashlist> {
{
title: 'Input Fields',
table: {
tableColumns: [
'Name',
'Notes',
'Hash Mode',
'Hash Count',
'Retrieved',
'Total Keyspace explored'
],
tableValues: [
data.name,
data.notes,
data.hashType.hashTypeId,
data.hashCount,
data.cracked,
sum
]
tableColumns: ['Name', 'Notes', 'Hash Mode', 'Hash Count', 'Retrieved', 'Total Keyspace explored'],
tableValues: [data.name, data.notes, data.hashTypeId, data.hashCount, data.cracked, sum]
}
},
{ break: 1 },
Expand Down