Skip to content

Commit 177adf6

Browse files
committed
fix install malice-network
1 parent 7b940a9 commit 177adf6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

internal/runner/banner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"github.com/chainreactors/crtm/pkg/update"
55
)
66

7-
const version = "v0.0.1"
7+
const version = "v0.0.2"
88

99
//var banner = `
1010
// ____

pkg/install.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ loop:
6565
for asset, assetID := range tool.Assets {
6666
switch {
6767
case strings.Contains(asset, ".zip"):
68-
if isAsset(asset, tool.Repo, runtime.GOOS, runtime.GOARCH) {
68+
if isAsset(asset, tool.Name, runtime.GOOS, runtime.GOARCH) {
6969
id = assetID
7070
isZip = true
7171
break loop
7272
}
7373
case strings.Contains(asset, ".tar.gz"):
74-
if isAsset(asset, tool.Repo, runtime.GOOS, runtime.GOARCH) {
74+
if isAsset(asset, tool.Name, runtime.GOOS, runtime.GOARCH) {
7575
id = assetID
7676
isTar = true
7777
break loop
7878
}
7979
default:
80-
if isAsset(asset, tool.Repo, runtime.GOOS, runtime.GOARCH) {
80+
if isAsset(asset, tool.Name, runtime.GOOS, runtime.GOARCH) {
8181
id = assetID
8282
break loop
8383
}
@@ -129,7 +129,7 @@ loop:
129129
}
130130

131131
func isAsset(asset, name, os, arch string) bool {
132-
if strings.Contains(asset, name) && strings.Contains(asset, os+"_") && strings.Contains(asset, arch) {
132+
if strings.Contains(asset, name) && strings.Contains(asset, os) && strings.Contains(asset, arch) {
133133
return true
134134
}
135135
return false

pkg/utils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
"zombie": ZombieRepo,
2929
"urlfounder": UrlFounderRepo,
3030
"iom": IoMRepo,
31-
"malice-network": IoMRepo,
31+
"malice_network": IoMRepo,
3232
//"cdncheck_cn": CDNCheckRepo,
3333
}
3434
)

0 commit comments

Comments
 (0)