mirror of
https://github.com/zu1k/nali.git
synced 2025-01-22 13:19:02 +08:00
parse cdn when parse stdin
This commit is contained in:
parent
5c982d6bce
commit
d8b2da8371
@ -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)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user