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:
parent
b938dc4855
commit
32074e6bb7
@ -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)
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user