-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathTask.php
More file actions
357 lines (296 loc) · 14.7 KB
/
Task.php
File metadata and controls
357 lines (296 loc) · 14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<?php
namespace Hashtopolis\dba\models;
use Hashtopolis\dba\AbstractModel;
class Task extends AbstractModel {
private ?int $taskId;
private ?string $taskName;
private ?string $attackCmd;
private ?int $chunkTime;
private ?int $statusTimer;
private ?int $keyspace;
private ?int $keyspaceProgress;
private ?int $priority;
private ?int $maxAgents;
private ?string $color;
private ?int $isSmall;
private ?int $isCpuTask;
private ?int $useNewBench;
private ?int $skipKeyspace;
private ?int $crackerBinaryId;
private ?int $crackerBinaryTypeId;
private ?int $taskWrapperId;
private ?int $isArchived;
private ?string $notes;
private ?int $staticChunks;
private ?int $chunkSize;
private ?int $forcePipe;
private ?int $usePreprocessor;
private ?string $preprocessorCommand;
function __construct(?int $taskId, ?string $taskName, ?string $attackCmd, ?int $chunkTime, ?int $statusTimer, ?int $keyspace, ?int $keyspaceProgress, ?int $priority, ?int $maxAgents, ?string $color, ?int $isSmall, ?int $isCpuTask, ?int $useNewBench, ?int $skipKeyspace, ?int $crackerBinaryId, ?int $crackerBinaryTypeId, ?int $taskWrapperId, ?int $isArchived, ?string $notes, ?int $staticChunks, ?int $chunkSize, ?int $forcePipe, ?int $usePreprocessor, ?string $preprocessorCommand) {
$this->taskId = $taskId;
$this->taskName = $taskName;
$this->attackCmd = $attackCmd;
$this->chunkTime = $chunkTime;
$this->statusTimer = $statusTimer;
$this->keyspace = $keyspace;
$this->keyspaceProgress = $keyspaceProgress;
$this->priority = $priority;
$this->maxAgents = $maxAgents;
$this->color = $color;
$this->isSmall = $isSmall;
$this->isCpuTask = $isCpuTask;
$this->useNewBench = $useNewBench;
$this->skipKeyspace = $skipKeyspace;
$this->crackerBinaryId = $crackerBinaryId;
$this->crackerBinaryTypeId = $crackerBinaryTypeId;
$this->taskWrapperId = $taskWrapperId;
$this->isArchived = $isArchived;
$this->notes = $notes;
$this->staticChunks = $staticChunks;
$this->chunkSize = $chunkSize;
$this->forcePipe = $forcePipe;
$this->usePreprocessor = $usePreprocessor;
$this->preprocessorCommand = $preprocessorCommand;
}
function getKeyValueDict(): array {
$dict = array();
$dict['taskId'] = $this->taskId;
$dict['taskName'] = $this->taskName;
$dict['attackCmd'] = $this->attackCmd;
$dict['chunkTime'] = $this->chunkTime;
$dict['statusTimer'] = $this->statusTimer;
$dict['keyspace'] = $this->keyspace;
$dict['keyspaceProgress'] = $this->keyspaceProgress;
$dict['priority'] = $this->priority;
$dict['maxAgents'] = $this->maxAgents;
$dict['color'] = $this->color;
$dict['isSmall'] = $this->isSmall;
$dict['isCpuTask'] = $this->isCpuTask;
$dict['useNewBench'] = $this->useNewBench;
$dict['skipKeyspace'] = $this->skipKeyspace;
$dict['crackerBinaryId'] = $this->crackerBinaryId;
$dict['crackerBinaryTypeId'] = $this->crackerBinaryTypeId;
$dict['taskWrapperId'] = $this->taskWrapperId;
$dict['isArchived'] = $this->isArchived;
$dict['notes'] = $this->notes;
$dict['staticChunks'] = $this->staticChunks;
$dict['chunkSize'] = $this->chunkSize;
$dict['forcePipe'] = $this->forcePipe;
$dict['usePreprocessor'] = $this->usePreprocessor;
$dict['preprocessorCommand'] = $this->preprocessorCommand;
return $dict;
}
static function getFeatures(): array {
$dict = array();
$dict['taskId'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => True, "protected" => True, "private" => False, "alias" => "taskId", "public" => False, "dba_mapping" => False];
$dict['taskName'] = ['read_only' => False, "type" => "str(256)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "taskName", "public" => False, "dba_mapping" => False];
$dict['attackCmd'] = ['read_only' => False, "type" => "str(65535)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "attackCmd", "public" => False, "dba_mapping" => False];
$dict['chunkTime'] = ['read_only' => False, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "chunkTime", "public" => False, "dba_mapping" => False];
$dict['statusTimer'] = ['read_only' => False, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "statusTimer", "public" => False, "dba_mapping" => False];
$dict['keyspace'] = ['read_only' => True, "type" => "int64", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "keyspace", "public" => False, "dba_mapping" => False];
$dict['keyspaceProgress'] = ['read_only' => True, "type" => "int64", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "keyspaceProgress", "public" => False, "dba_mapping" => False];
$dict['priority'] = ['read_only' => False, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "priority", "public" => False, "dba_mapping" => False];
$dict['maxAgents'] = ['read_only' => False, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "maxAgents", "public" => False, "dba_mapping" => False];
$dict['color'] = ['read_only' => False, "type" => "str(50)", "subtype" => "unset", "choices" => "unset", "null" => True, "pk" => False, "protected" => False, "private" => False, "alias" => "color", "public" => False, "dba_mapping" => False];
$dict['isSmall'] = ['read_only' => False, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "isSmall", "public" => False, "dba_mapping" => False];
$dict['isCpuTask'] = ['read_only' => False, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "isCpuTask", "public" => False, "dba_mapping" => False];
$dict['useNewBench'] = ['read_only' => True, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "useNewBench", "public" => False, "dba_mapping" => False];
$dict['skipKeyspace'] = ['read_only' => True, "type" => "int64", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "skipKeyspace", "public" => False, "dba_mapping" => False];
$dict['crackerBinaryId'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "crackerBinaryId", "public" => False, "dba_mapping" => False];
$dict['crackerBinaryTypeId'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => True, "pk" => False, "protected" => False, "private" => False, "alias" => "crackerBinaryTypeId", "public" => False, "dba_mapping" => False];
$dict['taskWrapperId'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => True, "private" => False, "alias" => "taskWrapperId", "public" => False, "dba_mapping" => False];
$dict['isArchived'] = ['read_only' => False, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "isArchived", "public" => False, "dba_mapping" => False];
$dict['notes'] = ['read_only' => False, "type" => "str(65535)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "notes", "public" => False, "dba_mapping" => False];
$dict['staticChunks'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "staticChunks", "public" => False, "dba_mapping" => False];
$dict['chunkSize'] = ['read_only' => True, "type" => "int64", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "chunkSize", "public" => False, "dba_mapping" => False];
$dict['forcePipe'] = ['read_only' => True, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "forcePipe", "public" => False, "dba_mapping" => False];
$dict['usePreprocessor'] = ['read_only' => True, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "preprocessorId", "public" => False, "dba_mapping" => False];
$dict['preprocessorCommand'] = ['read_only' => True, "type" => "str(256)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "preprocessorCommand", "public" => False, "dba_mapping" => False];
return $dict;
}
function getPrimaryKey(): string {
return "taskId";
}
function getPrimaryKeyValue(): ?int {
return $this->taskId;
}
function getId(): ?int {
return $this->taskId;
}
function setId($id): void {
$this->taskId = $id;
}
/**
* Used to serialize the data contained in the model
* @return array
*/
public function expose(): array {
return get_object_vars($this);
}
function getTaskName(): ?string {
return $this->taskName;
}
function setTaskName(?string $taskName): void {
$this->taskName = $taskName;
}
function getAttackCmd(): ?string {
return $this->attackCmd;
}
function setAttackCmd(?string $attackCmd): void {
$this->attackCmd = $attackCmd;
}
function getChunkTime(): ?int {
return $this->chunkTime;
}
function setChunkTime(?int $chunkTime): void {
$this->chunkTime = $chunkTime;
}
function getStatusTimer(): ?int {
return $this->statusTimer;
}
function setStatusTimer(?int $statusTimer): void {
$this->statusTimer = $statusTimer;
}
function getKeyspace(): ?int {
return $this->keyspace;
}
function setKeyspace(?int $keyspace): void {
$this->keyspace = $keyspace;
}
function getKeyspaceProgress(): ?int {
return $this->keyspaceProgress;
}
function setKeyspaceProgress(?int $keyspaceProgress): void {
$this->keyspaceProgress = $keyspaceProgress;
}
function getPriority(): ?int {
return $this->priority;
}
function setPriority(?int $priority): void {
$this->priority = $priority;
}
function getMaxAgents(): ?int {
return $this->maxAgents;
}
function setMaxAgents(?int $maxAgents): void {
$this->maxAgents = $maxAgents;
}
function getColor(): ?string {
return $this->color;
}
function setColor(?string $color): void {
$this->color = $color;
}
function getIsSmall(): ?int {
return $this->isSmall;
}
function setIsSmall(?int $isSmall): void {
$this->isSmall = $isSmall;
}
function getIsCpuTask(): ?int {
return $this->isCpuTask;
}
function setIsCpuTask(?int $isCpuTask): void {
$this->isCpuTask = $isCpuTask;
}
function getUseNewBench(): ?int {
return $this->useNewBench;
}
function setUseNewBench(?int $useNewBench): void {
$this->useNewBench = $useNewBench;
}
function getSkipKeyspace(): ?int {
return $this->skipKeyspace;
}
function setSkipKeyspace(?int $skipKeyspace): void {
$this->skipKeyspace = $skipKeyspace;
}
function getCrackerBinaryId(): ?int {
return $this->crackerBinaryId;
}
function setCrackerBinaryId(?int $crackerBinaryId): void {
$this->crackerBinaryId = $crackerBinaryId;
}
function getCrackerBinaryTypeId(): ?int {
return $this->crackerBinaryTypeId;
}
function setCrackerBinaryTypeId(?int $crackerBinaryTypeId): void {
$this->crackerBinaryTypeId = $crackerBinaryTypeId;
}
function getTaskWrapperId(): ?int {
return $this->taskWrapperId;
}
function setTaskWrapperId(?int $taskWrapperId): void {
$this->taskWrapperId = $taskWrapperId;
}
function getIsArchived(): ?int {
return $this->isArchived;
}
function setIsArchived(?int $isArchived): void {
$this->isArchived = $isArchived;
}
function getNotes(): ?string {
return $this->notes;
}
function setNotes(?string $notes): void {
$this->notes = $notes;
}
function getStaticChunks(): ?int {
return $this->staticChunks;
}
function setStaticChunks(?int $staticChunks): void {
$this->staticChunks = $staticChunks;
}
function getChunkSize(): ?int {
return $this->chunkSize;
}
function setChunkSize(?int $chunkSize): void {
$this->chunkSize = $chunkSize;
}
function getForcePipe(): ?int {
return $this->forcePipe;
}
function setForcePipe(?int $forcePipe): void {
$this->forcePipe = $forcePipe;
}
function getUsePreprocessor(): ?int {
return $this->usePreprocessor;
}
function setUsePreprocessor(?int $usePreprocessor): void {
$this->usePreprocessor = $usePreprocessor;
}
function getPreprocessorCommand(): ?string {
return $this->preprocessorCommand;
}
function setPreprocessorCommand(?string $preprocessorCommand): void {
$this->preprocessorCommand = $preprocessorCommand;
}
const TASK_ID = "taskId";
const TASK_NAME = "taskName";
const ATTACK_CMD = "attackCmd";
const CHUNK_TIME = "chunkTime";
const STATUS_TIMER = "statusTimer";
const KEYSPACE = "keyspace";
const KEYSPACE_PROGRESS = "keyspaceProgress";
const PRIORITY = "priority";
const MAX_AGENTS = "maxAgents";
const COLOR = "color";
const IS_SMALL = "isSmall";
const IS_CPU_TASK = "isCpuTask";
const USE_NEW_BENCH = "useNewBench";
const SKIP_KEYSPACE = "skipKeyspace";
const CRACKER_BINARY_ID = "crackerBinaryId";
const CRACKER_BINARY_TYPE_ID = "crackerBinaryTypeId";
const TASK_WRAPPER_ID = "taskWrapperId";
const IS_ARCHIVED = "isArchived";
const NOTES = "notes";
const STATIC_CHUNKS = "staticChunks";
const CHUNK_SIZE = "chunkSize";
const FORCE_PIPE = "forcePipe";
const USE_PREPROCESSOR = "usePreprocessor";
const PREPROCESSOR_COMMAND = "preprocessorCommand";
const PERM_CREATE = "permTaskCreate";
const PERM_READ = "permTaskRead";
const PERM_UPDATE = "permTaskUpdate";
const PERM_DELETE = "permTaskDelete";
}