From 8a9f31623a48f74941a1d9a66420e252e260aee1 Mon Sep 17 00:00:00 2001 From: jakani24 Date: Fri, 10 May 2024 15:44:46 +0200 Subject: [PATCH] Update notify_virus.php --- .../cyberhex-code/api/php/virus/notify_virus.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/server/cyberhex-code/api/php/virus/notify_virus.php b/src/server/cyberhex-code/api/php/virus/notify_virus.php index f68fe22..6c39071 100644 --- a/src/server/cyberhex-code/api/php/virus/notify_virus.php +++ b/src/server/cyberhex-code/api/php/virus/notify_virus.php @@ -29,8 +29,17 @@ else{ echo("wrt_err"); else echo("wrt_ok"); + + $sql="SELECT machine_location FROM machines WHERE machine_name = ?"; + $stmt = $conn->prepare($sql); + $stmt->bind_param("s", $machine_id); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_assoc(); + $location = $row["machine_location"]; + $stmt->close(); $conn->close(); - send("[VIRUS WARNING!]\nhash: $hash\npath: $path\nmachine_id: $machine_id\naction: $action\n"); + send("[VIRUS WARNING!]\nhash: $hash\npath: $path\nmachine_id: $machine_id\nmachine_location: $location\naction: $action\n"); } ?> \ No newline at end of file