🕵️♂️ (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.
Python cybersecuritycybersecurity-toolsemail-osintethical-hackingethical-hacking-toolsidentificationinfosecosintosint-emailosint-toolosint-toolsosint-usernamepentestingpythonredteam-toolsredteamingthreat-intelligence
fix: update existing user_scan modules
Kaif9b3a460bfcad
diff --git a/user_scanner/user_scan/creator/boosty.py b/user_scanner/user_scan/creator/boosty.pyindex 0710f1c..906ede6 100644--- a/user_scanner/user_scan/creator/boosty.py+++ b/user_scanner/user_scan/creator/boosty.py@@ -1,44 +1,58 @@-from user_scanner.core.orchestrator import generic_validate, Result+import json+from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Result-def validate_boosty(user):++def validate_boosty(user: str) -> Result:+ # Boosty API endpoint for user blog profileurl = f"https://api.boosty.to/v1/blog/{user}"show_url = f"https://boosty.to/{user}"- def process(response):- if response.status_code == 200:+ def process(r):+ if r.status_code == 200:try:- data = response.json()- if data.get('owner'):+ data = json.loads(r.text)+ # If it's a valid blog, it contains a unique ID or title+ if "title" in data:extra = {}-- owner = data.get('owner', {})- if owner.get('id'):- extra['id'] = owner.get('id')- if owner.get('name'):- extra['name'] = owner.get('name')-- count = data.get('count', {})- if count.get('subscribers') is not None:- extra['subscribers'] = count.get('subscribers')- if count.get('posts') is not None:- extra['posts'] = count.get('posts')-- if data.get('title'):- extra['title'] = data.get('title')-- apps = owner.get('externalApps', {})- if apps.get('discord', {}).get('hasAccount'):- extra['has_discord'] = True- if apps.get('telegram', {}).get('hasAccount'):- extra['has_telegram'] = True+ if data.get("title"):+ extra["display_name"] = data.get("title")++ counts = data.get("count", {})+ if counts.get("subscribers") is not None:+ extra["subscribers"] = int(counts.get("subscribers"))+ if counts.get("posts") is not None:+ extra["posts"] = int(counts.get("posts"))++ owner = data.get("owner", {})+ if owner.get("avatarUrl"):+ extra["avatar_url"] = owner.get("avatarUrl")+ if owner.get("name") and owner.get("name") != data.get("title"):+ extra["owner_name"] = owner.get("name")++ # Extract social links if present+ links = []+ for link in data.get("socialLinks", []):+ if link.get("url"):+ links.append(link.get("url"))+ if links:+ extra["links"] = linksreturn Result.taken(extra=extra)except Exception:pass- elif response.status_code == 404:++ if r.status_code == 404:+ try:+ data = json.loads(r.text)+ if data.get("error") == "blog_not_found":+ return Result.available()+ except Exception:+ passreturn Result.available()-- return Result.error("Unexpected response body, report it via GitHub issues.")- headers = {"Accept": "application/json"}- return generic_validate(url, process, show_url=show_url, headers=headers)+ return Result.error(f"HTTP {r.status_code}")++ return generic_validate(+ url, process, show_url=show_url, follow_redirects=True+ )diff --git a/user_scanner/user_scan/creator/substack.py b/user_scanner/user_scan/creator/substack.pyindex d0bacce..e1eeacd 100644--- a/user_scanner/user_scan/creator/substack.py+++ b/user_scanner/user_scan/creator/substack.py@@ -1,50 +1,57 @@-import re-from user_scanner.core.helpers import get_random_user_agent-from user_scanner.core.orchestrator import Result, make_request+import json+from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Resultdef validate_substack(user: str) -> Result:- if not (4 <= len(user) <= 32):- return Result.error("Length must be 4-32 characters")-- if not re.match(r"^[a-z0-9]+$", user):- if re.search(r"[A-Z]", user):- return Result.error("Use lowercase letters only")- return Result.error("Usernames can only contain lowercase letters and numbers")-- url = f"https://{user}.substack.com"- show_url = f"https://{user}.substack.com"-- headers = {- "User-Agent": get_random_user_agent(),- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",- "Accept-Encoding": "identity",- "accept-language": "en-US,en;q=0.9",- "priority": "u=0, i",- }-- try:- response = make_request(url, headers=headers, follow_redirects=True)- if response.status_code == 200:- html = response.text- extra = {}- import json- ld = re.search(r'<script type=\"application/ld\+json\">(.*?)</script>', html, re.DOTALL)- if ld:- try:- data = json.loads(ld.group(1))- if isinstance(data, list): data = data[0]- if name := data.get("name"): extra["name"] = name- except Exception:- pass- if "name" not in extra:- title = re.search(r'<title>([^<]+)</title>', html)- if title and "|" in title.group(1):- extra["name"] = title.group(1).split("|")[0].strip()- return Result.taken(extra=extra, url=show_url)- elif response.status_code == 404:- return Result.available(url=show_url)- else:- return Result.error(f"Unexpected status: {response.status_code}", url=show_url)- except Exception as e:- return Result.error(e, url=show_url)+ # Substack public profile API endpoint+ url = f"https://substack.com/api/v1/user/{user}/public_profile"+ show_url = f"https://substack.com/@{user}"++ def process(r):+ if r.status_code == 200:+ try:+ data = json.loads(r.text)+ # Claimed profile has an id and name+ if "id" in data:+ extra = {}+ if data.get("name"):+ extra["display_name"] = data.get("name")+ if data.get("handle"):+ extra["handle"] = data.get("handle")+ if data.get("bio"):+ extra["bio"] = data.get("bio")+ if data.get("photo_url"):+ extra["avatar_url"] = data.get("photo_url")++ # Extract publication info if they have one+ primary_pub = data.get("primaryPublication") or {}+ if primary_pub.get("name"):+ extra["publication_name"] = primary_pub.get("name")+ if primary_pub.get("subdomain"):+ extra["publication_url"] = f"https://{primary_pub.get('subdomain')}.substack.com"++ # Follower/subscriber counts+ if data.get("subscriberCountNumber") is not None:+ extra["subscribers"] = int(data.get("subscriberCountNumber"))+ if data.get("followerCount") is not None:+ extra["followers"] = int(data.get("followerCount"))++ return Result.taken(extra=extra)+ except Exception:+ pass++ if r.status_code == 404:+ try:+ data = json.loads(r.text)+ if data.get("error") == "profile not found":+ return Result.available()+ except Exception:+ pass+ return Result.available()++ return Result.error(f"HTTP {r.status_code}")++ return generic_validate(+ url, process, show_url=show_url, follow_redirects=True+ )diff --git a/user_scanner/user_scan/social/flickr.py b/user_scanner/user_scan/social/flickr.pyindex ca248b4..d24d568 100644--- a/user_scanner/user_scan/social/flickr.py+++ b/user_scanner/user_scan/social/flickr.py@@ -1,86 +1,60 @@-import jsonimport re--from user_scanner.core.helpers import get_random_user_agent-from user_scanner.core.orchestrator import Result, make_request+import json+import urllib.parse+from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Resultdef validate_flickr(user: str) -> Result:- url = f"https://www.flickr.com/photos/{user}/"- headers = {- "User-Agent": get_random_user_agent()- }+ url = f"https://www.flickr.com/photos/{user}"+ show_url = f"https://www.flickr.com/photos/{user}"- try:- response = make_request(url, headers=headers)- if response.status_code == 404:- return Result.available(url=url)+ def process(r):+ if r.status_code == 404:+ return Result.available()- if response.status_code == 200:+ if r.status_code == 200:extra = {}- # extract modelExport JSON- match = re.search(r"modelExport:(.*),[\s\S]*auth", response.text)+ match = re.search(r"modelExport:\s*(.*?),\s*auth", r.text)if match:try:- json_str = match.group(1).replace(- '%20', ' ').replace('%2C', ',')- data = json.loads(json_str)-- def find_model(d, registry_name):- if isinstance(d, dict):- if d.get('_flickrModelRegistry') == registry_name:- return d- for k, v in d.items():- res = find_model(v, registry_name)- if res:- return res- elif isinstance(d, list):- for i in d:- res = find_model(i, registry_name)- if res:- return res- return None-- person_model = find_model(data, 'person-models')- if person_model:- if person_model.get('id'):- extra['flickr_id'] = person_model['id']- if person_model.get('pathAlias'):- extra['flickr_username'] = person_model['pathAlias']- if person_model.get('username'):- extra['flickr_nickname'] = person_model['username']- if person_model.get('realname'):- extra['fullname'] = person_model['realname']- buddyicon = person_model.get('buddyicon', {})- if isinstance(buddyicon, dict) and buddyicon.get('data', {}).get('retina'):- extra['image'] = 'https:' + \- buddyicon['data']['retina']- if 'isPro' in person_model:- extra['is_pro'] = str(person_model['isPro'])-- profile_model = find_model(data, 'person-profile-models')- if profile_model:- if profile_model.get('location'):- extra['location'] = profile_model['location']- if 'photoCount' in profile_model:- extra['photos_count'] = str(- profile_model['photoCount'])+ raw_encoded = match.group(1)+ raw_decoded = urllib.parse.unquote(raw_encoded)+ data = json.loads(raw_decoded)+ main = data.get("main", {})++ photostream = main.get("photostream-models", [{}])[0].get("data", {})+ owner = photostream.get("owner", {}).get("data", {})+ profile = main.get("person-profile-models", [{}])[0].get("data", {})+ contacts = main.get("person-contacts-count-models", [{}])[0].get("data", {})++ if owner.get("username"):+ extra["display_name"] = owner.get("username")+ if owner.get("realname"):+ extra["fullname"] = owner.get("realname")+ if profile.get("location"):+ extra["location"] = profile.get("location")++ avatar_retina = owner.get("buddyicon", {}).get("data", {}).get("retina") or owner.get("buddyicon", {}).get("retina")+ if avatar_retina:+ if avatar_retina.startswith("//"):+ avatar_retina = "https:" + avatar_retina+ extra["avatar_url"] = avatar_retina++ if profile.get("photoCount") is not None:+ extra["photos"] = int(profile.get("photoCount"))+ if contacts.get("followerCount") is not None:+ extra["followers"] = int(contacts.get("followerCount"))+ if contacts.get("followingCount") is not None:+ extra["following"] = int(contacts.get("followingCount"))- contacts_model = find_model(- data, 'person-contacts-count-models')- if contacts_model:- if 'followerCount' in contacts_model:- extra['follower_count'] = str(- contacts_model['followerCount'])- if 'followingCount' in contacts_model:- extra['following_count'] = str(- contacts_model['followingCount'])except Exception:pass- return Result.taken(extra=extra, url=url)+ return Result.taken(extra=extra)- return Result.error(f"Unexpected status: {response.status_code}", url=url)+ return Result.error(f"HTTP {r.status_code}")- except Exception as e:- return Result.error(e, url=url)+ return generic_validate(+ url, process, show_url=show_url, follow_redirects=True+ )