statzone

DNS zone file analyzer targeted at TLD zones
Log | Files | Refs | README | LICENSE

commit 399523e832cdf085953b18286d17d74cf95fbff4
parent c9b66c131c39722894f8095c4aac37fbe6574fbd
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri,  3 Feb 2017 12:09:43 +0100

Formatting fixes

Diffstat:
MAUTHORS | 2+-
MREADME.md | 14+++++++-------
Mstatzone.go | 20++++++++++----------
3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -1,4 +1,4 @@ -StatZone is developed by : +StatZone is developed by: Frederic Cambus <fred AT statdns DOT com> diff --git a/README.md b/README.md @@ -4,28 +4,28 @@ StatZone is a DNS zone file analyzer targeted at TLD zones. It is currently used ## Requirements -StatZone requires the following Go libraries : +StatZone requires the following Go libraries: -- dns : DNS library in Go - https://github.com/miekg/dns +- dns: DNS library in Go - https://github.com/miekg/dns ## Installation -Build and install with the `go` tool, all dependencies will be automatically fetched and compiled : +Build and install with the `go` tool, all dependencies will be automatically fetched and compiled: go get -d -v ./... && go build -v ./... go install statzone ## Usage -StatZone takes the zone file to analyze as parameter : +StatZone takes the zone file to analyze as parameter: statzone zonefile -Public zones (arpa, root) can be found on : ftp://ftp.internic.net/domain/ +Public zones (arpa, root) can be found on: ftp://ftp.internic.net/domain/ ## Features -Currently implemented features : +Currently implemented features: - Counting IPv4 and IPv6 glue - Counting name servers (total and unique) @@ -42,7 +42,7 @@ StatZone is released under the BSD 2-Clause license. See `LICENSE` file for deta ## Author -StatZone is developed by Frederic Cambus +StatZone is developed by Frederic Cambus. - Site : http://www.cambus.net - Twitter: http://twitter.com/fcambus diff --git a/statzone.go b/statzone.go @@ -53,7 +53,7 @@ func main() { inputFile := os.Args[1] - fmt.Println("Parsing zone :", inputFile) + fmt.Println("Parsing zone:", inputFile) domains := new(Domains) @@ -62,7 +62,7 @@ func main() { zoneFile, err := os.Open(inputFile) if err != nil { - fmt.Println("ERROR : Can't open zone file.") + fmt.Println("ERROR: Can't open zone file.") } zone := dns.ParseZone(bufio.NewReader(zoneFile), "", "") @@ -102,7 +102,7 @@ func main() { } } } else { - fmt.Println("ERROR : A problem occured while parsing the zone file.") + fmt.Println("ERROR: A problem occured while parsing the zone file.") } /* Increment number of resource records parsed */ @@ -117,24 +117,24 @@ func main() { for loop := 0; loop < len(rrtypes); loop++ { rrtype := rrtypes[loop] if rrtype != 0 { - fmt.Println(dns.TypeToString[uint16(loop)], "records :", rrtype) + fmt.Println(dns.TypeToString[uint16(loop)], "records:", rrtype) } } fmt.Println("\n---[ Results ]-----------------------------------------------------------------\n") - fmt.Println("Domains : ", domains.count) - fmt.Println("DNSSEC Signed : ", len(signed)) + fmt.Println("Domains: ", domains.count) + fmt.Println("DNSSEC Signed: ", len(signed)) - fmt.Println("IDNs : ", domains.idn) - fmt.Println("NS : ", len(ns)) + fmt.Println("IDNs: ", domains.idn) + fmt.Println("NS: ", len(ns)) fmt.Println("\n---[ Creating result files ]---------------------------------------------------\n") /* Creating name servers list + number of zones served */ - fmt.Println("Creating :", inputFile+".csv") + fmt.Println("Creating:", inputFile+".csv") outputFile, outputError := os.OpenFile(inputFile+".csv", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666) if outputError != nil { - fmt.Printf("ERROR : Can't create output file.\n") + fmt.Printf("ERROR: Can't create output file.\n") return }