diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml
index d178841..51ff5e3 100644
--- a/.github/workflows/lint-and-test.yml
+++ b/.github/workflows/lint-and-test.yml
@@ -27,4 +27,4 @@ jobs:
- name: Run ESLint
run: yarn lint
- name: Run Prettier
- run: yarn format --check
+ run: yarn format:check
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e90fd3e..3c454f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [2.7.3] - 2024-02-22
+
+### Added
+
+- Added buttons to reload sysinfo to agents pages
+- Add info button on View tab to clarify what options do
+
+### Changed
+
+- Removed extra space being added in front of Task Input and Output by append/prepend new line
+- Changed default sort on agents page to be "first seen" instead of "last seen"
+
## [2.7.2] - 2024-01-31
### Fixed
@@ -349,7 +361,9 @@ Including but not limited to:
- Initial Release
-[Unreleased]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.7.2...HEAD
+[Unreleased]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.7.3...HEAD
+
+[2.7.3]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.7.2...v2.7.3
[2.7.2]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.7.1...v2.7.2
diff --git a/package.json b/package.json
index 797e246..eaa5e5d 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,14 @@
{
"name": "starkiller",
- "version": "2.7.2",
+ "version": "2.7.3",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
- "format": "prettier . --write"
+ "format": "prettier . --write",
+ "format:check": "prettier . --check"
},
"main": "background.js",
"dependencies": {
diff --git a/src/components/ClickToEdit.vue b/src/components/ClickToEdit.vue
index 814c187..367040b 100644
--- a/src/components/ClickToEdit.vue
+++ b/src/components/ClickToEdit.vue
@@ -1,7 +1,15 @@
-
+
{{ label }}
+
+
+
+ mdi-information-outline
+
+
+ {{ infoText }}
+
@@ -116,6 +124,10 @@ export default {
type: [String, Number],
default: "",
},
+ infoText: {
+ type: String,
+ default: "",
+ },
dataType: {
type: String,
default: "string",
diff --git a/src/components/agents/AgentForm.vue b/src/components/agents/AgentForm.vue
index 67251ac..a4bdb45 100644
--- a/src/components/agents/AgentForm.vue
+++ b/src/components/agents/AgentForm.vue
@@ -42,6 +42,7 @@
{{
- item.expandedInput
- ? expandedTasks[item.uniqueId].full_input
- : item.input
+ addBlankLines(
+ item.expandedInput
+ ? expandedTasks[item.uniqueId].full_input
+ : item.input,
+ )
}}
Task Output:
@@ -109,7 +111,7 @@
v-html="expandedTasks[item.uniqueId].htmlOutput"
/>
- {{ item.output }}
+ {{ addBlankLines(item.output) }}
@@ -386,6 +388,9 @@ export default {
})
.catch((err) => this.$snack.error(`Error: ${err}`));
},
+ addBlankLines(text) {
+ return `\n${text}\n`;
+ },
addTag(task, tag) {
agentTaskApi
.addTag(task.agent_id, task.id, tag)
diff --git a/src/components/agents/AgentTerminal.vue b/src/components/agents/AgentTerminal.vue
index 97bfbe2..f4b6c0c 100644
--- a/src/components/agents/AgentTerminal.vue
+++ b/src/components/agents/AgentTerminal.vue
@@ -621,7 +621,10 @@ export default {
config = { print: true, attempts: 30, delay: 5000 },
) {
if (!config.attempts) config.attempts = 30;
- if (!config.delay) config.delay = 5000;
+ if (!config.delay)
+ config.delay =
+ this.agent.delay != null ? this.agent.delay * 1000 : 5000;
+
let res = null;
let hasPrintedJobStarted = false;
let i = 0;
@@ -670,7 +673,7 @@ export default {
this.getDirectoryCommand(),
);
- const complete = await this.pollForResult(response.id);
+ const complete = await this.pollForResult(response.id, { print: false });
if (complete) {
// eslint-disable-next-line prefer-destructuring
@@ -697,6 +700,7 @@ export default {
if (["cd", "set-location"].includes(stdin.toLowerCase().split(" ")[0])) {
this.updateCurrentDirectory();
+ return;
}
if (complete) {
diff --git a/src/components/agents/AgentsTable.vue b/src/components/agents/AgentsTable.vue
index b3b99aa..ca0584b 100644
--- a/src/components/agents/AgentsTable.vue
+++ b/src/components/agents/AgentsTable.vue
@@ -114,6 +114,13 @@
+
+
+ fa-sync
+ Reload SysInfo
+
+
+
fa-trash-alt
@@ -134,6 +141,7 @@ import TagViewer from "@/components/TagViewer.vue";
import * as agentApi from "@/api/agent-api";
import { useAgentStore } from "@/stores/agent-module";
import { useApplicationStore } from "@/stores/application-module";
+import * as agentTaskApi from "@/api/agent-task-api";
export default {
name: "AgentsTable",
@@ -298,7 +306,7 @@ export default {
},
sortedAgents() {
let sorted = this.agents.slice();
- sorted.sort((a, b) => -a.lastseen_time.localeCompare(b.lastseen_time));
+ sorted.sort((a, b) => a.checkin_time.localeCompare(b.checkin_time));
if (this.hideStaleAgents) {
sorted = sorted.filter((agent) => !agent.stale);
}
@@ -388,6 +396,16 @@ export default {
getAgents() {
this.agentStore.getAgents();
},
+ async reloadSysInfo(agent) {
+ try {
+ await agentTaskApi.sysinfo(agent.session_id);
+ this.$snack.success(`SysInfo reload queued for ${agent.name}`);
+ } catch (error) {
+ this.$snack.error(
+ `Error reloading SysInfo for ${agent.name}: ${error.message}`,
+ );
+ }
+ },
async killAgent(item) {
this.$emit("kill-agent", item);
},
diff --git a/src/components/plugins/PluginTasksTable.vue b/src/components/plugins/PluginTasksTable.vue
index be35d0e..d1862a8 100644
--- a/src/components/plugins/PluginTasksTable.vue
+++ b/src/components/plugins/PluginTasksTable.vue
@@ -62,9 +62,11 @@
"
>
{{
- item.expandedInput
- ? expandedTasks[item.uniqueId].full_input
- : item.input
+ addBlankLines(
+ item.expandedInput
+ ? expandedTasks[item.uniqueId].full_input
+ : item.input,
+ )
}}
Task Output:
@@ -108,9 +110,7 @@
v-if="expandedTasks[item.uniqueId].htmlOutput"
v-html="expandedTasks[item.uniqueId].htmlOutput"
/>
-
- {{ item.output }}
-
+ addBlankLines(item.output)
@@ -349,6 +349,9 @@ export default {
ansiToHtml(output) {
return new AnsiUp().ansi_to_html(output);
},
+ addBlankLines(text) {
+ return `\n${text}\n`;
+ },
deleteTag(task, tag) {
pluginApi
.deleteTag(task.plugin_id, task.id, tag.id)
diff --git a/src/views/AgentEdit.vue b/src/views/AgentEdit.vue
index 6db5cb9..1d018c6 100644
--- a/src/views/AgentEdit.vue
+++ b/src/views/AgentEdit.vue
@@ -67,7 +67,7 @@
v-model="isRefreshTasks"
icon="fa-redo"
:button-text="isRefreshTasks ? 'On' : 'Off'"
- text="Auto-refresh tasks"
+ text="Auto-refresh Tasks"
/>
+
95) {
this.paneSize = 50;
diff --git a/src/views/PluginEdit.vue b/src/views/PluginEdit.vue
index f50b405..461f76e 100644
--- a/src/views/PluginEdit.vue
+++ b/src/views/PluginEdit.vue
@@ -27,7 +27,7 @@
v-model="isRefreshTasks"
icon="fa-redo"
:button-text="isRefreshTasks ? 'On' : 'Off'"
- text="Auto-refresh tasks"
+ text="Auto-refresh Tasks"
/>