1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-23 05:39:03 +08:00
nali/cmd/parse.go

24 lines
428 B
Go
Raw Normal View History

2020-07-17 09:05:25 +08:00
package cmd
import (
"github.com/zu1k/nali/internal/app"
2020-07-17 12:12:04 +08:00
"github.com/zu1k/nali/internal/ipdb"
2020-07-17 09:05:25 +08:00
"github.com/spf13/cobra"
)
var parseCmd = &cobra.Command{
Use: "parse",
Short: "Query IP information",
Long: `Query IP information.`,
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
2020-07-17 12:12:04 +08:00
app.InitIPDB(ipdb.GetIPDBType())
2020-07-17 09:05:25 +08:00
app.ParseIPs(args)
},
}
func init() {
rootCmd.AddCommand(parseCmd)
}