UI Tweaks + Config Addition of TELEMETRY and TELEM_URL fields
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"APPNAME": "AirlockTools",
|
"APPNAME": "Loxide",
|
||||||
"URL": "https://server:3129",
|
"URL": "https://server:3129",
|
||||||
"LOG_LEVEL": "INFO",
|
"LOG_LEVEL": "INFO",
|
||||||
"BAD_PATH_PARTS": ["users","wwwroot","windows\\temp","windows\\task","windows\\system32","startup", "windows\\fonts","Recycle.Bin","AppData","programdata", "Solarwinds","kaseya"],
|
"BAD_PATH_PARTS": ["users","wwwroot","windows\\temp","windows\\task","windows\\system32","startup", "windows\\fonts","Recycle.Bin","AppData","programdata", "Solarwinds","kaseya"],
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
"PATH_EXCLUSION_CONST": 4,
|
"PATH_EXCLUSION_CONST": 4,
|
||||||
"MIN_FILES_FOR_PATH": 4,
|
"MIN_FILES_FOR_PATH": 4,
|
||||||
"VT_THREAT_TOLERANCE": 4,
|
"VT_THREAT_TOLERANCE": 4,
|
||||||
|
"TELEMETRY": "FALSE",
|
||||||
|
"TELEM_URL": "",
|
||||||
"POLICY_MAP_ENF_AUD": {
|
"POLICY_MAP_ENF_AUD": {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ T = TypeVar("T")
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
PROTECTED_KEYS = [
|
PROTECTED_KEYS = [
|
||||||
|
"URL",
|
||||||
|
"TELEM_URL",
|
||||||
"APPNAME",
|
"APPNAME",
|
||||||
"LOG_LEVEL",
|
"LOG_LEVEL",
|
||||||
"PATH_EXCLUSION_CONST",
|
"PATH_EXCLUSION_CONST",
|
||||||
|
|||||||
+5
-1
@@ -122,7 +122,11 @@ def load_system_config() -> dict:
|
|||||||
def load_user_config(config_dir: Path) -> dict:
|
def load_user_config(config_dir: Path) -> dict:
|
||||||
user_config_path = config_dir / "user_config.json"
|
user_config_path = config_dir / "user_config.json"
|
||||||
if not user_config_path.exists():
|
if not user_config_path.exists():
|
||||||
default_user_config = {"URL": "", "LOG_LEVEL": "INFO"}
|
default_user_config = {
|
||||||
|
"TELEMETRY": "FALSE",
|
||||||
|
"TEXTUAL_THEME": "gruvbox",
|
||||||
|
"EXTRAS": "NOTTODAY",
|
||||||
|
}
|
||||||
with open(user_config_path, "w") as f:
|
with open(user_config_path, "w") as f:
|
||||||
json.dump(default_user_config, f, indent=4)
|
json.dump(default_user_config, f, indent=4)
|
||||||
logging.debug(f"Created user config at {user_config_path}")
|
logging.debug(f"Created user config at {user_config_path}")
|
||||||
|
|||||||
+3
-3
@@ -114,12 +114,12 @@ class MainMenuScreen(Screen):
|
|||||||
"🖥️ - Find, Move, or Generate OTP for Agents",
|
"🖥️ - Find, Move, or Generate OTP for Agents",
|
||||||
"move_agent_workflow_button",
|
"move_agent_workflow_button",
|
||||||
),
|
),
|
||||||
|
("📊 - OTP Activities By Agent", "otp_activities_button"),
|
||||||
("🔇 - Find Quiet Hosts", "find_quiet_button"),
|
("🔇 - Find Quiet Hosts", "find_quiet_button"),
|
||||||
],
|
],
|
||||||
"policy": [
|
"policy": [
|
||||||
("🔒 - Prepare Policy For Enforcement", "policy_prep_button"),
|
("🔒 - Prepare Policy For Enforcement", "policy_prep_button"),
|
||||||
("🔄 - Update Audit Policies", "policy_audit_update_button"),
|
("🔄 - Update Audit Policies", "policy_audit_update_button"),
|
||||||
("📊 - OTP Activities By Agent", "otp_activities_button"),
|
|
||||||
("❌ - Revoke OTPs", "otp_revoke_button"),
|
("❌ - Revoke OTPs", "otp_revoke_button"),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -383,7 +383,7 @@ class Loxide(App[Message]):
|
|||||||
"""
|
"""
|
||||||
BINDINGS = [
|
BINDINGS = [
|
||||||
("q", "quit", "Quit"),
|
("q", "quit", "Quit"),
|
||||||
("d", "open_dir", "Open Directory"),
|
("f", "open_fe", "Launch Explorer"),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, api: AirlockAPIWrapper):
|
def __init__(self, api: AirlockAPIWrapper):
|
||||||
@@ -430,7 +430,7 @@ class Loxide(App[Message]):
|
|||||||
_PENDING_JOB = None
|
_PENDING_JOB = None
|
||||||
self.exit()
|
self.exit()
|
||||||
|
|
||||||
def action_open_dir(self) -> None:
|
def action_open_fe(self) -> None:
|
||||||
"""Open the working directory in the OS file manager (footer binding)."""
|
"""Open the working directory in the OS file manager (footer binding)."""
|
||||||
path_to_open = self.working_dir or os.getcwd()
|
path_to_open = self.working_dir or os.getcwd()
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user