Socialscan:一款準確且快速的在線郵件地址及用戶名查詢工具
Socialscan是一款社交賬號搜索工具,它可以幫助用戶檢測在線平臺上已註冊的郵件地址以及用戶名,並且準確率爲100%。用戶只需要提供一個郵件地址或者用戶名,Socialscan可以告訴你這個郵件或用戶名在當前的在線平臺上是否可用。
Socialscan跟其他類似工具(例如knowem.com、Namechk和Sherlock)的不同之處在於:
1、100%準確率:Socialscan的查詢方法消除了目前社區中類似工具經常出現的誤報和漏報,確保查詢結果始終準確。 2、查詢速度:Socialscan使用了asyncio和aiohttp來同時執行所有查詢,即使批量查詢數百個用戶名和電子郵件地址,Socialscan也能夠快速提供準確的搜索結果。在我們的測試設備上,Socialscan在4秒內可以執行100次查詢。 3、Python庫/命令行:Socialscan可以通過命令行工具來執行,或者以Python庫的形式在其他代碼中使用。 4、電子郵件支持:Socialscan支持查詢電子郵件地址和用戶名。
Socialscan支持的平臺
下面給出的是Socialscan當前支持的查詢平臺:
工具背景
社區中類似的用戶名查詢工具通過請求目標用戶名的配置頁面來檢查用戶名的可用性,並根據請求頁上的HTTP狀態碼或錯誤文本等信息來判斷目標用戶名是否存在。這種方法其實並不可靠,並且在以下情況失效:
1、保留關鍵字:大多數平臺都有一組不允許用戶在用戶名中使用的關鍵詞; 2、刪除/禁用賬戶:刪除/禁用帳戶用戶名往往是不可用的,即使配置文件頁可能不存在;
因此,這些工具往往會出現誤報和漏報。這種檢查方法還依賴於具有基於web的配置文件頁面的平臺,並且不能擴展到電子郵件地址。
Socialscan的目標是通過直接查詢平臺的註冊服務器,檢索適當的CSRF令牌、頭和cookie來填補這些空白。
工具安裝
使用pip安裝:
> 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 --version show program's version number and exit
作爲Python庫使用
Socialscan還可以作爲Python庫的形式導入到已有代碼之中。
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
工具運行截圖