1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 21:29:02 +08:00

parse cdn when parse stdin

This commit is contained in:
zu1k 2020-07-19 07:24:25 +08:00
parent 5c982d6bce
commit d8b2da8371
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" {
return
}
fmt.Println(app.ReplaceInString(line))
fmt.Println(app.ReplaceIPInString(app.ReplaceCDNInString(line)))
}
} else {
app.ParseIPs(args)

View File

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