🕵️♂️ (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
feat: Ko-fi username module (#597)
Kristo Isbergbfa9d92772dd
diff --git a/tests/test_pivots.py b/tests/test_pivots.pyindex 8aa802f..c297658 100644--- a/tests/test_pivots.py+++ b/tests/test_pivots.py@@ -41,6 +41,8 @@ def make_result(site_name="Gravatar", extra=None, found=True, **kwargs):("https://johndoe.github.io", ("github", "johndoe")),("https://bsky.app/profile/johndoe.bsky.social", ("bluesky", "johndoe")),("https://www.reddit.com/user/johndoe/", ("reddit", "johndoe")),+ ("https://ko-fi.com/johndoe", ("kofi", "johndoe")),+ ("https://buymeacoffee.com/johndoe", ("buymeacoffee", "johndoe")),],)def test_resolve_url_reads_the_handle(url, expected):diff --git a/user_scanner/core/pivots.py b/user_scanner/core/pivots.pyindex b8585c8..419e07a 100644--- a/user_scanner/core/pivots.py+++ b/user_scanner/core/pivots.py@@ -233,7 +233,8 @@ _HOST_ROUTES: Tuple[Tuple[Tuple[str, ...], str, Tuple[str, ...]], ...] = ((("figma.com",), "figma", (_AT,)),(("producthunt.com",), "producthunt", (_AT,)),(("patreon.com",), "patreon", (_BARE,)),- (("ko-fi.com", "buymeacoffee.com"), "buymeacoffee", (_BARE,)),+ (("ko-fi.com",), "kofi", (_BARE,)),+ (("buymeacoffee.com",), "buymeacoffee", (_BARE,)),(("liberapay.com",), "liberapay", (_BARE,)),(("goodreads.com",), "goodreads", (r"^/user/show/\d+-(?P<user>[^/?#]+)/?$",)),(("myanimelist.net",), "myanimelist", (r"^/profile/(?P<user>[^/?#]+)/?$",)),diff --git a/user_scanner/user_scan/donation/kofi.py b/user_scanner/user_scan/donation/kofi.pynew file mode 100644index 0000000..3c389ec--- /dev/null+++ b/user_scanner/user_scan/donation/kofi.py@@ -0,0 +1,87 @@+import html+import re++from user_scanner.core.orchestrator import Result, generic_validate+++def _text(value: str) -> str:+ return " ".join(html.unescape(re.sub(r"<[^>]+>", " ", value)).split())+++def validate_kofi(user: str) -> Result:+ url = f"https://ko-fi.com/{user}"++ def process(response):+ if response.status_code != 200:+ return Result.error(f"Unexpected status: {response.status_code}")++ page = response.text+ profile_marker = re.search(+ rf'<meta property="og:url" content="{re.escape(url)}(?:[/?][^"]*)?"', page+ )++ if profile_marker and 'id="displayName"' in page:+ extra = {}+ media = {}++ if match := re.search(+ r'<span id="displayName">\s*([^<]+?)\s*</span>', page+ ):+ extra["name"] = _text(match.group(1))+ if match := re.search(r'\bdata-reported-page-id="([^"]+)"', page):+ extra["id"] = match.group(1)+ if match := re.search(+ r'class="kfds-c-profile-link-handle[^"]*"[^>]*>\s*'+ r"([\d,]+)\s+(Followers|Supporters)\s*</",+ page,+ ):+ extra[match.group(2).lower()] = int(match.group(1).replace(",", ""))+ if match := re.search(+ r'id="expanded-page"[^>]*>\s*<p[^>]*>(.*?)</p>', page, re.DOTALL+ ):+ extra["bio"] = _text(match.group(1))++ categories = [+ _text(value)+ for value in re.findall(+ r'<span class="label-tag">\s*(.*?)\s*</span>', page, re.DOTALL+ )+ ]+ if categories:+ extra["categories"] = list(dict.fromkeys(categories))++ features = [+ _text(value)+ for value in re.findall(+ r'class="kfds-c-profile-tab-box"[^>]*>.*?<label[^>]*>(.*?)</label>',+ page,+ re.DOTALL,+ )+ ]+ if features:+ extra["features"] = list(dict.fromkeys(features))++ links = re.findall(+ r'<a(?=[^>]*\bid="socialLink_)[^>]*\bhref="([^"]+)"',+ page,+ )+ if match := re.search(+ r'<div class="social-link[^"]*"[^>]*>.*?<a[^>]+href="([^"]+)"',+ page,+ re.DOTALL,+ ):+ links.insert(0, match.group(1))+ if links:+ extra["links"] = list(dict.fromkeys(map(html.unescape, links)))++ if match := re.search(r'<img id="profilePicture"[^>]+src="([^"]+)"', page):+ media["avatar"] = html.unescape(match.group(1))++ return Result.taken(extra=extra, media=media)++ if '<meta property="og:url" content="https://ko-fi.com/"' in page:+ return Result.available()++ return Result.error("Unexpected response body")++ return generic_validate(url, process, show_url=url, follow_redirects=True)