Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e1953f339d |
@@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -26,8 +25,6 @@ type IPAddressInfo struct {
|
|||||||
|
|
||||||
func printIPInfo(input string, wantPrefixes bool) {
|
func printIPInfo(input string, wantPrefixes bool) {
|
||||||
var IPInfo IPAddressInfo = getIPInfo(input)
|
var IPInfo IPAddressInfo = getIPInfo(input)
|
||||||
fmt.Printf("%+v\n", IPInfo)
|
|
||||||
os.Exit(200)
|
|
||||||
var location string = IPInfo.Country + "/" + IPInfo.RegionName + "/" + IPInfo.City
|
var location string = IPInfo.Country + "/" + IPInfo.RegionName + "/" + IPInfo.City
|
||||||
var bgpAS string = strings.Fields(IPInfo.AS)[0]
|
var bgpAS string = strings.Fields(IPInfo.AS)[0]
|
||||||
fmt.Println("IP Address: ", IPInfo.IPAddress)
|
fmt.Println("IP Address: ", IPInfo.IPAddress)
|
||||||
|
|||||||
1
Main.go
1
Main.go
@@ -17,6 +17,7 @@ func main() {
|
|||||||
|
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
fmt.Printf("Usage of iPilot: \n")
|
fmt.Printf("Usage of iPilot: \n")
|
||||||
|
fmt.Printf("Example: iPilot -b=false -i=me -p \n")
|
||||||
fmt.Printf(" -b bool enable/disable header (default true)\n")
|
fmt.Printf(" -b bool enable/disable header (default true)\n")
|
||||||
fmt.Printf(" -h bool view help\n")
|
fmt.Printf(" -h bool view help\n")
|
||||||
fmt.Printf(" -i string IP address or domain\n")
|
fmt.Printf(" -i string IP address or domain\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user