A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat: maigret
dextmorgn54fd26a4af17
diff --git a/flowsint-api/Dockerfile b/flowsint-api/Dockerfileindex 87a348d0..cf2a76b5 100644--- a/flowsint-api/Dockerfile+++ b/flowsint-api/Dockerfile@@ -4,7 +4,7 @@ WORKDIR /appCOPY . .-RUN pip install --no-cache-dir -r requirements.txt+RUN pip install --no-cache-dir -r requirements.txt git+https://github.com/soxoj/maigretRUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*diff --git a/flowsint-api/app/scanners/maigret_scanner.py b/flowsint-api/app/scanners/maigret_scanner.pynew file mode 100644index 00000000..68084609--- /dev/null+++ b/flowsint-api/app/scanners/maigret_scanner.py@@ -0,0 +1,57 @@+import json+import subprocess+import uuid+from pathlib import Path+from typing import Dict, Any++from app.scanners.base import Scanner++class MaigretScanner(Scanner):+ """Scans the username for associated social accounts using maigret."""+ @property+ def name(self) -> str:+ return "maigret_scanner"++ def scan(self, username: str) -> Dict[str, Any]:+ report_id = str(uuid.uuid4())+ folder_output = "/tmp"+ output_file = Path(f"/tmp/report_{username}_simple.json")++ try:+ result = subprocess.run(+ ["maigret", username, "-J" "simple", "-fo", folder_output],+ capture_output=True,+ text=True,+ timeout=100 # 5 minutes timeout+ )++ if result.returncode != 0:+ return {+ "error": f"Maigret failed: {result.stderr.strip()}"+ }++ if not output_file.exists():+ return {+ "error": "Maigret did not produce any output file."+ }++ results = {}+ with open(output_file, "r") as f:+ results = json.load(f)++ return {+ "username": username,+ "report_id": report_id,+ "results": results+ }++ except subprocess.TimeoutExpired:+ return {"error": "Maigret scan timed out."}+ except Exception as e:+ return {"error": f"Unexpected error in Maigret scan: {str(e)}"}++ def postprocess(self, results: Dict[str, Any]) -> Dict[str, Any]:++ results["scanner"] = "maigret"+ results["count"] = len(results.get("found", {}))+ return resultsdiff --git a/flowsint-api/app/scanners/registry.py b/flowsint-api/app/scanners/registry.pyindex 505b3452..99cbb5ca 100644--- a/flowsint-api/app/scanners/registry.py+++ b/flowsint-api/app/scanners/registry.py@@ -3,6 +3,7 @@ from typing import Dict, Typefrom app.scanners.base import Scannerfrom app.scanners.sherlock_scanner import SherlockScannerfrom app.scanners.holehe_scanner import HoleheScanner+from app.scanners.maigret_scanner import MaigretScannerclass ScannerRegistry:@@ -27,4 +28,5 @@ class ScannerRegistry:return cls._scanners[name](scan_id)ScannerRegistry.register(SherlockScanner)-ScannerRegistry.register(HoleheScanner)\ No newline at end of file+ScannerRegistry.register(HoleheScanner)+ScannerRegistry.register(MaigretScanner)\ No newline at end of filediff --git a/flowsint-api/app/scanners/sherlock_scanner.py b/flowsint-api/app/scanners/sherlock_scanner.pyindex f11cfaa8..bd2e9d98 100644--- a/flowsint-api/app/scanners/sherlock_scanner.py+++ b/flowsint-api/app/scanners/sherlock_scanner.py@@ -44,7 +44,7 @@ class SherlockScanner(Scanner):return {"username": username,"report_id": report_id,- "found": found_accounts+ "results": found_accounts}except subprocess.TimeoutExpired:diff --git a/flowsint-api/app/tasks/scanner.py b/flowsint-api/app/tasks/scanner.pyindex 9766bcd0..88399909 100644--- a/flowsint-api/app/tasks/scanner.py+++ b/flowsint-api/app/tasks/scanner.py@@ -17,9 +17,9 @@ def run_scan(self, scanner_name: str, value: str, sketch_id: str):}).execute()scanner = ScannerRegistry.get_scanner(scanner_name, self.request.id)results = scanner.execute(value)- # status = "finished" if "error" not in results else "error"+ status = "finished" if "error" not in results else "error"db.table("scans").update({- "status": "finished",+ "status": status,"results": results}).eq("id", self.request.id).execute()return {"result": results}diff --git a/flowsint-api/reports/report_reconurge_simple.json b/flowsint-api/reports/report_reconurge_simple.jsonnew file mode 100644index 00000000..1a9827d9--- /dev/null+++ b/flowsint-api/reports/report_reconurge_simple.json@@ -0,0 +1,768 @@+{+ "GitHub": {+ "site": {+ "tags": [+ "coding"+ ],+ "regexCheck": "^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$",+ "urlProbe": "https://api.github.com/users/{username}",+ "checkType": "status_code",+ "alexaRank": 83,+ "urlMain": "https://www.github.com/",+ "url": "https://github.com/{username}",+ "usernameClaimed": "blue",+ "usernameUnclaimed": "noonewouldeverusethis7"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.github.com/",+ "cookies": null,+ "url_user": "https://github.com/reconurge",+ "ids_usernames": {},+ "ids_links": [],+ "status": {+ "username": "reconurge",+ "site_name": "GitHub",+ "url": "https://github.com/reconurge",+ "status": "Claimed",+ "ids": {+ "uid": "182449807",+ "image": "https://avatars.githubusercontent.com/u/182449807?v=4",+ "created_at": "2024-09-22T21:41:32Z",+ "follower_count": "0",+ "following_count": "0",+ "public_gists_count": "0",+ "public_repos_count": "3"+ },+ "tags": [+ "coding"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 83+ },+ "GitHubGist": {+ "site": {+ "tags": [+ "coding",+ "sharing"+ ],+ "engine": "engineRedirect",+ "urlMain": "https://gist.github.com",+ "url": "https://gist.github.com/{username}",+ "source": "GitHub",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "usernameClaimed": "alex",+ "alexaRank": 26,+ "checkType": "response_url"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://gist.github.com",+ "cookies": null,+ "url_user": "https://gist.github.com/reconurge",+ "status": {+ "username": "reconurge",+ "site_name": "GitHubGist [GitHub]",+ "url": "https://gist.github.com/reconurge",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "coding",+ "sharing"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 26+ },+ "OP.GG [LeagueOfLegends] Japan": {+ "site": {+ "tags": [+ "gaming",+ "jp"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=jp",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=jp",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Japan",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=jp",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming",+ "jp"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Taiwan": {+ "site": {+ "tags": [+ "gaming",+ "tw"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=tw",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=tw",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Taiwan",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=tw",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming",+ "tw"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] LAS": {+ "site": {+ "tags": [+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=las",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=las",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] LAS",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=las",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Russia": {+ "site": {+ "tags": [+ "gaming",+ "ru"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=ru",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=ru",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Russia",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=ru",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming",+ "ru"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Vietnam": {+ "site": {+ "tags": [+ "gaming",+ "vn"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=vn",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=vn",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Vietnam",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=vn",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming",+ "vn"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Brazil": {+ "site": {+ "tags": [+ "br",+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=br",+ "usernameClaimed": "Blaze51",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=br",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Brazil",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=br",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "br",+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Oceania": {+ "site": {+ "tags": [+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=oce",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=oce",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Oceania",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=oce",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Middle East": {+ "site": {+ "tags": [+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=me",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=me",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Middle East",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=me",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Europe Nordic & East": {+ "site": {+ "tags": [+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=eune",+ "usernameClaimed": "Blaze51",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=eune",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Europe Nordic & East",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=eune",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "OP.GG [LeagueOfLegends] Europe West": {+ "site": {+ "tags": [+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=euw",+ "usernameClaimed": "Blaze51",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=euw",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] Europe West",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=euw",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "forums.bulbagarden.net": {+ "site": {+ "tags": [+ "forum",+ "us"+ ],+ "engine": "XenForo",+ "alexaRank": 4189,+ "urlMain": "http://forums.bulbagarden.net",+ "usernameClaimed": "alex",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "ignore403": true,+ "absenceStrs": [+ "The requested page could not be found.",+ "The specified member cannot be found. Please enter a member",+ "\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043c\u044f.",+ "Le membre sp\u00e9cifi\u00e9 est introuvable. Veuillez saisir le nom complet d'un membre.",+ "Belirtilen \u00fcye bulunamad\u0131. L\u00fctfen bir \u00fcyenin tam ad\u0131n\u0131 giriniz."+ ],+ "presenseStrs": [+ "\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.",+ "\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0439\u0442\u0438 \u043d\u0430 \u0444\u043e\u0440\u0443\u043c.",+ "You must be logged-in to do that.",+ "You must be logged in to do that.",+ "memberHeader-content",+ "profilePage"+ ],+ "checkType": "message",+ "url": "{urlMain}{urlSubpath}/members/?username={username}"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "http://forums.bulbagarden.net",+ "cookies": null,+ "url_user": "http://forums.bulbagarden.net/members/?username=reconurge",+ "status": {+ "username": "reconurge",+ "site_name": "forums.bulbagarden.net",+ "url": "http://forums.bulbagarden.net/members/?username=reconurge",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "forum",+ "us"+ ]+ },+ "http_status": 403,+ "is_similar": false,+ "rank": 4189+ },+ "authorSTREAM": {+ "site": {+ "tags": [+ "documents",+ "in",+ "sharing"+ ],+ "checkType": "status_code",+ "alexaRank": 6034,+ "urlMain": "http://www.authorstream.com/",+ "url": "http://www.authorstream.com/author/{username}/",+ "usernameClaimed": "roxanne",+ "usernameUnclaimed": "noonewouldeverusethis7"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "http://www.authorstream.com/",+ "cookies": null,+ "url_user": "http://www.authorstream.com/author/reconurge/",+ "status": {+ "username": "reconurge",+ "site_name": "authorSTREAM",+ "url": "http://www.authorstream.com/author/reconurge/",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "documents",+ "in",+ "sharing"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 6034+ },+ "forums.serebii.net": {+ "site": {+ "tags": [+ "forum",+ "us"+ ],+ "engine": "XenForo",+ "alexaRank": 6195,+ "urlMain": "https://forums.serebii.net",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "ignore403": true,+ "absenceStrs": [+ "The requested page could not be found.",+ "The specified member cannot be found. Please enter a member",+ "\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043c\u044f.",+ "Le membre sp\u00e9cifi\u00e9 est introuvable. Veuillez saisir le nom complet d'un membre.",+ "Belirtilen \u00fcye bulunamad\u0131. L\u00fctfen bir \u00fcyenin tam ad\u0131n\u0131 giriniz."+ ],+ "presenseStrs": [+ "\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.",+ "\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0439\u0442\u0438 \u043d\u0430 \u0444\u043e\u0440\u0443\u043c.",+ "You must be logged-in to do that.",+ "You must be logged in to do that.",+ "memberHeader-content",+ "profilePage"+ ],+ "checkType": "message",+ "url": "{urlMain}{urlSubpath}/members/?username={username}"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://forums.serebii.net",+ "cookies": null,+ "url_user": "https://forums.serebii.net/members/?username=reconurge",+ "status": {+ "username": "reconurge",+ "site_name": "forums.serebii.net",+ "url": "https://forums.serebii.net/members/?username=reconurge",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "forum",+ "us"+ ]+ },+ "http_status": 403,+ "is_similar": false,+ "rank": 6195+ },+ "OP.GG [LeagueOfLegends] North America": {+ "site": {+ "tags": [+ "gaming"+ ],+ "engine": "op.gg",+ "url": "https://www.op.gg/summoners/search?q={username}®ion=na",+ "usernameClaimed": "Blaze51",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 331,+ "checkType": "message",+ "presenseStrs": [+ "This is the search result for the summoner",+ "- Summoner Stats - "+ ],+ "absenceStrs": [+ "<h1>No search results for"+ ],+ "urlMain": "https://www.op.gg/"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://www.op.gg/",+ "cookies": null,+ "url_user": "https://www.op.gg/summoners/search?q=reconurge®ion=na",+ "status": {+ "username": "reconurge",+ "site_name": "OP.GG [LeagueOfLegends] North America",+ "url": "https://www.op.gg/summoners/search?q=reconurge®ion=na",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "gaming"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 331+ },+ "Diary.ru": {+ "site": {+ "tags": [+ "blog",+ "nl",+ "ru"+ ],+ "checkType": "message",+ "absenceStrs": [+ "<title> — @\u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0438: \u0430\u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c</title>"+ ],+ "alexaRank": 11301,+ "urlMain": "https://diary.ru",+ "url": "https://{username}.diary.ru/",+ "usernameClaimed": "blue",+ "usernameUnclaimed": "noonewouldeverusethis7"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://diary.ru",+ "cookies": null,+ "url_user": "https://reconurge.diary.ru/",+ "status": {+ "username": "reconurge",+ "site_name": "Diary.ru",+ "url": "https://reconurge.diary.ru/",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "blog",+ "nl",+ "ru"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 11301+ },+ "hashnode": {+ "site": {+ "tags": [+ "in"+ ],+ "checkType": "message",+ "presenseStrs": [+ "email",+ "profile-tags",+ "name",+ "og:site_name",+ " name="+ ],+ "absenceStrs": [+ "We can\u2019t find the page you\u2019re looking for!"+ ],+ "urlMain": "https://hashnode.com",+ "url": "https://hashnode.com/@{username}",+ "usernameClaimed": "melwinalm",+ "usernameUnclaimed": "noonewouldeverusethis7",+ "alexaRank": 15106+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://hashnode.com",+ "cookies": null,+ "url_user": "https://hashnode.com/@reconurge",+ "status": {+ "username": "reconurge",+ "site_name": "hashnode",+ "url": "https://hashnode.com/@reconurge",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "in"+ ]+ },+ "http_status": 429,+ "is_similar": false,+ "rank": 15106+ },+ "BikeRadar": {+ "site": {+ "tags": [+ "forum",+ "gb",+ "us"+ ],+ "checkType": "status_code",+ "alexaRank": 14858,+ "urlMain": "https://forum.bikeradar.com",+ "url": "https://forum.bikeradar.com/profile/{username}",+ "usernameClaimed": "adam",+ "usernameUnclaimed": "noonewouldeverusethis7"+ },+ "username": "reconurge",+ "parsing_enabled": true,+ "url_main": "https://forum.bikeradar.com",+ "cookies": null,+ "url_user": "https://forum.bikeradar.com/profile/reconurge",+ "status": {+ "username": "reconurge",+ "site_name": "BikeRadar",+ "url": "https://forum.bikeradar.com/profile/reconurge",+ "status": "Claimed",+ "ids": {},+ "tags": [+ "forum",+ "gb",+ "us"+ ]+ },+ "http_status": 200,+ "is_similar": false,+ "rank": 14858+ }+}\ No newline at end of filediff --git a/flowsint-api/requirements.txt b/flowsint-api/requirements.txtindex 21d339d5..3618ffea 100644--- a/flowsint-api/requirements.txt+++ b/flowsint-api/requirements.txt@@ -9,4 +9,5 @@ uvicornsherlock_projectpython-jose[cryptography]python-dotenv-requests\ No newline at end of file+requests+git+https://github.com/soxoj/maigret\ No newline at end of filediff --git a/flowsint-web/src/components/investigations/section-cards.tsx b/flowsint-web/src/components/investigations/section-cards.tsxindex 4cb05c98..a5d811d1 100644--- a/flowsint-web/src/components/investigations/section-cards.tsx+++ b/flowsint-web/src/components/investigations/section-cards.tsx@@ -37,7 +37,7 @@ export function SectionCards() {{isLoading ? <Skeleton className="h-10 w-12 rounded-lg" /> : data.active_investigations}</CardTitle><div className="absolute right-4 top-4">- <CustomBadge isLoading={isLoading} value={data?.active_investigations_string} />+ <CustomBadge isLoading={isLoading} value={data?.active_investigations_delta_string} /></div></CardHeader><CardFooter className="flex-col items-start gap-1 text-sm">diff --git a/flowsint-web/src/components/sketches/scan-drawer.tsx b/flowsint-web/src/components/sketches/scan-drawer.tsxindex 20d8bc7a..8a37e937 100644--- a/flowsint-web/src/components/sketches/scan-drawer.tsx+++ b/flowsint-web/src/components/sketches/scan-drawer.tsx@@ -3,20 +3,27 @@import { memo, useEffect, useState } from "react"import {AlertCircle,+ BookOpen,CheckCircle2,Clock,+ Code,ExternalLink,+ GamepadIcon,+ GithubIcon,+ Globe,Grid2X2,+ ImageIcon,LayoutList,+ MessageSquare,Search,Shield,ShieldAlert,+ Users,XCircle,} from "lucide-react"import { Drawer, DrawerContent, DrawerHeader, DrawerTitle } from "@/components/ui/drawer"import { Badge } from "@/components/ui/badge"import { Card, CardContent } from "@/components/ui/card"-import { ScrollArea } from "@/components/ui/scroll-area"import { Input } from "@/components/ui/input"import { Button } from "@/components/ui/button"import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"@@ -24,8 +31,8 @@ import { useQueryState } from "nuqs"import { useQuery } from "@tanstack/react-query"import { useParams } from "next/navigation"import Loader from "../loader"-import { format } from 'date-fns';-+import { CopyButton } from "../copy"+import { Avatar } from "@/components/ui/avatar"export type ScanResult = {name: string@@ -45,11 +52,9 @@ export type ErrorResult = {export type Scan = {id: string- value: string,+ value: stringstatus: "pending" | "finished" | "error"- results: {- results: (ScanResult | ErrorResult)[]- }+ results: anycreated_at: stringscan_name: string}@@ -82,11 +87,47 @@ export function ScanDrawer() {if (!open) setScanId(null)}, [open])+ // Déterminer le type de format des résultats+ const detectScanFormat = (scan: Scan | null) => {+ if (!scan || !scan.results) return "unknown"++ // Format holehe_scanner+ if (+ scan.scan_name === "holehe_scanner" &&+ scan.results.results &&+ Array.isArray(scan.results.results) &&+ scan.results.results.length > 0 &&+ (scan.results.results[0].name || scan.results.results[0].error)+ ) {+ return "holehe"+ }++ // Format Maigret+ if (+ scan.results.count !== undefined &&+ scan.results.results &&+ scan.results.username &&+ scan.results.scanner === "maigret"+ ) {+ return "maigret"+ }++ // Format par défaut (raw)+ return "raw"+ }++ const scanFormat = currentScan ? detectScanFormat(currentScan) : "unknown"+const isErrorResult = (result: ScanResult | ErrorResult): result is ErrorResult => {return "error" in result}+const HoleheDrawer = memo(() => {- const filteredResults = currentScan?.results ? currentScan?.results?.results.filter((result: any) => {+ if (!currentScan || !currentScan.results || !currentScan.results.results) {+ return <div className="p-4">No results available</div>+ }++ const filteredResults = currentScan.results.results.filter((result: any) => {if (isErrorResult(result)) {return result.error.toLowerCase().includes(searchQuery.toLowerCase())}@@ -94,9 +135,9 @@ export function ScanDrawer() {result.name.toLowerCase().includes(searchQuery.toLowerCase()) ||result.domain.toLowerCase().includes(searchQuery.toLowerCase()))- }) : null+ })- const stats = currentScan?.results ? currentScan?.results.results.reduce(+ const stats = currentScan.results.results.reduce((acc: any, result: any) => {if (isErrorResult(result)) {acc.errors++@@ -107,222 +148,435 @@ export function ScanDrawer() {return acc},{ exists: 0, rateLimited: 0, errors: 0 },- ) : null+ )return (<>- {!isLoading && stats && filteredResults ?- <>- <DrawerHeader className="border-b pb-4 p-4">- <DrawerTitle className="flex items-center gap-2 mb-2">- Scan Results ({currentScan?.scan_name}) <span className="font-normal">({format(new Date(currentScan?.created_at as string), 'dd MMMM, HH:mm')})</span>- <Badge variant={currentScan?.status === "error" ? "destructive" : "outline"}>{currentScan?.status}</Badge>- </DrawerTitle>- <p className="opacity-60 mb-2 mt-2">{currentScan?.value}</p>- {/* Stats Cards */}-- <div className="grid grid-cols-3 gap-4 mb-4">- <Card className="bg-background shadow-none">- <CardContent className="p-4 flex items-center gap-2">- <Shield className="h-4 w-4 text-green-500" />- <div>- <p className="text-sm font-medium">Existing Accounts</p>- <p className="text-2xl font-bold">{stats?.exists || 0}</p>- </div>- </CardContent>- </Card>- <Card className="bg-background shadow-none">- <CardContent className="p-4 flex items-center gap-2">- <Clock className="h-4 w-4 text-yellow-500" />- <div>- <p className="text-sm font-medium">Rate Limited</p>- <p className="text-2xl font-bold">{stats?.rateLimited || 0}</p>- </div>- </CardContent>- </Card>- <Card className="bg-background shadow-none">- <CardContent className="p-4 flex items-center gap-2">- <ShieldAlert className="h-4 w-4 text-destructive" />- <div>- <p className="text-sm font-medium">Errors</p>- <p className="text-2xl font-bold">{stats?.errors || 0}</p>- </div>+ <DrawerHeader className="border-b pb-4 p-4">+ <div className="grid grid-cols-3 gap-4 mb-4">+ <Card className="bg-background shadow-none">+ <CardContent className="p-4 flex items-center gap-2">+ <Shield className="h-4 w-4 text-green-500" />+ <div>+ <p className="text-sm font-medium">Existing Accounts</p>+ <p className="text-2xl font-bold">{stats?.exists || 0}</p>+ </div>+ </CardContent>+ </Card>+ <Card className="bg-background shadow-none">+ <CardContent className="p-4 flex items-center gap-2">+ <Clock className="h-4 w-4 text-yellow-500" />+ <div>+ <p className="text-sm font-medium">Rate Limited</p>+ <p className="text-2xl font-bold">{stats?.rateLimited || 0}</p>+ </div>+ </CardContent>+ </Card>+ <Card className="bg-background shadow-none">+ <CardContent className="p-4 flex items-center gap-2">+ <ShieldAlert className="h-4 w-4 text-destructive" />+ <div>+ <p className="text-sm font-medium">Errors</p>+ <p className="text-2xl font-bold">{stats?.errors || 0}</p>+ </div>+ </CardContent>+ </Card>+ </div>+ {/* Search and View Toggle */}+ <div className="flex items-center gap-2">+ <div className="relative flex-1">+ <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="Search services..."+ className="pl-8 shadow-none"+ value={searchQuery}+ onChange={(e) => setSearchQuery(e.target.value)}+ />+ </div>+ <Button variant="outline" size="icon" onClick={() => setViewMode(viewMode === "grid" ? "table" : "grid")}>+ {viewMode === "grid" ? <LayoutList className="h-4 w-4" /> : <Grid2X2 className="h-4 w-4" />}+ </Button>+ </div>+ </DrawerHeader>+ <div className="h-auto overflow-auto">+ {viewMode === "table" ? (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Service</TableHead>+ <TableHead>Status</TableHead>+ <TableHead>Method</TableHead>+ <TableHead>Details</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {filteredResults?.map((result: any, index: number) => (+ <TableRow key={index}>+ {isErrorResult(result) ? (+ <>+ <TableCell className="font-medium dark:text-red-400 text-destructive px-4">+ <div>Error</div>+ </TableCell>+ <TableCell colSpan={3} className="dark:text-red-400 text-destructive">+ {result.error}+ </TableCell>+ </>+ ) : (+ <>+ <TableCell className="font-medium">+ <div className="flex items-center gap-2 px-2">+ {result.name}+ <a+ href={`https://${result.domain}`}+ target="_blank"+ rel="noopener noreferrer"+ className="text-muted-foreground hover:text-primary"+ >+ <ExternalLink className="h-4 w-4" />+ </a>+ </div>+ </TableCell>+ <TableCell>+ <div className="flex items-center gap-2">+ {result.exists ? (+ <Badge className="text-green-500 bg-green-400/10 border border-green-500/30">+ <CheckCircle2 className="h-3 w-3 mr-1" />+ Exists+ </Badge>+ ) : (+ <Badge variant="secondary">+ <XCircle className="h-3 w-3 mr-1" />+ Not Found+ </Badge>+ )}+ </div>+ </TableCell>+ <TableCell>{result.method}</TableCell>+ <TableCell>+ <div className="flex gap-2">+ {result.rateLimit && (+ <Badge+ variant="destructive"+ className="text-yellow-500 bg-yellow-400/10 border border-yellow-500/30"+ >+ Rate Limited+ </Badge>+ )}+ {result.frequent_rate_limit && (+ <Badge+ variant="destructive"+ className="text-orange-500 bg-orange-400/10 border border-orange-500/30"+ >+ Frequent Limits+ </Badge>+ )}+ </div>+ </TableCell>+ </>+ )}+ </TableRow>+ ))}+ </TableBody>+ </Table>+ ) : (+ <div className="grid grid-cols-2 md:grid-cols-3 gap-4 p-4 overflow-auto">+ {filteredResults?.map((result: any, index: number) => (+ <Card key={index} className="overflow-hidden bg-background">+ <CardContent className="p-4">+ {isErrorResult(result) ? (+ <div className="flex items-start gap-2 text-destructive">+ <AlertCircle className="h-4 w-4 mt-1" />+ <div>+ <p className="font-medium">Error</p>+ <p className="text-sm">{result.error}</p>+ </div>+ </div>+ ) : (+ <div className="space-y-4">+ <div className="flex items-center justify-between">+ <div className="flex items-center gap-2 font-medium">+ {result.name}+ <a+ href={`https://${result.domain}`}+ target="_blank"+ rel="noopener noreferrer"+ className="text-muted-foreground hover:text-primary"+ >+ <ExternalLink className="h-4 w-4" />+ </a>+ </div>+ {result.exists ? (+ <Badge className="bg-green-500">+ <CheckCircle2 className="h-3 w-3 mr-1" />+ Exists+ </Badge>+ ) : (+ <Badge variant="secondary">+ <XCircle className="h-3 w-3 mr-1" />+ Not Found+ </Badge>+ )}+ </div>+ <div className="text-sm text-muted-foreground">Method: {result.method}</div>+ <div className="flex flex-wrap gap-2">+ {result.rateLimit && (+ <Badge variant="destructive" className="bg-yellow-500">+ Rate Limited+ </Badge>+ )}+ {result.frequent_rate_limit && (+ <Badge variant="destructive" className="bg-orange-500">+ Frequent Limits+ </Badge>+ )}+ </div>+ </div>+ )}</CardContent></Card>- </div>- {/* Search and View Toggle */}- <div className="flex items-center gap-2">- <div className="relative flex-1">- <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />- <Input- placeholder="Search services..."- className="pl-8 shadow-none"- value={searchQuery}- onChange={(e) => setSearchQuery(e.target.value)}- />+ ))}+ </div>+ )}+ </div>+ </>+ )+ })++ const MaigretDrawer = memo(() => {+ if (!currentScan || !currentScan.results) {+ return <div className="p-4">No results available</div>+ }++ const userData = currentScan.results+ const platforms = userData.results || {}++ // Filtrer les plateformes en fonction de la recherche+ const filteredPlatforms = Object.entries(platforms).filter(([key, value]) => {+ const platform = value as any+ return (+ key.toLowerCase().includes(searchQuery.toLowerCase()) ||+ platform.status?.site_name?.toLowerCase().includes(searchQuery.toLowerCase()) ||+ platform.status?.url?.toLowerCase().includes(searchQuery.toLowerCase())+ )+ })++ // Obtenir l'image de profil GitHub si disponible+ const githubData = platforms.GitHub+ const profileImage = githubData?.status?.ids?.image || "/placeholder.svg?height=100&width=100"++ // Fonction pour obtenir l'icône appropriée en fonction des tags+ const getIcon = (tags: string[]) => {+ if (tags.includes("coding")) return <Code className="h-5 w-5" />+ if (tags.includes("photo")) return <ImageIcon className="h-5 w-5" />+ if (tags.includes("forum")) return <MessageSquare className="h-5 w-5" />+ if (tags.includes("blog")) return <BookOpen className="h-5 w-5" />+ if (tags.includes("gaming")) return <GamepadIcon className="h-5 w-5" />+ if (tags.includes("social")) return <Users className="h-5 w-5" />+ return <Globe className="h-5 w-5" />+ }++ // Calculer les statistiques+ const stats = {+ total: Object.keys(platforms).length,+ coding: Object.values(platforms).filter((p: any) => p.status?.tags?.includes("coding")).length,+ social: Object.values(platforms).filter(+ (p: any) =>+ p.status?.tags?.includes("photo") || p.status?.tags?.includes("blog") || p.status?.tags?.includes("social"),+ ).length,+ gaming: Object.values(platforms).filter((p: any) => p.status?.tags?.includes("gaming")).length,+ }++ return (+ <>+ <DrawerHeader className="border-b pb-4 p-4">+ <div className="flex items-center gap-4 mb-4">+ <Avatar className="h-16 w-16">+ <img src={profileImage || "/placeholder.svg"} alt={userData.username} />+ </Avatar>+ <div>+ <h3 className="text-xl font-bold">@{userData.username}</h3>+ <p className="text-muted-foreground">Trouvé sur {Object.keys(platforms).length} plateformes</p>+ </div>+ </div>+ <div className="grid grid-cols-4 gap-2 mb-4">+ <Card className="bg-background shadow-none">+ <CardContent className="p-3 flex items-center gap-2">+ <Globe className="h-4 w-4 text-primary" />+ <div>+ <p className="text-xs font-medium">Total</p>+ <p className="text-lg font-bold">{stats.total}</p></div>- <Button variant="outline" size="icon" onClick={() => setViewMode(viewMode === "grid" ? "table" : "grid")}>- {viewMode === "grid" ? <LayoutList className="h-4 w-4" /> : <Grid2X2 className="h-4 w-4" />}- </Button>- </div>- </DrawerHeader>- <div className="h-auto overflow-auto">- {viewMode === "table" ? (- <Table>- <TableHeader>- <TableRow>- <TableHead>Service</TableHead>- <TableHead>Status</TableHead>- <TableHead>Method</TableHead>- <TableHead>Details</TableHead>- </TableRow>- </TableHeader>- <TableBody>- {filteredResults?.map((result: any, index: number) => (- <TableRow key={index}>- {isErrorResult(result) ? (- <>- <TableCell className="font-medium dark:text-red-400 text-destructive px-4"><div>Error</div></TableCell>- <TableCell colSpan={3} className="dark:text-red-400 text-destructive">- {result.error}- </TableCell>- </>- ) : (- <>- <TableCell className="font-medium">- <div className="flex items-center gap-2 px-2">- {result.name}- <a- href={`https://${result.domain}`}- target="_blank"- rel="noopener noreferrer"- className="text-muted-foreground hover:text-primary"- >- <ExternalLink className="h-4 w-4" />- </a>- </div>- </TableCell>- <TableCell>- <div className="flex items-center gap-2">- {result.exists ? (- <Badge className="text-green-500 bg-green-400/10 border border-green-500/30">- <CheckCircle2 className="h-3 w-3 mr-1" />- Exists- </Badge>- ) : (- <Badge variant="secondary">- <XCircle className="h-3 w-3 mr-1" />- Not Found- </Badge>- )}- </div>- </TableCell>- <TableCell>{result.method}</TableCell>- <TableCell>- <div className="flex gap-2">- {result.rateLimit && (- <Badge variant="destructive" className="text-yellow-500 bg-yellow-400/10 border border-yellow-500/30">- Rate Limited- </Badge>- )}- {result.frequent_rate_limit && (- <Badge variant="destructive" className="text-orange-500 bg-orange-400/10 border border-orange-500/30">- Frequent Limits- </Badge>- )}- </div>- </TableCell>- </>- )}- </TableRow>- ))}- </TableBody>- </Table>- ) : (- <div className="grid grid-cols-2 md:grid-cols-3 gap-4 p-4 overflow-auto">- {filteredResults?.map((result: any, index: number) => (- <Card key={index} className="overflow-hidden bg-background">- <CardContent className="p-4">- {isErrorResult(result) ? (- <div className="flex items-start gap-2 text-destructive">- <AlertCircle className="h-4 w-4 mt-1" />- <div>- <p className="font-medium">Error</p>- <p className="text-sm">{result.error}</p>- </div>+ </CardContent>+ </Card>+ <Card className="bg-background shadow-none">+ <CardContent className="p-3 flex items-center gap-2">+ <Code className="h-4 w-4 text-green-500" />+ <div>+ <p className="text-xs font-medium">Dev</p>+ <p className="text-lg font-bold">{stats.coding}</p>+ </div>+ </CardContent>+ </Card>+ <Card className="bg-background shadow-none">+ <CardContent className="p-3 flex items-center gap-2">+ <Users className="h-4 w-4 text-blue-500" />+ <div>+ <p className="text-xs font-medium">Social</p>+ <p className="text-lg font-bold">{stats.social}</p>+ </div>+ </CardContent>+ </Card>+ <Card className="bg-background shadow-none">+ <CardContent className="p-3 flex items-center gap-2">+ <GamepadIcon className="h-4 w-4 text-purple-500" />+ <div>+ <p className="text-xs font-medium">Gaming</p>+ <p className="text-lg font-bold">{stats.gaming}</p>+ </div>+ </CardContent>+ </Card>+ </div>+ {/* Search and View Toggle */}+ <div className="flex items-center gap-2">+ <div className="relative flex-1">+ <Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="Rechercher des plateformes..."+ className="pl-8 shadow-none"+ value={searchQuery}+ onChange={(e) => setSearchQuery(e.target.value)}+ />+ </div>+ <Button variant="outline" size="icon" onClick={() => setViewMode(viewMode === "grid" ? "table" : "grid")}>+ {viewMode === "grid" ? <LayoutList className="h-4 w-4" /> : <Grid2X2 className="h-4 w-4" />}+ </Button>+ </div>+ </DrawerHeader>+ <div className="h-auto overflow-auto">+ {viewMode === "table" ? (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Plateforme</TableHead>+ <TableHead>Rang</TableHead>+ <TableHead>Tags</TableHead>+ <TableHead>URL</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {filteredPlatforms.map(([key, value], index) => {+ const platform = value as any+ return (+ <TableRow key={index}>+ <TableCell className="font-medium">+ <div className="flex items-center gap-2">+ <div className="flex h-8 w-8 items-center justify-center rounded-full bg-muted">+ {platform.status.site_name === "GitHub" ? (+ <GithubIcon className="h-4 w-4" />+ ) : (+ getIcon(platform.status.tags || [])+ )}</div>- ) : (- <div className="space-y-4">- <div className="flex items-center justify-between">- <div className="flex items-center gap-2 font-medium">- {result.name}- <a- href={`https://${result.domain}`}- target="_blank"- rel="noopener noreferrer"- className="text-muted-foreground hover:text-primary"- >- <ExternalLink className="h-4 w-4" />- </a>- </div>- {result.exists ? (- <Badge className="bg-green-500">- <CheckCircle2 className="h-3 w-3 mr-1" />- Exists- </Badge>+ {platform.status.site_name}+ </div>+ </TableCell>+ <TableCell>+ <Badge variant="outline">{platform.rank || "N/A"}</Badge>+ </TableCell>+ <TableCell>+ <div className="flex flex-wrap gap-1">+ {(platform.status.tags || []).map((tag: string, tagIndex: number) => (+ <Badge key={tagIndex} variant="secondary" className="text-xs">+ {tag}+ </Badge>+ ))}+ </div>+ </TableCell>+ <TableCell>+ <a+ href={platform.status.url}+ target="_blank"+ rel="noopener noreferrer"+ className="text-primary hover:underline flex items-center gap-1"+ >+ <span className="truncate max-w-[200px]">{platform.status.url}</span>+ <ExternalLink className="h-3 w-3" />+ </a>+ </TableCell>+ </TableRow>+ )+ })}+ </TableBody>+ </Table>+ ) : (+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4 p-4 overflow-auto">+ {filteredPlatforms.map(([key, value], index) => {+ const platform = value as any+ return (+ <Card key={index} className="overflow-hidden bg-background">+ <CardContent className="p-4">+ <div className="space-y-3">+ <div className="flex items-center justify-between">+ <div className="flex items-center gap-2">+ <div className="flex h-10 w-10 items-center justify-center rounded-full bg-muted">+ {platform.status.site_name === "GitHub" ? (+ <GithubIcon className="h-5 w-5" />) : (- <Badge variant="secondary">- <XCircle className="h-3 w-3 mr-1" />- Not Found- </Badge>+ getIcon(platform.status.tags || []))}</div>- <div className="text-sm text-muted-foreground">Method: {result.method}</div>- <div className="flex flex-wrap gap-2">- {result.rateLimit && (- <Badge variant="destructive" className="bg-yellow-500">- Rate Limited- </Badge>- )}- {result.frequent_rate_limit && (- <Badge variant="destructive" className="bg-orange-500">- Frequent Limits- </Badge>- )}+ <div>+ <h3 className="font-medium">{platform.status.site_name}</h3>+ <p className="text-xs text-muted-foreground">@{platform.status.username}</p></div></div>+ <Badge variant="outline">Rank: {platform.rank || "N/A"}</Badge>+ </div>+ <div className="flex flex-wrap gap-1">+ {(platform.status.tags || []).map((tag: string, tagIndex: number) => (+ <Badge key={tagIndex} variant="secondary" className="text-xs">+ {tag}+ </Badge>+ ))}+ </div>+ <a+ href={platform.status.url}+ target="_blank"+ rel="noopener noreferrer"+ className="text-primary hover:underline flex items-center gap-1 text-sm"+ >+ <span className="truncate">{platform.status.url}</span>+ <ExternalLink className="h-3 w-3 flex-shrink-0" />+ </a>+ {platform.status.site_name === "GitHub" && platform.status.ids && (+ <div className="text-xs text-muted-foreground grid grid-cols-2 gap-x-4 gap-y-1 mt-2 pt-2 border-t">+ <div>Dépôts: {platform.status.ids.public_repos_count}</div>+ <div>Gists: {platform.status.ids.public_gists_count}</div>+ <div>Abonnés: {platform.status.ids.follower_count}</div>+ <div>Abonnements: {platform.status.ids.following_count}</div>+ </div>)}- </CardContent>- </Card>- ))}- </div>- )}+ </div>+ </CardContent>+ </Card>+ )+ })}</div>- </> : !isLoading && <div><DrawerHeader className="border-b pb-4 p-4">- <DrawerTitle className="flex items-center gap-2 mb-2">- Scan Results ({currentScan?.scan_name})- <Badge variant={currentScan?.status === "error" ? "destructive" : "outline"}>{currentScan?.status}</Badge>- </DrawerTitle>- <p className="opacity-60 mb-2 mt-2">{currentScan?.value}</p>- <div>Results are not there yet. They should appear soon.</div>- </DrawerHeader>- </div>- }+ )}+ </div></>)})- const SherlockDrawer = memo(() => (- <><DrawerHeader className="border-b pb-4 p-4">- <DrawerTitle className="flex items-center gap-2 mb-2">- Scan Results ({currentScan?.scan_name})- <Badge variant={currentScan?.status === "error" ? "destructive" : "outline"}>{currentScan?.status}</Badge>- </DrawerTitle>- <p className="opacity-60 mb-2 mt-2">{currentScan?.value}</p>- <div>Results are not there yet. They should appear soon.</div>- </DrawerHeader>+ const RawResults = memo(() => (+ <><div className="p-4">- <pre className="overflow-auto max-h-[500px] rounded-md p-3 border"><code>{JSON.stringify(currentScan?.results, null, 2)}</code></pre>+ <pre className="overflow-auto max-h-[500px] relative rounded-md p-3 border">+ <code>{JSON.stringify(currentScan?.results, null, 2)}</code>+ <div className="absolute top-2 right-2">+ <CopyButton content={JSON.stringify(currentScan?.results)} />+ </div>+ </pre></div></>))@@ -330,18 +584,42 @@ export function ScanDrawer() {return (<Drawer open={open} onOpenChange={setOpen}><DrawerContent className="h-[90vh] !max-h-none border flex flex-col">- {isLoading &&+ {isLoading ? (<DrawerHeader className="border-b pb-4 p-4"><DrawerTitle className="flex items-center gap-2 mb-2">Scan Results<Badge variant={currentScan?.status === "error" ? "destructive" : "outline"}>{currentScan?.status}</Badge></DrawerTitle><p className="opacity-60 mb-2 mt-2">{currentScan?.value}</p>- <div className="h-[400px] w-full flex items-center justify-center gap-1"><Loader /> Loading results...</div>- </DrawerHeader>}- {currentScan?.scan_name === "holehe_scanner" ? <HoleheDrawer /> : <SherlockDrawer />}+ <div className="h-[400px] w-full flex items-center justify-center gap-1">+ <Loader /> Loading results...+ </div>+ </DrawerHeader>+ ) : (+ <>+ <DrawerHeader className="border-b pb-4 p-4">+ <DrawerTitle className="flex items-center gap-2 mb-2">+ Scan Results+ <Badge variant={currentScan?.status === "error" ? "destructive" : "outline"}>+ {currentScan?.status}+ </Badge>+ </DrawerTitle>+ <p className="opacity-60 mb-2 mt-2">{currentScan?.value}</p>+ </DrawerHeader>+ {currentScan?.status === "pending" ? (+ <div className="p-4">+ <div>Results are not there yet. They should appear soon.</div>+ </div>+ ) : scanFormat === "holehe" ? (+ <HoleheDrawer />+ ) : scanFormat === "maigret" ? (+ <MaigretDrawer />+ ) : (+ <RawResults />+ )}+ </>+ )}</DrawerContent></Drawer>)}-diff --git a/flowsint-web/src/lib/utils.ts b/flowsint-web/src/lib/utils.tsindex 7bbe2437..08f3ccc9 100644--- a/flowsint-web/src/lib/utils.ts+++ b/flowsint-web/src/lib/utils.ts@@ -515,5 +515,5 @@ export function encodedRedirect(export const scans = [{ name: "email", scan_name: "holehe_scanner" },- { name: "username", scan_name: "sherlock_scanner" }+ { name: "username", scan_name: "maigret_scanner" }]