socialscan 为在线平台上的电子邮件地址和用户名使用提供准确且快速的检查。
给定一个电子邮件地址或用户名,socialscan 返回该地址或用户名在在线平台上是可用、已被占用还是无效。
socialscan 与类似工具(例如 knowem.com、Namechk 和 Sherlock)的不同之处在于:
100% 准确率:socialscan 的查询方法消除了类似工具中常见的误报和漏报,确保结果始终准确。
速度:socialscan 使用 asyncio 和 aiohttp 同时执行所有查询,即使涉及数百个用户名和电子邮件地址的批量查询也能快速完成。在一台配置和网速一般的测试计算机上,100 次查询在约 4 秒内完成。
库/命令行界面(CLI):socialscan 可通过 CLI 执行,或作为 Python 库导入以用于现有代码。
电子邮件支持:socialscan 支持查询电子邮件地址和用户名。
目前支持以下平台:

其他类似工具通过请求所查询用户名的个人资料页面,并根据 HTTP 状态码或请求页面上的错误文本等信息来判断用户名是否已被占用。这是一种朴素的方法,存在以下不足:
保留关键字:大多数平台都有一组不允许在用户名中使用的关键字
(一个简单的测试:尝试检查 'admin'、'home' 或 'root' 等保留字,看看其他服务是否将它们标记为可用)
已删除/已封禁的账户:已删除或已封禁的账户用户名往往不可用,即使其个人资料页面可能不存在
因此,这些工具容易产生误报和漏报。这种检查方法还依赖于平台设有基于网页的个人资料页面,并且无法扩展到电子邮件地址。
socialscan 旨在弥补这些不足,它直接查询平台的注册服务器,获取相应的 CSRF 令牌、请求头和 Cookie。
> pip install socialscan
> git clone https://github.com/iojw/socialscan.git
> cd socialscan
> pip install .
usage: socialscan [list of usernames/email addresses to check]
optional arguments:
-h, --help show this help message and exit
--platforms [platform [platform ...]], -p [platform [platform ...]]
list of platforms to query (default: all platforms)
--view-by {platform,query}
view results sorted by platform or by query (default:
query)
--available-only, -a only print usernames/email addresses that are
available and not in use
--cache-tokens, -c cache tokens for platforms requiring more than one
HTTP request (Snapchat, GitHub, Instagram. Lastfm &
Tumblr), reducing total number of requests sent
--input input.txt, -i input.txt
file containg list of queries to execute
--proxy-list proxy_list.txt
file containing list of HTTP proxy servers to execute
queries with
--verbose, -v show query responses as they are received
--show-urls display profile URLs for usernames on supported platforms
(profiles may not exist if usernames are reserved or belong to deleted/banned accounts)
--json json.txt output results in JSON format to the specified file
--version show program's version number and exit
socialscan 也可以导入到现有代码中作为库使用。
v1.0.0 引入了异步方法 execute_queries 及其对应的同步封装器 sync_execute_queries,该方法接受一个查询列表以及可选的平台和代理列表,并发执行所有查询。之后该方法按原顺序返回结果列表。
from socialscan.util import Platforms, sync_execute_queries
queries = ["username1", "[email protected]", "[email protected]"]
platforms = [Platforms.GITHUB, Platforms.LASTFM]
results = sync_execute_queries(queries, platforms)
for result in results:
print(f"{result.query} on {result.platform}: {result.message} (Success: {result.success}, Valid: {result.valid}, Available: {result.available})")
输出:
username1 on GitHub: Username is already taken (Success: True, Valid: True, Available: False)
username1 on Lastfm: Sorry, this username isn't available. (Success: True, Valid: True, Available: False)
[email protected] on GitHub: Available (Success: True, Valid: True, Available: True)
[email protected] on Lastfm: Sorry, that email address is already registered to another account. (Success: True, Valid: True, Available: False)
[email protected] on GitHub: Available (Success: True, Valid: True, Available: True)
[email protected] on Lastfm: Looking good! (Success: True, Valid: True, Available: True)
对于使用 --input 选项的批量查询,请在 .txt 文件中每行放置一个用户名或电子邮件地址:
username1
[email protected]
username3
如果您觉得这个工具有用并希望支持其持续开发,可以在此处捐赠。感谢您的支持。
BTC: bc1qwrnukyc6xh9aygu5ps2geh8stmvagsj5u4v7j6
ETH: 0x45a0F91666391078eA521A6123559E49DAb1275f
发现错误、有建议或想添加站点?提交问题。
始终欢迎拉取请求(PR)🙂
在提交 PR 之前,请确保使用 pyproject.toml 中的配置通过 black 格式化代码。
MPL 2.0
| 用户名 | 电子邮件 |
|---|
| ✔️ | ✔️ | |
| ✔️ | ✔️ | |
| GitHub | ✔️ | ✔️ |
| Tumblr | ✔️ | ✔️ |
| Lastfm | ✔️ | ✔️ |
| Snapchat | ✔️ | |
| GitLab | ✔️ | |
| ✔️ | ||
| Yahoo | ✔️ | |
| ✔️ | ||
| Firefox | ✔️ |