Timestamp formatting broke text selection, so the int64 unix timestamp is formatted to a string before being added to the console component. This solved most of the highlighting issues I encountered.

This commit is contained in:
Jakob Friedl
2025-10-12 15:00:42 +02:00
parent f2d2833306
commit 392aaec972
6 changed files with 24 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
import whisky
import tables, strutils, strformat, json, parsetoml, base64, os # native_dialogs
import tables, times, strutils, strformat, json, parsetoml, base64, os # native_dialogs
import ./utils/[appImGui, globals]
import ./views/[dockspace, sessions, listeners, eventlog, console]
import ./views/loot/[screenshots, downloads]
@@ -133,21 +133,21 @@ proc main(ip: string = "localhost", port: int = 37573) =
consoles[agentId].addItem(
cast[LogType](event.data["logType"].getInt()),
event.data["message"].getStr(),
event.timestamp
event.timestamp.fromUnix().local().format("dd-MM-yyyy HH:mm:ss")
)
of CLIENT_EVENTLOG_ITEM:
eventlog.addItem(
cast[LogType](event.data["logType"].getInt()),
event.data["message"].getStr(),
event.timestamp
event.timestamp.fromUnix().local().format("dd-MM-yyyy HH:mm:ss")
)
of CLIENT_BUILDLOG_ITEM:
listenersTable.generatePayloadModal.addBuildlogItem(
cast[LogType](event.data["logType"].getInt()),
event.data["message"].getStr(),
event.timestamp
event.timestamp.fromUnix().local().format("dd-MM-yyyy HH:mm:ss")
)
of CLIENT_LOOT_ADD:
@@ -193,8 +193,7 @@ proc main(ip: string = "localhost", port: int = 37573) =
# This is done to ensure that closed console windows can be opened again
consoles = newConsoleTable
igShowDemoWindow(nil)
# igShowDemoWindow(nil)
# render
app.render()