fscan icon indicating copy to clipboard operation
fscan copied to clipboard

使用go build -ldflags="-s -w " -trimpath main.go这个编译命令,编译失败

Open W-Beacon opened this issue 1 year ago • 12 comments

出现这个告警,go: github.com/denisenkom/[email protected]: git init --bare in C:\Users\用户\go\pkg\mod\cache\vcs\827fc7d8d4932fa3c473f8716b1123200a0073784d1f12e94bbeb63e9646f34f: exec: "git": executable file not found in %PATH%

W-Beacon avatar Aug 06 '22 03:08 W-Beacon

"git": executable file not found in %PATH% 安装下git吧

shadow1ng avatar Aug 06 '22 03:08 shadow1ng

D:\tool\内网渗透\fscan-1.8.1>go build -ldflags="-s -w " -trimpath main.go go: github.com/denisenkom/[email protected]: reading github.com/denisenkom/go-mssqldb/go.mod at revision v0.11.0: unknown revision v0.11.0,刚才想到了,已经安装完git,但是现在数据库又出现问题

W-Beacon avatar Aug 06 '22 03:08 W-Beacon

go mod tidy试试

shadow1ng avatar Aug 06 '22 03:08 shadow1ng

试了,依旧不行,D:\tool\内网渗透\fscan-1.8.1>go mod tidy go: github.com/denisenkom/[email protected]: reading github.com/denisenkom/go-mssqldb/go.mod at revision v0.11.0: unknown revision v0.11.0

W-Beacon avatar Aug 06 '22 03:08 W-Beacon

https://github.com/denisenkom/go-mssqldb/releases/tag/v0.11.0 这个包是存在的理论上是能下载的

https://github.com/shadow1ng/fscan/blob/9b0f12c31a87eb0b73f0e8235deb29f5b0674c73/go.mod#L6 然后现在fscan用的v0.12.2

shadow1ng avatar Aug 06 '22 03:08 shadow1ng

C:\Users\Administrator\Downloads\fscan-1.8.1\fscan-1.8.1>go build -ldflags="-s - w " -trimpath main.go

github.com/shadow1ng/fscan/common

common\flag.go:10:4: undefined: runtime common\flag.go:11:4: undefined: debug common\flag.go:12:4: undefined: time 好像里面这三个函数没有定义

W-Beacon avatar Aug 06 '22 09:08 W-Beacon

下载最新代码试试

shadow1ng avatar Aug 06 '22 09:08 shadow1ng

已编译成功,谢谢师傅

W-Beacon avatar Aug 06 '22 09:08 W-Beacon

师傅,使用了最新的代码还是不行,也还是显示common\flag.go:10:4: undefined: runtime common\flag.go:11:4: undefined: debug common\flag.go:12:4: undefined: time

linsihao7788 avatar Aug 09 '22 08:08 linsihao7788

https://github.com/shadow1ng/fscan/blob/9b0f12c31a87eb0b73f0e8235deb29f5b0674c73/common/flag.go#L5

shadow1ng avatar Aug 09 '22 08:08 shadow1ng

师傅,使用了最新的代码还是不行,也还是显示common\flag.go:10:4: undefined: runtime common\flag.go:11:4: undefined: debug common\flag.go:12:4: undefined: time

找到对应的文件ctrl+s保存一下,import那儿缺东西

Pi-ka7 avatar Sep 09 '22 06:09 Pi-ka7

用Git clone 下载最新代码

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Pi-ka7 @.> 发送时间: 2022年9月9日 14:30 收件人: shadow1ng/fscan @.> 抄送: 影舞者 @.>, Comment @.> 主题: Re: [shadow1ng/fscan] 使用go build -ldflags="-s -w " -trimpath main.go这个编译命令,编译失败 (Issue #218)

师傅,使用了最新的代码还是不行,也还是显示common\flag.go:10:4: undefined: runtime common\flag.go:11:4: undefined: debug common\flag.go:12:4: undefined: time

找到对应的文件ctrl+s保存一下,import那儿缺东西

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

shadow1ng avatar Sep 09 '22 06:09 shadow1ng