Skip to content

Commit 912a92e

Browse files
author
gluafamichl
committed
Mod: change cmdPars in Agent table to text (str(65535))
1 parent 2de890b commit 912a92e

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/dba/models/Agent.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static function getFeatures() {
6868
$dict['uid'] = ['read_only' => False, "type" => "str(100)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "uid"];
6969
$dict['os'] = ['read_only' => False, "type" => "int", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "os"];
7070
$dict['devices'] = ['read_only' => False, "type" => "str(65535)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "devices"];
71-
$dict['cmdPars'] = ['read_only' => False, "type" => "str(256)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "cmdPars"];
71+
$dict['cmdPars'] = ['read_only' => False, "type" => "str(65535)", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "cmdPars"];
7272
$dict['ignoreErrors'] = ['read_only' => False, "type" => "int", "subtype" => "unset", "choices" => [0 => "Deactivate agent on error", 1 => "Keep agent running, but save errors", 2 => "Keep agent running and discard errors", ], "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "ignoreErrors"];
7373
$dict['isActive'] = ['read_only' => False, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "isActive"];
7474
$dict['isTrusted'] = ['read_only' => False, "type" => "bool", "subtype" => "unset", "choices" => "unset", "null" => False, "pk" => False, "protected" => False, "private" => False, "alias" => "isTrusted"];

src/dba/models/generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
['name' => 'uid', 'read_only' => False, 'type' => 'str(100)'],
5757
['name' => 'os', 'read_only' => False, 'type' => 'int'],
5858
['name' => 'devices', 'read_only' => False, 'type' => 'str(65535)'],
59-
['name' => 'cmdPars', 'read_only' => False, 'type' => 'str(256)'],
59+
['name' => 'cmdPars', 'read_only' => False, 'type' => 'str(65535)'],
6060
['name' => 'ignoreErrors', 'read_only' => False, 'type' => 'int', 'choices' => $FieldIgnoreErrorsChoices],
6161
['name' => 'isActive', 'read_only' => False, 'type' => 'bool'],
6262
['name' => 'isTrusted', 'read_only' => False, 'type' => 'bool'],

src/install/hashtopolis.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CREATE TABLE `Agent` (
3131
`uid` VARCHAR(100) NOT NULL,
3232
`os` INT(11) NOT NULL,
3333
`devices` TEXT NOT NULL,
34-
`cmdPars` VARCHAR(256) NOT NULL,
34+
`cmdPars` TEXT NOT NULL,
3535
`ignoreErrors` TINYINT(4) NOT NULL,
3636
`isActive` TINYINT(4) NOT NULL,
3737
`isTrusted` TINYINT(4) NOT NULL,

src/install/updates/update_v0.14.2_v0.14.x.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Task` MODIFY `attackCmd` TEXT NOT NULL;");
77
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Pretask` MODIFY `attackCmd` TEXT NOT NULL;");
88
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `HealthCheck` MODIFY `attackCmd` TEXT NOT NULL;");
9+
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` MODIFY `cmdPars` TEXT NOT NULL;");
910
$EXECUTED["v0.14.x_attackCmd"] = true;
1011
}

0 commit comments

Comments
 (0)