Skip to content

🕵️‍♂️ (2-in-1) Email & Username OSINT suite featuring native MCP support for deep data extraction just from a single Email/Username. Analyzes 2720+ actively maintained scan vectors (210+ email / 2510+ username) for security research, investigations, and digital footprinting.

refine: Added colored output

kaifcodecaa8d4d42be82
diff --git a/user_scanner/utils/updater_logic.py b/user_scanner/utils/updater_logic.py
index 7e7cd57..02a90f8 100644
--- a/user_scanner/utils/updater_logic.py
+++ b/user_scanner/utils/updater_logic.py
@@ -1,8 +1,17 @@
from pathlib import Path
+from colorama import Fore
+import sys
import json
from user_scanner.core.version import get_pypi_version, load_local_version
from user_scanner.utils.update import update_self
+# Color configs
+R = Fore.RED
+G = Fore.GREEN
+C = Fore.CYAN
+Y = Fore.YELLOW
+X = Fore.RESET
+
CONFIG_PATH = Path(__file__).parent.parent / "config.json"
@@ -10,21 +19,19 @@ def load_config() -> dict:
if CONFIG_PATH.exists():
return json.loads(CONFIG_PATH.read_text())
- default = {
- "auto_update_status": True
- }
- CONFIG_PATH.write_text(json.dumps(default))
+ default = {"auto_update_status": True}
+ CONFIG_PATH.write_text(json.dumps(default, indent=2))
return default
-def save_config_change(status):
+def save_config_change(status: bool):
content = load_config()
content["auto_update_status"] = status
- CONFIG_PATH.write_text(json.dumps(content))
+ CONFIG_PATH.write_text(json.dumps(content, indent=2))
def check_for_updates():
- if load_config().get("auto_update_status", False) != True:
+ if not load_config().get("auto_update_status", False):
return
try:
@@ -34,17 +41,22 @@ def check_for_updates():
if current_ver != latest_ver:
print(
- f"\n[!] New version available: {current_ver} -> {latest_ver}")
+ f"\n[!] New version available: "
+ f"{R}{current_ver}{X} -> {C}{latest_ver}{X}\n"
+ )
+
choice = input(
- "Do you want to update? (y/n/d: don't ask again): ").strip().lower()
+ f"{Y}Do you want to update?{X} (y/n/d: {R}don't ask again{X}): "
+ ).strip().lower()
+
if choice == "y":
update_self()
- print(
- "[+] Update successful. Please restart the tool to use the new version.")
- import sys
+ print(f"[{G}+{X}] {G}Update successful. Please restart the tool.{X}")
sys.exit(0)
+
elif choice == "d":
save_config_change(False)
- print("[*] Auto-update checks disabled.")
- except Exception:
- pass
+ print(f"[{Y}*{X}] {R}Auto-update checks disabled.{X}")
+
+ except Exception as e:
+ print(f"[!] Update check failed: {e}")