Skip to content

Commit

Permalink
Merge pull request #14 from harakeishi/fix/check
Browse files Browse the repository at this point in the history
チェック機能の修正
  • Loading branch information
harakeishi authored Jan 30, 2022
2 parents e388347 + 5b183eb commit ae0b53f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions whereis/whereis.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func Resolve(domain string, verbose bool) error {
summary.SetWhoisResponseServerFromWhoisResponse()
summary.ParseWhoisResponse()
if !summary.ParseCheck() {
summary.ParseResult = nil
summary.ParseResult = summary.ParseResult[1:]
summary.WhoisResponse, err = whois.Whois(summary.TargetIp, summary.WhoisResponseServer)
if err != nil {
return err
Expand Down Expand Up @@ -122,7 +122,7 @@ func (s *Summary) ParseCheck() bool {
// 転送されていないかチェックする
list := []string{"apnic", "arin", "ripe", "lacnic"}
for _, v := range list {
if v == strings.ToLower(s.ParseResult[1].NetName) {
if strings.Contains(strings.ToLower(s.ParseResult[1].NetName), v) {
s.WhoisResponseServer = fmt.Sprintf("whois.%s.net", v)
return false
}
Expand Down

0 comments on commit ae0b53f

Please sign in to comment.