mirror of
https://github.com/zu1k/nali.git
synced 2025-01-23 05:39:03 +08:00
rm noneed
This commit is contained in:
parent
ac8f5c6f43
commit
9108d9aada
19
README.md
19
README.md
@ -162,6 +162,25 @@ Name: zgovweb.v.bsgslb.cn [白山云 CDN]
|
|||||||
Address: 2001:428:6402:21b::5
|
Address: 2001:428:6402:21b::5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Also parse IP geo
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
➜ nali git:(master) ✗ nslookup www.gov.cn | nali
|
||||||
|
Server: 127.0.0.53 [局域网 IP]
|
||||||
|
Address: 127.0.0.53 [局域网 IP]#53
|
||||||
|
|
||||||
|
Non-authoritative answer:
|
||||||
|
www.gov.cn canonical name = www.gov.cn.bsgslb.cn [白山云 CDN].
|
||||||
|
www.gov.cn.bsgslb.cn [白山云 CDN] canonical name = zgovweb.v.bsgslb.cn [白山云 CDN].
|
||||||
|
Name: zgovweb.v.bsgslb.cn [白山云 CDN]
|
||||||
|
Address: 103.104.170.25 [新加坡 CZ88.NET]
|
||||||
|
Name: zgovweb.v.bsgslb.cn [白山云 CDN]
|
||||||
|
Address: 2001:428:6402:21b::5 [美国Louisiana州Monroe Qwest Communications Company, LLC (CenturyLink)]
|
||||||
|
Name: zgovweb.v.bsgslb.cn [白山云 CDN]
|
||||||
|
Address: 2001:428:6402:21b::6 [美国Louisiana州Monroe Qwest Communications Company, LLC (CenturyLink)]
|
||||||
|
```
|
||||||
|
|
||||||
#### Use standalone
|
#### Use standalone
|
||||||
|
|
||||||
You should parse cname by yourself
|
You should parse cname by yourself
|
||||||
|
@ -105,6 +105,9 @@ func (db QQwry) Find(ip string) (res string) {
|
|||||||
country, _ := enc.String(string(gbkCountry))
|
country, _ := enc.String(string(gbkCountry))
|
||||||
area, _ := enc.String(string(gbkArea))
|
area, _ := enc.String(string(gbkArea))
|
||||||
|
|
||||||
|
country = strings.ReplaceAll(country, " CZ88.NET", "")
|
||||||
|
area = strings.ReplaceAll(area, " CZ88.NET", "")
|
||||||
|
|
||||||
return fmt.Sprintf("%s %s", country, area)
|
return fmt.Sprintf("%s %s", country, area)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/zu1k/nali/pkg/common"
|
"github.com/zu1k/nali/pkg/common"
|
||||||
)
|
)
|
||||||
@ -63,6 +64,10 @@ func (db ZXwry) Find(ip string) (result string) {
|
|||||||
ipv6 := op.Uint64()
|
ipv6 := op.Uint64()
|
||||||
offset := db.searchIndex(ipv6)
|
offset := db.searchIndex(ipv6)
|
||||||
country, area := db.getAddr(offset)
|
country, area := db.getAddr(offset)
|
||||||
|
|
||||||
|
country = strings.ReplaceAll(country, " CZ88.NET", "")
|
||||||
|
area = strings.ReplaceAll(area, " CZ88.NET", "")
|
||||||
|
|
||||||
return fmt.Sprintf("%s %s", country, area)
|
return fmt.Sprintf("%s %s", country, area)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user