1
0
mirror of https://github.com/zu1k/nali.git synced 2025-02-09 05:42:43 +08:00

parse cdn when parse stdin

This commit is contained in:
zu1k 2020-07-19 07:24:25 +08:00
parent b938dc4855
commit 32074e6bb7
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ Find document on: https://github.com/zu1k/nali
if line == "quit" || line == "exit" { if line == "quit" || line == "exit" {
return return
} }
fmt.Println(app.ReplaceInString(line)) fmt.Println(app.ReplaceIPInString(app.ReplaceCDNInString(line)))
} }
} else { } else {
app.ParseIPs(args) app.ParseIPs(args)

View File

@ -49,12 +49,12 @@ func ParseIPs(ips []string) {
result := db1.Find(ip) result := db1.Find(ip)
fmt.Println(formatResult(ip, result)) fmt.Println(formatResult(ip, result))
} else { } else {
fmt.Println(ReplaceInString(ip)) fmt.Println(ReplaceIPInString(ip))
} }
} }
} }
func ReplaceInString(str string) (result string) { func ReplaceIPInString(str string) (result string) {
db0 := db[0] db0 := db[0]
var db1 ipdb.IPDB var db1 ipdb.IPDB
if len(db) > 1 { if len(db) > 1 {