Skip to content

Commit

Permalink
Update asn.go
Browse files Browse the repository at this point in the history
  • Loading branch information
spiritLHLS authored May 1, 2024
1 parent 49d1c6e commit ae8b8ce
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions backtrace/asn.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package backtrace

import (
"fmt"
. "github.com/oneclickvirt/backtrace/defaultset"
"net"
"strings"

. "github.com/oneclickvirt/backtrace/defaultset"
)

type Result struct {
Expand Down Expand Up @@ -100,15 +99,25 @@ func trace(ch chan Result, i int, cmin2 []string) {
case "AS4809": // 被 AS4809a 和 AS4809b 替代了
continue
case "AS9929":
tempText += DarkGreen(asnDescription) + " "
if !strings.Contains(tempText, asnDescription) {
tempText += DarkGreen(asnDescription) + " "
}
case "AS4809a":
tempText += DarkGreen(asnDescription) + " "
if !strings.Contains(tempText, asnDescription) {
tempText += DarkGreen(asnDescription) + " "
}
case "AS4809b":
tempText += Green(asnDescription) + " "
if !strings.Contains(tempText, asnDescription) {
tempText += Green(asnDescription) + " "
}
case "AS58807":
tempText += Green(asnDescription) + " "
if !strings.Contains(tempText, asnDescription) {
tempText += Green(asnDescription) + " "
}
default:
tempText += White(asnDescription) + " "
if !strings.Contains(tempText, asnDescription) {
tempText += White(asnDescription) + " "
}
}
}
ch <- Result{i, tempText}
Expand Down

0 comments on commit ae8b8ce

Please sign in to comment.