Skip to content
Open
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
8 changes: 8 additions & 0 deletions openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion src/dba/models/TaskWrapperDisplay.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ class TaskWrapperDisplay extends AbstractModel {
private ?string $hashlistName;
private ?int $hashCount;
private ?int $hashlistCracked;
private ?int $hashlistIsSecret;
private ?int $hashTypeId;
private ?string $hashTypeDescription;
private ?string $groupName;

function __construct(?int $taskWrapperId, ?int $taskWrapperPriority, ?int $taskWrapperMaxAgents, ?int $taskType, ?int $hashlistId, ?int $accessGroupId, ?string $taskWrapperName, ?string $displayName, ?int $taskWrapperIsArchived, ?int $cracked, ?int $taskId, ?string $taskName, ?string $color, ?string $attackCmd, ?int $chunkTime, ?int $statusTimer, ?int $keyspace, ?int $keyspaceProgress, ?int $taskPriority, ?int $taskMaxAgents, ?int $isSmall, ?int $isCpuTask, ?int $taskIsArchived, ?int $taskUsePreprocessor, ?string $hashlistName, ?int $hashCount, ?int $hashlistCracked, ?int $hashTypeId, ?string $hashTypeDescription, ?string $groupName) {
function __construct(?int $taskWrapperId, ?int $taskWrapperPriority, ?int $taskWrapperMaxAgents, ?int $taskType, ?int $hashlistId, ?int $accessGroupId, ?string $taskWrapperName, ?string $displayName, ?int $taskWrapperIsArchived, ?int $cracked, ?int $taskId, ?string $taskName, ?string $color, ?string $attackCmd, ?int $chunkTime, ?int $statusTimer, ?int $keyspace, ?int $keyspaceProgress, ?int $taskPriority, ?int $taskMaxAgents, ?int $isSmall, ?int $isCpuTask, ?int $taskIsArchived, ?int $taskUsePreprocessor, ?string $hashlistName, ?int $hashCount, ?int $hashlistCracked, ?int $hashlistIsSecret, ?int $hashTypeId, ?string $hashTypeDescription, ?string $groupName) {
$this->taskWrapperId = $taskWrapperId;
$this->taskWrapperPriority = $taskWrapperPriority;
$this->taskWrapperMaxAgents = $taskWrapperMaxAgents;
Expand Down Expand Up @@ -64,6 +65,7 @@ function __construct(?int $taskWrapperId, ?int $taskWrapperPriority, ?int $taskW
$this->hashlistName = $hashlistName;
$this->hashCount = $hashCount;
$this->hashlistCracked = $hashlistCracked;
$this->hashlistIsSecret = $hashlistIsSecret;
$this->hashTypeId = $hashTypeId;
$this->hashTypeDescription = $hashTypeDescription;
$this->groupName = $groupName;
Expand Down Expand Up @@ -98,6 +100,7 @@ function getKeyValueDict(): array {
$dict['hashlistName'] = $this->hashlistName;
$dict['hashCount'] = $this->hashCount;
$dict['hashlistCracked'] = $this->hashlistCracked;
$dict['hashlistIsSecret'] = $this->hashlistIsSecret;
$dict['hashTypeId'] = $this->hashTypeId;
$dict['hashTypeDescription'] = $this->hashTypeDescription;
$dict['groupName'] = $this->groupName;
Expand Down Expand Up @@ -134,6 +137,7 @@ static function getFeatures(): array {
$dict['hashlistName'] = ['read_only' => True, "type" => "str(100)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "hashlistName", "public" => False, "dba_mapping" => False];
$dict['hashCount'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "hashCount", "public" => False, "dba_mapping" => False];
$dict['hashlistCracked'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "hashlistCracked", "public" => False, "dba_mapping" => False];
$dict['hashlistIsSecret'] = ['read_only' => True, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "hashlistIsSecret", "public" => False, "dba_mapping" => False];
$dict['hashTypeId'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "hashTypeId", "public" => False, "dba_mapping" => False];
$dict['hashTypeDescription'] = ['read_only' => True, "type" => "str(256)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "hashTypeDescription", "public" => False, "dba_mapping" => False];
$dict['groupName'] = ['read_only' => True, "type" => "str(50)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "groupName", "public" => False, "dba_mapping" => False];
Expand Down Expand Up @@ -373,6 +377,14 @@ function setHashlistCracked(?int $hashlistCracked): void {
$this->hashlistCracked = $hashlistCracked;
}

function getHashlistIsSecret(): ?int {
return $this->hashlistIsSecret;
}

function setHashlistIsSecret(?int $hashlistIsSecret): void {
$this->hashlistIsSecret = $hashlistIsSecret;
}

function getHashTypeId(): ?int {
return $this->hashTypeId;
}
Expand Down Expand Up @@ -424,6 +436,7 @@ function setGroupName(?string $groupName): void {
const HASHLIST_NAME = "hashlistName";
const HASH_COUNT = "hashCount";
const HASHLIST_CRACKED = "hashlistCracked";
const HASHLIST_IS_SECRET = "hashlistIsSecret";
const HASH_TYPE_ID = "hashTypeId";
const HASH_TYPE_DESCRIPTION = "hashTypeDescription";
const GROUP_NAME = "groupName";
Expand Down
4 changes: 2 additions & 2 deletions src/dba/models/TaskWrapperDisplayFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function getCacheValidTime(): int {
* @return TaskWrapperDisplay
*/
function getNullObject(): TaskWrapperDisplay {
return new TaskWrapperDisplay(-1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
return new TaskWrapperDisplay(-1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
}

/**
Expand All @@ -45,6 +45,6 @@ function createObjectFromDict(array $dict): TaskWrapperDisplay {
$conv[strtolower($key)] = $val;
}
$dict = $conv;
return new TaskWrapperDisplay($dict['taskwrapperid'], $dict['taskwrapperpriority'], $dict['taskwrappermaxagents'], $dict['tasktype'], $dict['hashlistid'], $dict['accessgroupid'], $dict['taskwrappername'], $dict['displayname'], $dict['taskwrapperisarchived'], $dict['cracked'], $dict['taskid'], $dict['taskname'], $dict['color'], $dict['attackcmd'], $dict['chunktime'], $dict['statustimer'], $dict['keyspace'], $dict['keyspaceprogress'], $dict['taskpriority'], $dict['taskmaxagents'], $dict['issmall'], $dict['iscputask'], $dict['taskisarchived'], $dict['taskusepreprocessor'], $dict['hashlistname'], $dict['hashcount'], $dict['hashlistcracked'], $dict['hashtypeid'], $dict['hashtypedescription'], $dict['groupname']);
return new TaskWrapperDisplay($dict['taskwrapperid'], $dict['taskwrapperpriority'], $dict['taskwrappermaxagents'], $dict['tasktype'], $dict['hashlistid'], $dict['accessgroupid'], $dict['taskwrappername'], $dict['displayname'], $dict['taskwrapperisarchived'], $dict['cracked'], $dict['taskid'], $dict['taskname'], $dict['color'], $dict['attackcmd'], $dict['chunktime'], $dict['statustimer'], $dict['keyspace'], $dict['keyspaceprogress'], $dict['taskpriority'], $dict['taskmaxagents'], $dict['issmall'], $dict['iscputask'], $dict['taskisarchived'], $dict['taskusepreprocessor'], $dict['hashlistname'], $dict['hashcount'], $dict['hashlistcracked'], $dict['hashlistissecret'], $dict['hashtypeid'], $dict['hashtypedescription'], $dict['groupname']);
}
}
1 change: 1 addition & 0 deletions src/dba/models/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@
['name' => 'hashlistName', 'read_only' => True, 'type' => 'str(100)', 'protected' => True],
['name' => 'hashCount', 'read_only' => True, 'type' => 'int', 'protected' => True],
['name' => 'hashlistCracked', 'read_only' => True, 'type' => 'int', 'protected' => True],
['name' => 'hashlistIsSecret', 'read_only' => True, 'type' => 'bool'],
['name' => 'hashTypeId', 'read_only' => True, 'type' => 'int', 'protected' => True],
['name' => 'hashTypeDescription', 'read_only' => True, 'type' => 'str(256)', 'protected' => True],
['name' => 'groupName', 'read_only' => True, 'type' => 'str(50)', 'protected' => True],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE OR REPLACE VIEW TaskWrapperDisplay AS SELECT
tw.taskWrapperId AS taskWrapperId, tw.priority AS taskWrapperPriority, tw.maxAgents AS taskWrapperMaxAgents,
tw.taskType AS taskType, tw.hashlistId AS hashlistId, tw.accessGroupId AS accessGroupId,
tw.taskWrapperName AS taskWrapperName, tw.isArchived AS taskWrapperIsArchived, tw.cracked AS cracked,
t.taskId AS taskId, t.taskName AS taskName, t.attackCmd AS attackCmd, t.chunkTime AS chunkTime,
t.statusTimer AS statusTimer, t.keyspace AS keyspace, t.keyspaceProgress AS keyspaceProgress,
t.priority AS taskPriority, t.maxAgents AS taskMaxAgents, t.isArchived AS taskIsArchived,
t.isSmall AS isSmall, t.isCpuTask AS isCpuTask, t.usePreprocessor AS taskUsePreprocessor,
CASE WHEN tw.taskType = 0 THEN t.taskName ELSE tw.taskWrapperName END AS displayName,
h.hashlistName AS hashlistName, h.hashCount AS hashCount, h.cracked as hashlistCracked,
ht.hashTypeId AS hashTypeId, ht.description AS hashTypeDescription, ag.groupName AS groupName,
t.color AS color, h.isSecret AS hashlistIsSecret
FROM TaskWrapper tw
LEFT JOIN Task t ON tw.taskType = 0 AND t.taskWrapperId = tw.taskWrapperId
INNER JOIN Hashlist h ON tw.hashlistId = h.hashlistId
INNER JOIN HashType ht on h.hashTypeId = ht.hashTypeId
INNER JOIN AccessGroup ag on tw.accessGroupId = ag.accessGroupId;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE OR REPLACE VIEW TaskWrapperDisplay AS SELECT
tw.taskWrapperId AS taskWrapperId, tw.priority AS taskWrapperPriority, tw.maxAgents AS taskWrapperMaxAgents,
tw.taskType AS taskType, tw.hashlistId AS hashlistId, tw.accessGroupId AS accessGroupId,
tw.taskWrapperName AS taskWrapperName, tw.isArchived AS taskWrapperIsArchived, tw.cracked AS cracked,
t.taskId AS taskId, t.taskName AS taskName, t.attackCmd AS attackCmd, t.chunkTime AS chunkTime,
t.statusTimer AS statusTimer, t.keyspace AS keyspace, t.keyspaceProgress AS keyspaceProgress,
t.priority AS taskPriority, t.maxAgents AS taskMaxAgents, t.isArchived AS taskIsArchived,
t.isSmall AS isSmall, t.isCpuTask AS isCpuTask, t.usePreprocessor AS taskUsePreprocessor,
CASE WHEN tw.taskType = 0 THEN t.taskName ELSE tw.taskWrapperName END AS displayName,
h.hashlistName AS hashlistName, h.hashCount AS hashCount, h.cracked as hashlistCracked,
ht.hashTypeId AS hashTypeId, ht.description AS hashTypeDescription, ag.groupName AS groupName,
t.color AS color, h.isSecret AS hashlistIsSecret
FROM TaskWrapper tw
LEFT JOIN Task t ON tw.taskType = 0 AND t.taskWrapperId = tw.taskWrapperId
INNER JOIN Hashlist h ON tw.hashlistId = h.hashlistId
INNER JOIN HashType ht on h.hashTypeId = ht.hashTypeId
INNER JOIN AccessGroup ag on tw.accessGroupId = ag.accessGroupId;