首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从github安装Go工具并面临安装错误

从github安装Go工具并面临安装错误
EN

Stack Overflow用户
提问于 2022-03-04 09:58:17
回答 2查看 941关注 0票数 2

我想从github:https://github.com/ethicalhackingplayground/ssrf-tool安装这个工具

我使用cmd:go install github.com/ethicalhackingplayground/ssrf-tool@latest

产出:

代码语言:javascript
复制
go: finding module for package github.com/projectdiscovery/gologger
go: finding module for package github.com/briandowns/spinner
go: finding module for package github.com/logrusorgru/aurora
go: found github.com/briandowns/spinner in github.com/briandowns/spinner v1.18.1
go: found github.com/logrusorgru/aurora in github.com/logrusorgru/aurora v2.0.3+incompatible
go: found github.com/projectdiscovery/gologger in github.com/projectdiscovery/gologger v1.1.4
# github.com/ethicalhackingplayground/ssrf-tool
..\..\..\go\pkg\mod\github.com\ethicalhackingplayground\ssrf-tool@v0.0.0-20200901082948-7f3cffc3c7bb\ssrftool.go:34:2: undefined: gologger.Printf
..\..\..\go\pkg\mod\github.com\ethicalhackingplayground\ssrf-tool@v0.0.0-20200901082948-7f3cffc3c7bb\ssrftool.go:35:2: undefined: gologger.Infof
..\..\..\go\pkg\mod\github.com\ethicalhackingplayground\ssrf-tool@v0.0.0-20200901082948-7f3cffc3c7bb\ssrftool.go:36:2: undefined: gologger.Infof

我是高丽的超级新手,go安装在我的系统中很好,因为github的其他工具都很好用。如果需要对此工具的代码进行一些更改,请提出建议。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-03-04 10:21:12

在没有go模块支持和旧版本的gologger的情况下创建了这些源代码,下面是一个解决办法:

  1. 克隆库git clone git@github.com:ethicalhackingplayground/ssrf-tool.git
  2. cd ssrf-tool创建具有以下内容的go.mod文件:
代码语言:javascript
复制
module github.com/ethicalhackingplayground/ssrf-tool

go 1.17

require (
    github.com/briandowns/spinner v1.18.1
    github.com/logrusorgru/aurora v2.0.3+incompatible
    github.com/projectdiscovery/gologger v1.0.1
)

require (
    github.com/davecgh/go-spew v1.1.1 // indirect
    github.com/fatih/color v1.7.0 // indirect
    github.com/mattn/go-colorable v0.1.2 // indirect
    github.com/mattn/go-isatty v0.0.8 // indirect
    golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 // indirect
)
  1. 下载deps go mod download
  2. 构建可执行的go build .
  3. ./ssrf-tool --help

利润。

票数 2
EN

Stack Overflow用户

发布于 2022-03-04 10:29:29

这里是回购,问题已经解决了。

代码语言:javascript
复制
go install github.com/R0X4R/ssrf-tool@latest

代码语言:javascript
复制
git clone https://github.com/R0X4R/ssrf-tool.git
cd ssrf-tool
go build ssrftool.go && mv ssrftool /usr/bin/
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71349626

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档