目录导航
gosearch简介
GoSearch
是一款高效可靠的 OSINT 工具,旨在发现与特定用户名相关的数字足迹。它快速、直接、可靠,使用户能够在多个平台上跟踪个人的在线状态。
GoSearch
它还集成了 HudsonRock 网络犯罪情报数据库的数据,以提供对网络犯罪相关信息的洞察。
它还利用了BreachDirectory.org
的数据库,提供与用户名相关的数据泄露、纯文本和散列密码的综合列表。
对于那些在调查在线身份时需要准确、简洁结果的人来说,此工具是理想的选择。
安装和使用
git clone https://github.com/ibnaleem/gosearch.git && cd gosearch
go build
对于 Unix:
./gosearch <username>
我建议将gosearch
二进制文件添加到您的/bin
通用版本中:
sudo mv gosearch ~/usr/bin
对于 Windows:
C:\Users\***\gosearch> gosearch.exe <username>
使用案例
GoSearch 可让您在breakdirectory.org上搜索与特定用户名相关的泄露密码。要充分利用 GoSearch,请按照以下步骤操作:
- 从
https://rapidapi.com/rohan-patra/api/breachdirectory
获取免费的API 密钥。 - 在命令参数中包含 API 密钥,如下所示:
gosearch [username] [api-key]
GoSearch 将自动为给定的用户名生成流行的电子邮件地址。
为什么叫GoSearch
?
GoSearch
灵感来自流行的用户名搜索工具SherlockGoSearch
。但是,它通过解决 Sherlock 的几个关键限制对其进行了改进:
- Sherlock 是基于 Python 的,因此与 Go 相比速度较慢。
- Sherlock 已经过时并且缺乏更新。
- Sherlock 有时会将假阳性结果报告为有效结果。
- Sherlock 经常会错过实际的用户名,从而导致误判。
Sherlock 的主要问题是误报——即用户名存在于平台上但未被检测到。次要问题是误报,即用户名被错误地标记为可用。
GoSearch
通过将不确定的结果用黄色标记(表示潜在的误报)来解决这些问题。这允许用户轻松过滤掉不相关的链接。如果有足够的需求,我们可能会实施一个选项,仅报告已确认的结果或仅专注于检测误报。
贡献
GoSearch
依赖于data.json文件,该文件包含要搜索的网站列表。用户可以通过添加新网站来扩展该工具的搜索功能。这是最需要贡献的地方。添加新网站的格式如下:
{ "name": "Website name", "base_url": "https://www.website.com/profiles/{}", "url_probe": "optional, see below", "errorType": "errorMsg/status_code/profilePresence/unknown", "errorMsg/errorCode": "errorMsg", "cookies": [ { "name": "cookie name", "value": "cookie value" } ] }
每个条目应包含清晰简洁的网站名称,以方便手动搜索,避免重复提交。
base_url
是用于搜索用户名的base_url
URL ,除非指定了 (请参阅)。您的首要任务是确定网站上用户个人资料的位置。例如,在 Twitter 上,用户个人资料位于根路径,因此您需要设置。是一个占位符,在执行搜索时将自动替换为用户名。GoSearch
url_probe
url_probe
/
"base_url": "https://twitter.com/{}"
{}
GoSearch
例如,如果您运行查询./gosearch ibnaleem
,GoSearch
将用“ibnaleem”替换{}
占位符,从而得到 URL https://shaffan.dev/user/ibnaleem
,假设base_url
设置为https://shaffan.dev/user/{}
。这允许GoSearch
自动生成正确的 URL 来检查用户的个人资料。
url_probe
在某些情况下,网站可能会出于安全原因阻止直接请求,但会提供 API 或替代服务来检索相同的信息。 字段url_probe
用于指定检查用户名可用性的 API 或服务 URL。 与base_url
用于直接搜索个人资料 URL 的 不同, 会url_probe
生成不同的 API 请求,但 GoSearch 仍会base_url
在终端中显示 而不是 API URL,因为这不是个人资料所在的位置。
例如,Duolingo 个人资料可在 处找到https://duolingo.com/profile/{}
,但为了检查用户名是否可用,Duolingo 提供了一个 API URL:https://www.duolingo.com/2017-06-30/users?username={}
。如果我们将 用作url_probe
,base_url
终端将显示类似于 的内容,https://www.duolingo.com/2017-06-30/users?username=ibnaleem
而不是用户个人资料 URL https://duolingo.com/profile/ibnaleem
,这可能会让用户感到困惑。这种区别有助于使流程更清晰、更直观,尤其是对于那些可能不太熟悉编程的人来说。
errorType
有 4 种错误类型
status_code
– 如果用户名不存在则返回特定的状态代码(通常为404
)errorMsg
– 网站针对不存在的用户名显示自定义错误消息profilePresence
网站显示的自定义消息,对于现有的用户名来说是唯一的。unknown
– 无法确定网站上存在和不存在的用户名之间的区别
status_code
最简单的贡献方法是,只需找到一个现有的配置文件并构建测试二进制文件:
git clone https://github.com/ibnaleem/gosearch.git
cd gosearch
cd tests
go build
这将创建一个./tests
或tests.exe
二进制文件,具体取决于您的操作系统。要进行status_code
测试,请使用以下0
选项:
./tests https://yourwebsite.com/username-exists 0
[*] Testing URL: https://yourwebsite.com/username-exists
[*] Mode: 0 (Status Code)
[+] Response: 200 OK
其中 username 是网站上现有的用户名。然后,使用网站上不存在的用户名发出相同的请求:
./tests https://yourwebsite.com/username-does-not-exist 0
[*] Testing URL: https://yourwebsite.com/username-does-not-exist
[*] Mode: 0 (Status Code)
[+] Response: 404 Not Found
通常,网站会200 OK
为存在的个人资料发送 ,404 Not Found
为不存在的个人资料发送 。在某些情况下,它们可能会抛出403 Forbidden
,但只要现有个人资料的状态代码始终不同于不存在的个人资料,这并不重要。复制并设置errorCode
下的字段errorType
,作为打印到终端的代码(在本例中为404
)。
{ "name": "Your Website", "base_url": "https://www.yourwebsite.com/{}", "url_probe": "", "errorType": "status_code", "errorCode": 404, }
警告
"errorCode"
需要 类型的值int
。因此,"errorCode":"404"
是无效的。
errorMsg
这比较棘手,所以你必须做的是将响应主体下载到文件中。幸运的是,我已经在tests
二进制文件中为你编写了代码。只需传递 URL 后跟模式1
:
./tests https://yourwebsite.com/username-exists 1
[*] Testing URL: https://yourwebsite.com/username-exists
[*] Mode: 1 (Response Body)
[+] Response: 200 OK
[+] Saved response to response.txt
再次强调,第一个用户名对应现有个人资料,而第二个用户名对应不存在的帐户。请务必重命名,response.txt
以免我的代码覆盖它。
mv response.txt username_found.txt
./tests https://yourwebsite.com/username-does-not-exists 1
[*] Testing URL: https://yourwebsite.com/username-does-not-exists
[*] Mode: 1 (Response Body)
[+] Response: 200 OK
[+] Saved response to response.txt
mv response.txt username_not_found.txt
您需要分析 的响应主体username_not_found.txt
并将其与 进行比较username_found.txt
。查找任何仅出现在 中的单词、短语、HTML 标签或其他独特元素username_not_found.txt
。一旦您确定了某些独特之处,请将其添加到errorMsg
字段下的字段中errorType
。请记住errorType
只能在其下方有一个字段: 或errorCode
,errorMsg
但不能同时。
cat username_found.txt | grep "<title>"
<title>Username | Your Website</title>
cat username_not_found.txt | grep "<title>"
<title>Your Website</title>
在这种情况下,网站的<title>
标签包含现有个人资料的用户名,而对于不存在的个人资料,它仅显示网站名称。因此,errorMsg
将是<title>Your Website</title>
:
{ "name": "Your Website", "base_url": "https://www.yourwebsite.com/{}", "url_probe": "", "errorType": "errorMsg", "errorMsg": "<title>Your Website</title>", }
profilePresence
与 完全相反errorMsg
;不是分析username_not_found.txt
的响应主体,而是分析username_found.txt
的响应主体以查找任何仅出现在 中的单词、短语、HTML 标签或其他独特元素username_found.txt
。将"errorType": "profilePresence"
设置errorMsg
为您找到的内容。
"unknown"
username_not_found.txt
有时,响应主体可能为空或在和文件中都缺少任何唯一内容username_found.txt
。尝试使用www.
子域的 cookie 后,您仍无所获。在这些情况下,将设置errorType
为"unknown"
(作为字符串)并404
errorCode
在其下方包含一个字段。
cookies
某些网站可能需要 cookie 来检索特定数据,例如错误代码或会话信息。例如,网站需要dzen.ru
cookie zen_sso_checked=1
,它在发出浏览器请求时包含在请求标头中。要测试 cookie 并分析响应,您可以使用以下 Go 代码:
package main import ( "fmt" "log" "net/http" "os" ) func MakeRequest(url string) { client := &http.Client{} // Create a new HTTP GET request req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatalf("Error creating request: %v", err) } // Create the cookie cookie := &http.Cookie{ Name: "cookie_name", Value: "cookie_value", } // Add the cookie to the request req.AddCookie(cookie) // Send the request resp, err := client.Do(req) if err != nil { log.Fatalf("Error making request: %v", err) } defer resp.Body.Close() // Output the response status fmt.Println("Response Status:", resp.Status) } func main() { // Ensure URL is provided as the first argument if len(os.Args) < 2 { log.Fatal("URL is required as the first argument.") } url := os.Args[1] MakeRequest(url) }
测试 Cookie 时,请检查响应状态和正文。例如,如果您始终收到响应200 OK
,请尝试www.
在 URL 前添加以下内容,因为某些网站会根据以下内容进行重定向:
curl -I https://pinterest.com/username
HTTP/2 308
...
location: https://www.pinterest.com/username
curl -I https://www.pinterest.com/username
HTTP/2 200
www.
此外,在包含子域和相关 cookie时,请确保使用上述代码来分析响应主体。
要做出贡献,请按照上面的模板,打开 PR,如果GoSearch
可以成功检测到帐户,我会合并它。
项目地址
GitHub:
https://github.com/ibnaleem/gosearch
转载请注明出处及链接