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.

refactor: use json module for result serialization in into_json

kaifcodec03c4857973a8
diff --git a/user_scanner/core/formatter.py b/user_scanner/core/formatter.py
index 3c52f56..4e602a4 100644
--- a/user_scanner/core/formatter.py
+++ b/user_scanner/core/formatter.py
@@ -1,3 +1,4 @@
+import json
from user_scanner.core.result import Result
from typing import List
@@ -14,14 +15,8 @@ def indentate(msg: str, indent: int):
def into_json(results: List[Result]) -> str:
- res = "[\n"
-
- for i, result in enumerate(results):
- is_last = i == len(results) - 1
- end = "" if is_last else ","
- res += indentate(result.to_json().replace("\t", INDENT), 1) + end + "\n"
-
- return res + "]"
+ list_of_dicts = [result.to_json() for result in results]
+ return json.dumps(list_of_dicts, indent=2)
def into_csv(results: List[Result]) -> str: