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: data extraction logic for 4 modules in `other`(2) and `finance`(2) category

Kaif9dfca500d933
diff --git a/user_scanner/user_scan/finance/advfn.py b/user_scanner/user_scan/finance/advfn.py
index 2070fb6..6b03de5 100644
--- a/user_scanner/user_scan/finance/advfn.py
+++ b/user_scanner/user_scan/finance/advfn.py
@@ -1,12 +1,50 @@
from user_scanner.core.orchestrator import generic_validate, Result
+import re as local_re
+
def validate_advfn(user):
url = f"https://uk.advfn.com/forum/profile/{user}"
show_url = url
def process(response):
if "Profile | ADVFN" in response.text:
- return Result.taken()
+ extra = {}
+ html = response.text
+
+ avatar_match = local_re.search(r'<img class="profile-pic" src="([^"]+)">', html)
+ if avatar_match:
+ url_src = avatar_match.group(1)
+ if url_src.startswith("//"):
+ url_src = "https:" + url_src
+ extra["avatar"] = url_src
+
+ joined_match = local_re.search(r'<span class="registration">Member since:\s*([^<]+)</span>', html)
+ if joined_match:
+ extra["joined"] = joined_match.group(1).strip()
+
+ sub_match = local_re.search(r'<p class="subscription">([^<]+)</p>', html)
+ if sub_match:
+ extra["subscription"] = sub_match.group(1).strip()
+
+ posts_match = local_re.search(r'href="#posts"><span>(\d+)</span>Posts</a>', html)
+ if posts_match:
+ extra["posts"] = int(posts_match.group(1))
+
+ followers_match = local_re.search(r'href="#followers"><span>(\d+)</span>Followers</a>', html)
+ if followers_match:
+ extra["followers"] = int(followers_match.group(1))
+
+ following_match = local_re.search(r'href="#following"><span>(\d+)</span>Following</a>', html)
+ if following_match:
+ extra["following"] = int(following_match.group(1))
+
+ about_match = local_re.search(r'<h2>About</h2>\s*(?:<div[^>]*>)?\s*<p>([\s\S]*?)</p>', html)
+ if about_match:
+ bio = about_match.group(1).strip()
+ if "has no comment yet" not in bio.lower():
+ extra["bio"] = bio
+
+ return Result.taken(extra=extra)
if "ADVFN ERROR - Page Not Found" in response.text:
return Result.available()
@@ -14,3 +52,4 @@ def validate_advfn(user):
return Result.error("Unexpected response body, report it via GitHub issues.")
return generic_validate(url, process, show_url=show_url)
+
diff --git a/user_scanner/user_scan/finance/etoro.py b/user_scanner/user_scan/finance/etoro.py
index b151833..f163619 100644
--- a/user_scanner/user_scan/finance/etoro.py
+++ b/user_scanner/user_scan/finance/etoro.py
@@ -12,7 +12,34 @@ def validate_etoro(user):
def process(response):
if '"gcid":' in response.text:
- return Result.taken()
+ extra = {}
+ try:
+ data = response.json()
+ first = data.get("firstName")
+ last = data.get("lastName")
+ if first or last:
+ name_parts = []
+ if first: name_parts.append(first.strip())
+ if last: name_parts.append(last.strip())
+ extra["name"] = " ".join(name_parts)
+
+ bio = data.get("aboutMe")
+ if bio:
+ extra["bio"] = bio.strip()
+ else:
+ bio_short = data.get("aboutMeShort")
+ if bio_short:
+ extra["bio"] = bio_short.strip()
+
+ avatars = data.get("avatars")
+ if avatars and isinstance(avatars, list) and len(avatars) > 0:
+ extra["avatar"] = avatars[0]["url"]
+
+ if data.get("isVerified"):
+ extra["is_verified"] = True
+ except Exception:
+ pass
+ return Result.taken(extra=extra)
if '"ErrorCode":"NotFound"' in response.text:
return Result.available()
@@ -23,3 +50,4 @@ def validate_etoro(user):
return Result.error("Unexpected API response format.")
return generic_validate(url, process, headers=headers, show_url=show_url)
+
diff --git a/user_scanner/user_scan/other/pastebin.py b/user_scanner/user_scan/other/pastebin.py
index 3b3f06f..d196eb0 100644
--- a/user_scanner/user_scan/other/pastebin.py
+++ b/user_scanner/user_scan/other/pastebin.py
@@ -1,8 +1,67 @@
-from user_scanner.core.orchestrator import status_validate
+from user_scanner.core.orchestrator import generic_validate, Result
+import re as local_re
def validate_pastebin(user):
-
url = f"https://pastebin.com/u/{user}"
- show_url = f"https://pastebin.com/u/{user}"
+ show_url = url
+
+ def process(response):
+ if response.status_code == 200:
+ if "info-bar" in response.text or "user-icon" in response.text:
+ extra = {}
+ html = response.text
+
+ # Avatar
+ avatar_match = local_re.search(r'<div class="user-icon">\s*<img src="([^"]+)"', html)
+ if avatar_match:
+ avatar_src = avatar_match.group(1)
+ if "guest.png" not in avatar_src:
+ if avatar_src.startswith("/"):
+ avatar_src = "https://pastebin.com" + avatar_src
+ extra["avatar"] = avatar_src
+
+ # Pro User
+ if 'class="pro"' in html:
+ extra["pro_user"] = True
+
+ # Views
+ views_match = local_re.search(r'<span class="views"[^>]*>([\d,]+)</span>', html)
+ if views_match:
+ extra["views"] = int(views_match.group(1).replace(",", ""))
+
+ # All Views
+ all_views_match = local_re.search(r'<span class="views -all"[^>]*>([\d,]+)</span>', html)
+ if all_views_match:
+ extra["all_views"] = int(all_views_match.group(1).replace(",", ""))
+
+ # Rating
+ rating_match = local_re.search(r'<span class="rating"[^>]*>([^\s<]+)</span>', html)
+ if rating_match:
+ extra["rating"] = rating_match.group(1)
+
+ # Joined date
+ joined_match = local_re.search(r'class="date-text"\s+title="([^"]+)"', html)
+ if joined_match:
+ extra["joined"] = joined_match.group(1)
+
+ # Website
+ web_match = local_re.search(r'<a[^>]+class="web"[^>]*href="([^"]+)"', html)
+ if web_match:
+ extra["website"] = web_match.group(1)
+
+ # Location
+ loc_match = local_re.search(r'<span[^>]+class="location"[^>]*>([\s\S]*?)</span>', html)
+ if loc_match:
+ extra["location"] = loc_match.group(1).strip()
+
+ return Result.taken(extra=extra)
+
+ return Result.available()
+
+ if response.status_code == 404:
+ return Result.available()
+
+ return Result.error(f"Unexpected status code: {response.status_code}")
+
+ return generic_validate(url, process, show_url=show_url)
- return status_validate(url, 404, 200, show_url=show_url)
diff --git a/user_scanner/user_scan/other/zomato.py b/user_scanner/user_scan/other/zomato.py
index 21ced1b..caf17a4 100644
--- a/user_scanner/user_scan/other/zomato.py
+++ b/user_scanner/user_scan/other/zomato.py
@@ -1,4 +1,6 @@
-from user_scanner.core.orchestrator import status_validate
+from user_scanner.core.orchestrator import generic_validate, Result
+import re as local_re
+import json
def validate_zomato(user):
url = f"https://www.zomato.com/{user}/reviews"
@@ -8,4 +10,55 @@ def validate_zomato(user):
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
}
- return status_validate(url, 404, 200, headers=headers, show_url=show_url)
+ def process(response):
+ if response.status_code == 200:
+ match = local_re.search(r'window\.__PRELOADED_STATE__\s*=\s*JSON\.parse\("([\s\S]*?)"\);', response.text)
+ if not match:
+ match = local_re.search(r'window\.__PRELOADED_STATE__\s*=\s*([\s\S]*?);', response.text)
+
+ extra = {}
+ if match:
+ try:
+ raw_json_str = match.group(1)
+ if raw_json_str.startswith('"'):
+ decoded_js_str = json.loads(raw_json_str)
+ else:
+ decoded_js_str = json.loads(f'"{raw_json_str}"')
+
+ data = json.loads(decoded_js_str)
+ user_id = data.get("pages", {}).get("current", {}).get("userId")
+ if user_id:
+ user_id_str = str(user_id)
+ basic_info = data.get("pages", {}).get("user", {}).get(user_id_str, {}).get("sections", {}).get("SECTION_USER_BASIC_INFO", {})
+
+ if name := basic_info.get("name"):
+ extra["name"] = name.strip()
+ if bio := basic_info.get("bio"):
+ extra["bio"] = bio.strip()
+ if rank := basic_info.get("foodieRankText"):
+ extra["rank"] = rank.strip()
+ if country := basic_info.get("countryName"):
+ extra["country"] = country.strip()
+ if city := basic_info.get("cityName"):
+ extra["city"] = city.strip()
+ if followers := basic_info.get("followersCount"):
+ extra["followers"] = int(followers)
+ if reviews := basic_info.get("reviewsCount"):
+ extra["reviews"] = int(reviews)
+ if photos := basic_info.get("photoCount"):
+ extra["photos"] = int(photos)
+ if avatar := basic_info.get("profilePicture"):
+ extra["avatar"] = avatar.strip()
+ if website := basic_info.get("websiteLink"):
+ extra["website"] = website.strip()
+ except Exception:
+ pass
+ return Result.taken(extra=extra)
+
+ if response.status_code == 404:
+ return Result.available()
+
+ return Result.error(f"Unexpected status: {response.status_code}")
+
+ return generic_validate(url, process, headers=headers, show_url=show_url)
+