initial commit

This commit is contained in:
Seth Doty 2019-09-13 10:12:26 -05:00
commit 05e9b0c1f0
4 changed files with 69 additions and 0 deletions

13
a_Lookup/main.go Normal file
View File

@ -0,0 +1,13 @@
package main
import (
"fmt"
"net"
)
func main() {
iprecord, _ := net.LookupIP("bellevue.edu")
for _, ip := range iprecord {
fmt.Println(ip)
}
}

11
cname_Lookup/main.go Normal file
View File

@ -0,0 +1,11 @@
package main
import (
"fmt"
"net"
)
func main() {
cname, _ := net.LookupCNAME("bellevue.edu")
fmt.Println(cname)
}

32
combined_Lookup/main.go Normal file
View File

@ -0,0 +1,32 @@
package main
import (
"fmt"
"net"
)
func main() {
attackDomain := "bellevue.edu"
lookupMX(attackDomain)
lookupA(attackDomain)
lookupCNAME(attackDomain)
}
func lookupMX(domain string) {
mxrecords, _ := net.LookupMX(domain)
for _, mx := range mxrecords {
fmt.Printf("MX Records are: %q \n", mx.Host)
}
}
func lookupA(domain string) {
iprecord, _ := net.LookupIP(domain)
for _, ip := range iprecord {
fmt.Printf("A records are: %q \n", ip)
}
}
func lookupCNAME(domain string) {
cname, _ := net.LookupCNAME(domain)
fmt.Printf("CNAME records are: %q \n", cname)
}

13
mx_Lookup/main.go Normal file
View File

@ -0,0 +1,13 @@
package main
import (
"fmt"
"net"
)
func main() {
mxrecord, _ := net.LookupMX("bellevue.edu")
for _, mx := range mxrecord {
fmt.Println(mx.Host, mx.Pref)
}
}