Code Monkey home page Code Monkey logo

fastdns's People

Contributors

dependabot[bot] avatar glaslos avatar phuslu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fastdns's Issues

Cant get TXT Record of some Domains

Hey,
in short term, im trying to use fastdig as an alternative for "dig". When im using "dig" everything works expected, but on fastdig the result is missing. Example:

; <<>> DiG 9.16.44-Debian <<>> @1.1.1.1 t3n.de TXT
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21655
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;t3n.de.				IN	TXT

;; ANSWER SECTION:
t3n.de.			20995	IN	TXT	"nJg0mOQ"
t3n.de.			20995	IN	TXT	"v3nk3wg16gqgph0x4q2g45kj1j6g0b9f"
t3n.de.			20995	IN	TXT	"loaderio=6cead61edf5d0ea1a2297c1e7a409e87"
t3n.de.			20995	IN	TXT	"google-site-verification=ojkBs6li65pAGMwyGZl3Q1O0Q4DDMn8CPebe5bgeGNo"
t3n.de.			20995	IN	TXT	"hns-claim:aakgrn5php6ppybp6bjmlczduk3gplljzyfp5kfgaeaaaaaaaaaklzaororjdpl6qzexi75h7ofhv447lownw5btzuxvs4ibaaaabnvuzysq"
t3n.de.			20995	IN	TXT	"v=spf1 include:servers.mcsv.net include:spf.mailjet.com mx include:helpscoutemail.com include:_spf.intan.net include:_spf.google.com include:eu.zcsend.net ~all"

;; Query time: 4 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Wed Mar 20 15:40:46 EDT 2024
;; MSG SIZE  rcvd: 538

; <<>> DiG 0.0.1-fastdns-go1.21.5 <<>> t3n.de
;; global options: +cmd +noedns
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65246
;; flags: qr tc rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;t3n.de.		IN	TXT

;; AUTHORITY SECTION:

;; Query time: 7 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Wed Mar 20 15:40:36 EDT 2024
;; MSG SIZE  rcvd: 24

Im using the master, maybe its a bug?

//edit:
i downgraded till v0.6.0. looks like a basic problem

decode name panic

panic: runtime error: index out of range [201] with length 9

goroutine 852 [running]:
github.com/phuslu/fastdns.(*Message).DecodeName(0xc00f291260, {0x0?, 0x0, 0x7a4a58?}, {0xc0037f352b, 0x9, 0x5cc46c?})
/root/go/pkg/mod/github.com/phuslu/[email protected]/message.go:201 +0x431

	req, resp := fastdns.AcquireMessage(), fastdns.AcquireMessage()
	defer fastdns.ReleaseMessage(req)
	defer fastdns.ReleaseMessage(resp)

	req.SetRequestQustion(domain, fastdns.TypeMX, fastdns.ClassINET)

	err := fastdnsClient.Exchange(req, resp)
	if err != nil {
		log.Println(err)
		return "", "", err
	}

	var hosts []string
	_ = resp.Walk(func(name []byte, typ fastdns.Type, class fastdns.Class, ttl uint32, data []byte) bool {
		if typ == fastdns.TypeMX {
			hosts = append(hosts, string(resp.DecodeName(nil, data[2:])))
		}

		return true
	})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.