AUTARCH v1.9 — remote monitoring, SSH manager, daemon, vault, cleanup
- Add Remote Monitoring Station with PIAP device profile system - Add SSH/SSHD manager with fail2ban integration - Add privileged daemon architecture for safe root operations - Add encrypted vault, HAL memory, HAL auto-analyst - Add network security suite, module creator, codex training - Add start.sh launcher script and GTK3 desktop launcher - Remove Output/ build artifacts, installer files, loose docs - Update .gitignore for runtime data and build artifacts - Update README for v1.9 with new launch method, screenshots, and features Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,8 @@ import logging
|
||||
from pathlib import Path
|
||||
from typing import Dict, Optional, Tuple
|
||||
|
||||
from core.daemon import root_exec
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Service constants
|
||||
@@ -207,20 +209,11 @@ class DiscoveryManager:
|
||||
"""Enable Bluetooth authentication/security on the adapter."""
|
||||
try:
|
||||
# Enable authentication
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'auth'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'auth'], timeout=5)
|
||||
# Enable encryption
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'encrypt'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'encrypt'], timeout=5)
|
||||
# Enable SSP (Secure Simple Pairing)
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'sspmode', '1'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'sspmode', '1'], timeout=5)
|
||||
if self._bt_is_secure():
|
||||
return True, "Bluetooth security enabled (AUTH + ENCRYPT + SSP)"
|
||||
return False, "Security flags set but AUTH not confirmed"
|
||||
@@ -246,10 +239,7 @@ class DiscoveryManager:
|
||||
|
||||
# Ensure adapter is up
|
||||
try:
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'up'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'up'], timeout=5)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -263,16 +253,10 @@ class DiscoveryManager:
|
||||
# Make discoverable and set name
|
||||
try:
|
||||
# Set device name
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'name', BT_SERVICE_NAME],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'name', BT_SERVICE_NAME], timeout=5)
|
||||
|
||||
# Enable discoverable mode
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'piscan'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'piscan'], timeout=5)
|
||||
|
||||
# Use bluetoothctl to set discoverable with timeout 0 (always)
|
||||
# and set the alias
|
||||
@@ -339,10 +323,7 @@ class DiscoveryManager:
|
||||
['bluetoothctl', 'discoverable', 'off'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
subprocess.run(
|
||||
['sudo', 'hciconfig', 'hci0', 'noscan'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
)
|
||||
root_exec(['hciconfig', 'hci0', 'noscan'], timeout=5)
|
||||
|
||||
if self._bt_thread:
|
||||
self._bt_thread.join(timeout=3)
|
||||
|
||||
Reference in New Issue
Block a user