mirror of
https://github.com/zu1k/nali.git
synced 2025-03-11 02:42:03 +08:00
add help doc
This commit is contained in:
parent
035b8360f2
commit
f390306b12
@ -128,7 +128,7 @@ Nali will insert ip information after ip
|
|||||||
Use like ipv4
|
Use like ipv4
|
||||||
|
|
||||||
```
|
```
|
||||||
➜ ~ nslookup google.com | nali
|
$ nslookup google.com | nali
|
||||||
Server: 127.0.0.53 [局域网 IP]
|
Server: 127.0.0.53 [局域网 IP]
|
||||||
Address: 127.0.0.53 [局域网 IP]#53
|
Address: 127.0.0.53 [局域网 IP]#53
|
||||||
|
|
||||||
|
38
cmd/parse.go
38
cmd/parse.go
@ -10,7 +10,43 @@ import (
|
|||||||
var parseCmd = &cobra.Command{
|
var parseCmd = &cobra.Command{
|
||||||
Use: "parse",
|
Use: "parse",
|
||||||
Short: "Query IP information",
|
Short: "Query IP information",
|
||||||
Long: `Query IP information.`,
|
Long: `Query IP information.
|
||||||
|
|
||||||
|
#1 Query a simple IP address
|
||||||
|
|
||||||
|
$ nali 1.2.3.4
|
||||||
|
|
||||||
|
or use pipe
|
||||||
|
|
||||||
|
$ echo IP 6.6.6.6 | nali
|
||||||
|
|
||||||
|
#2 Query multiple IP addresses
|
||||||
|
|
||||||
|
$ nali 1.2.3.4 4.3.2.1 123.23.3.0
|
||||||
|
|
||||||
|
#3 Interactive query
|
||||||
|
|
||||||
|
$ nali
|
||||||
|
123.23.23.23
|
||||||
|
123.23.23.23 [越南 越南邮电集团公司]
|
||||||
|
quit
|
||||||
|
|
||||||
|
#4 Use with dig
|
||||||
|
|
||||||
|
$ dig nali.lgf.im +short | nali
|
||||||
|
|
||||||
|
#5 Use with nslookup
|
||||||
|
|
||||||
|
$ nslookup nali.lgf.im 8.8.8.8 | nali
|
||||||
|
|
||||||
|
#6 Use with any other program
|
||||||
|
|
||||||
|
bash abc.sh | nali
|
||||||
|
|
||||||
|
#7 IPV6 support
|
||||||
|
|
||||||
|
$ nslookup google.com | nali
|
||||||
|
`,
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
app.InitIPDB(ipdb.GetIPDBType())
|
app.InitIPDB(ipdb.GetIPDBType())
|
||||||
|
40
cmd/root.go
40
cmd/root.go
@ -15,7 +15,45 @@ import (
|
|||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "nali",
|
Use: "nali",
|
||||||
Short: "An offline tool for querying IP geographic information",
|
Short: "An offline tool for querying IP geographic information",
|
||||||
Long: `An offline tool for querying IP geographic information.`,
|
Long: `An offline tool for querying IP geographic information.
|
||||||
|
|
||||||
|
Find document on: https://github.com/zu1k/nali
|
||||||
|
|
||||||
|
#1 Query a simple IP address
|
||||||
|
|
||||||
|
$ nali 1.2.3.4
|
||||||
|
|
||||||
|
or use pipe
|
||||||
|
|
||||||
|
$ echo IP 6.6.6.6 | nali
|
||||||
|
|
||||||
|
#2 Query multiple IP addresses
|
||||||
|
|
||||||
|
$ nali 1.2.3.4 4.3.2.1 123.23.3.0
|
||||||
|
|
||||||
|
#3 Interactive query
|
||||||
|
|
||||||
|
$ nali
|
||||||
|
123.23.23.23
|
||||||
|
123.23.23.23 [越南 越南邮电集团公司]
|
||||||
|
quit
|
||||||
|
|
||||||
|
#4 Use with dig
|
||||||
|
|
||||||
|
$ dig nali.lgf.im +short | nali
|
||||||
|
|
||||||
|
#5 Use with nslookup
|
||||||
|
|
||||||
|
$ nslookup nali.lgf.im 8.8.8.8 | nali
|
||||||
|
|
||||||
|
#6 Use with any other program
|
||||||
|
|
||||||
|
bash abc.sh | nali
|
||||||
|
|
||||||
|
#7 IPV6 support
|
||||||
|
|
||||||
|
$ nslookup google.com | nali
|
||||||
|
`,
|
||||||
Args: cobra.MinimumNArgs(0),
|
Args: cobra.MinimumNArgs(0),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
app.InitIPDB(ipdb.GetIPDBType())
|
app.InitIPDB(ipdb.GetIPDBType())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user