mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
There is currently no native way to find out if a domain is non-existent or not, only whether it will resolve or not.

Having $dns(example.com).nxdomain return $true or $false would be a smart solution.

I imagine it to be easy enough to impliment.

Meanwhile, if anyone has a near native workaround, I'm all ears.

Thanks.


-HM2K- hm2k.org
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Using an identifier for what should be a nonblock operation doesn't seem like a smart solution to me, let alone the fact that $dns already exists and is not meant to initiate a dns request.

More importantly though, if by "non-existent" you mean unregistered, you can't differentiate a "non-existent" (unregistered) domain from one that won't resolve with the DNS protocol.. you would need to WHOIS to get this information. A non-existent domain and a non-resolvable host will both return NXDOMAIN. Try it for yourself. And since mIRC doesn't (and probably will never) natively support the WHOIS protocol, I don't see this happening.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
My mistake, I forgot how $dns functioned. $dns().nxdomain would suffice.

I definitely mean NXDOMAIN. I'm already fully aware of the whois registry as per my whoisd.mrc script.

You are mistaken. A domain that exists that does not have an A line (non-resolvable) does not also return NXDOMAIN (non-existent).

Further more, I do not appreciate your condescending attitude.


-HM2K- hm2k.org
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

I didn't read any condescension in his reply.

Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
@RoCk it's open to interpretation, however I ask that you stay on topic.


-HM2K- hm2k.org
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Define "non-existent" domain, then.

From the context of a DNS request it is impossible to differentiate "existent" from "resolvable". A domain that does not resolve (no dns server, etc.) may still "exist" from a registrar's point of view. A domain that does not have an A record is just a domain that is misconfigured, not one that "does not exist"; and still, in the context of a DNS they are both pretty much the same.

Realize that the purpose of mIRC's DNS functionality (and the functionality of DNS in general) is to convert from a host to an IP or an IP to a host, nothing else (besides MX, which mIRC clearly has no need to support). In this sense, it's irrelevant whether or not a lookup is NXDOMAIN or has no A record, since both responses will fail to resolve in the context that matters (host->ip conversion).

If you need to know details about the lookup, you're better off writing a script that properly implements the nuances of the DNS protocol, as that is not really the purpose of /dns. The fact remains, though, if your goal is to find out if a domain "exists" (is registered), DNS cannot reliably help; use WHOIS. On the other hand, if "exists" to you means "is not NXDOMAIN", realize that it's not a very meaningful distinction.

* edit: you don't even have to write a script, since one exists


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
A non-existent domain is defined as: NXDOMAIN.

You are showing signs that you are able to differentiate between "existent" from "resolvable", mIRC, however is not, thus a reasonable feature suggestion.

Your opinion on usage of NXDOMAIN is unsolicited.

PS. The link to nslookup.mrc is of interest to me.

Last edited by HM2K; 14/01/10 07:01 PM.

-HM2K- hm2k.org

Link Copied to Clipboard