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.

add: HackerNews username validation in community category

kaifcodec9d7f73d11640
diff --git a/user_scanner/community/hackernews.py b/user_scanner/community/hackernews.py
new file mode 100644
index 0000000..b09d8dc
--- /dev/null
+++ b/user_scanner/community/hackernews.py
@@ -0,0 +1,33 @@
+import re
+from user_scanner.core.orchestrator import generic_validate, Result
+
+
+def validate_hackernews(user: str) -> Result:
+ if not (2 <= len(user) <= 15):
+ return Result.error("Length must be 2-15 characters.")
+
+ if not re.match(r'^[a-zA-Z0-9_-]+$', user):
+ return Result.error("Only use letters, numbers, underscores, and hyphens.")
+
+ url = f"https://news.ycombinator.com/user?id={user}"
+
+ def process(response):
+ if "No such user." in response.text:
+ return Result.available()
+ if f"profile: {user}" in response.text.lower() or "created:" in response.text:
+ return Result.taken()
+ return Result.error("Unexpected response structure.")
+
+ return generic_validate(url, process, timeout=3.0, follow_redirects=True)
+
+
+if __name__ == "__main__":
+ user = input("Username?: ").strip()
+ result = validate_hackernews(user)
+
+ if result == 1:
+ print("Available!")
+ elif result == 0:
+ print("Unavailable!")
+ else:
+ print(f"Error occurred! Reason: {result.get_reason()}")