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:
42
autarch.py
42
autarch.py
@@ -14,15 +14,53 @@ from pathlib import Path
|
||||
from textwrap import dedent
|
||||
|
||||
# Version info
|
||||
VERSION = "1.3"
|
||||
BUILD_DATE = "2026-01-14"
|
||||
VERSION = "2.4"
|
||||
BUILD_DATE = "2026-03-20"
|
||||
|
||||
# Ensure the framework directory is in the path
|
||||
FRAMEWORK_DIR = Path(__file__).parent
|
||||
sys.path.insert(0, str(FRAMEWORK_DIR))
|
||||
|
||||
# ── Package resolution ────────────────────────────────────────────────────────
|
||||
# AUTARCH needs root for raw sockets, iptables, hardware, etc., but pip packages
|
||||
# live in user space. Solution priority:
|
||||
# 1. Project venv (autarch/venv/) — best: works as any user, no conflicts
|
||||
# 2. Owner's ~/.local site-packages — fallback: needs path priority fix
|
||||
#
|
||||
# If running from the venv python (venv/bin/python), everything just works.
|
||||
# If running from system python via sudo, we fix the path so user packages win.
|
||||
|
||||
_venv_dir = FRAMEWORK_DIR / 'venv'
|
||||
_running_in_venv = (
|
||||
hasattr(sys, 'prefix') and sys.prefix != sys.base_prefix # standard venv check
|
||||
) or (_venv_dir / 'bin' / 'python').exists() and str(_venv_dir) in sys.executable
|
||||
|
||||
if not _running_in_venv:
|
||||
# Not in venv — add user site-packages before system dist-packages
|
||||
try:
|
||||
import pwd as _pwd
|
||||
_owner_uid = FRAMEWORK_DIR.stat().st_uid
|
||||
_user_site = (
|
||||
Path(_pwd.getpwuid(_owner_uid).pw_dir) / '.local' / 'lib'
|
||||
/ f'python{sys.version_info.major}.{sys.version_info.minor}' / 'site-packages'
|
||||
)
|
||||
if _user_site.is_dir() and str(_user_site) not in sys.path:
|
||||
sys.path.insert(1, str(_user_site))
|
||||
# Evict stale system modules that conflict with newer user versions
|
||||
for _mod_name in ('typing_extensions',):
|
||||
if _mod_name in sys.modules:
|
||||
_mod = sys.modules[_mod_name]
|
||||
if hasattr(_mod, '__file__') and '/usr/lib/' in str(getattr(_mod, '__file__', '')):
|
||||
del sys.modules[_mod_name]
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
from core.banner import Colors, clear_screen, display_banner
|
||||
|
||||
# Install the subprocess.run hook so ALL sudo calls auto-route through the daemon
|
||||
from core.daemon import install_subprocess_hook
|
||||
install_subprocess_hook()
|
||||
|
||||
|
||||
def get_epilog():
|
||||
"""Get detailed help epilog text."""
|
||||
|
||||
Reference in New Issue
Block a user