diff --git a/src/dns.go b/src/dns.go index af87d18..3d479ab 100644 --- a/src/dns.go +++ b/src/dns.go @@ -11,10 +11,10 @@ func GenerateDNSRecord(ip string, ttl int, hostname string) string { hostname += "." } - return fmt.Sprintf("%s\t%d\tIN\tAAAA\t%s", hostname, ttl, ip) + return fmt.Sprintf("%s %d IN AAAA %s", hostname, ttl, ip) } // Generate a ARPA record ready to be paste on a Bind compatible zone func GenerateReverseDNSRecord(ip string, ttl int, hostname string) string { - return fmt.Sprintf("%s.\t%d\tIN\tPTR\t%s", ip, ttl, hostname) + return fmt.Sprintf("%s. %d IN PTR %s", ip, ttl, hostname) } diff --git a/src/output/main.go b/src/output/main.go index c996afd..a3c0330 100644 --- a/src/output/main.go +++ b/src/output/main.go @@ -12,9 +12,9 @@ type OutputInformationSettings struct { } type IpgOutputData struct { - Hostname string - IPAddress string - IPReverse string - DNSRecord string - ReverseRecord string + Hostname string `json:"hostname"` + IPAddress string `json:"ip_addr"` + IPReverse string `json:"arpa_addr"` + DNSRecord string `json:"dns_record"` + ReverseRecord string `json:"ptr_record"` }