Skip to content

Commit e04cbde

Browse files
committed
add: Poc: email availability check for X.com
1 parent f0a7c34 commit e04cbde

File tree

1 file changed

+26
-0
lines changed
  • user_scanner/email_scan/social

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import asyncio
2+
import httpx
3+
4+
async def check_x(email):
5+
url = f"https://api.x.com/i/users/email_available.json?email={email}"
6+
headers = {
7+
"user-agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36",
8+
"x-twitter-client-language": "en",
9+
"x-twitter-active-user": "yes",
10+
"referer": "https://x.com/"
11+
}
12+
13+
async with httpx.AsyncClient(http2=True) as client:
14+
try:
15+
resp = await client.get(url, headers=headers)
16+
data = resp.json()
17+
if data.get("taken"):
18+
return f"[!] {email} -> REGISTERED"
19+
return f"[*] {email} -> NOT REGISTERED"
20+
except Exception as e:
21+
return f"Error checking {email}: {e}"
22+
23+
if __name__ == "__main__":
24+
target_email = input("Enter Email: ").strip()
25+
result = asyncio.run(check_x(target_email))
26+
print(result)

0 commit comments

Comments
 (0)