mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
Special Version for my friends - missuo
This commit is contained in:
10
main.go
10
main.go
@@ -25,9 +25,14 @@ var rdnsenable = flag.Bool("rdns", false, "Set whether rDNS will be display")
|
||||
var routePath = flag.Bool("report", false, "Route Path")
|
||||
var realtimePrint = flag.Bool("realtime", false, "Output trace results in runtime")
|
||||
var tablePrint = flag.Bool("table", false, "Output trace results as table")
|
||||
var version = flag.Bool("V", false, "Check Version")
|
||||
|
||||
func flagApply() string {
|
||||
flag.Parse()
|
||||
if *version {
|
||||
printer.Version()
|
||||
os.Exit(0)
|
||||
}
|
||||
ipArg := flag.Args()
|
||||
if flag.NArg() != 1 {
|
||||
fmt.Println("Args Error\nUsage : ./nexttrace [-T] [-rdns] [-displayMode <displayMode>] [-d <dataOrigin> ] [ -m <hops> ] [ -p <port> ] [ -q <probes> ] [ -r <parallelrequests> ] <hostname>")
|
||||
@@ -37,11 +42,13 @@ func flagApply() string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
if os.Getuid() != 0 {
|
||||
log.Fatalln("Traceroute requires root/sudo privileges.")
|
||||
}
|
||||
|
||||
domain := flagApply()
|
||||
|
||||
ip := util.DomainLookUp(domain)
|
||||
printer.PrintTraceRouteNav(ip, domain, *dataOrigin)
|
||||
|
||||
@@ -98,4 +105,7 @@ func main() {
|
||||
printer.TracerouteTablePrinter(res)
|
||||
}
|
||||
}
|
||||
|
||||
printer.SpecialThanks()
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,14 @@ import (
|
||||
"net"
|
||||
)
|
||||
|
||||
func SpecialThanks() {
|
||||
fmt.Println("\nSpecial thanks to Vincent Young (OwO Network / vincent.moe) for his help and support for this project.")
|
||||
}
|
||||
|
||||
func Version() {
|
||||
fmt.Println("NextTrace v0.1.2-Beta.missuo-special-version")
|
||||
}
|
||||
|
||||
func PrintTraceRouteNav(ip net.IP, domain string, dataOrigin string) {
|
||||
fmt.Println("IP Geo Data Provider: " + dataOrigin)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user