mirror of
https://github.com/nxtrace/nali
synced 2024-11-22 18:34:22 +00:00
rm noneed
This commit is contained in:
parent
ada57ac6d9
commit
a7a42823c0
19
README.md
19
README.md
@ -162,6 +162,25 @@ Name: zgovweb.v.bsgslb.cn [白山云 CDN]
|
||||
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
|
||||
|
||||
You should parse cname by yourself
|
||||
|
@ -105,6 +105,9 @@ func (db QQwry) Find(ip string) (res string) {
|
||||
country, _ := enc.String(string(gbkCountry))
|
||||
area, _ := enc.String(string(gbkArea))
|
||||
|
||||
country = strings.ReplaceAll(country, " CZ88.NET", "")
|
||||
area = strings.ReplaceAll(area, " CZ88.NET", "")
|
||||
|
||||
return fmt.Sprintf("%s %s", country, area)
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"math/big"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/zu1k/nali/pkg/common"
|
||||
)
|
||||
@ -63,6 +64,10 @@ func (db ZXwry) Find(ip string) (result string) {
|
||||
ipv6 := op.Uint64()
|
||||
offset := db.searchIndex(ipv6)
|
||||
country, area := db.getAddr(offset)
|
||||
|
||||
country = strings.ReplaceAll(country, " CZ88.NET", "")
|
||||
area = strings.ReplaceAll(area, " CZ88.NET", "")
|
||||
|
||||
return fmt.Sprintf("%s %s", country, area)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user