Created
March 27, 2015 15:40
-
-
Save sajal/2319444906bc0e828ad1 to your computer and use it in GitHub Desktop.
Decode RIPE ATLAS DNS results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/base64" | |
"fmt" | |
"github.com/miekg/dns" | |
) | |
func main() { | |
//Decode base64 to binary | |
data, _ := base64.StdEncoding.DecodeString("f2+AgAABAAEAAAAAA3d3dwRyaXBlA25ldAAAAQABwAwAAQABAAA3+gAEwQAGiw==") | |
//new dns message | |
m := &dns.Msg{} | |
//Load binary into message | |
m.Unpack(data) | |
fmt.Println(m) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment