473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

javascript dns look up

hi,
Has anyone come across a "hack" to do a dns look up via JS

I want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there but i need a way to look up the email servers MX
record.

I just wondered if there was a way to trigger a dns spew on port 53

Steve


Apr 28 '07 #1
9 6420
steve wrote:
hi,
Has anyone come across a "hack" to do a dns look up via JS
If you are using IE, you could use activex winsock control. If not, you
would need to submit the page back to the server to do it...

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.21.1
^ ^ 19:18:01 up 4:11 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
Apr 28 '07 #2
On Apr 28, 9:45 am, steve <s...@aol.comwrote:
hi,
Has anyone come across a "hack" to do a dns look up via JS

I want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there but i need a way to look up the email servers MX
record.

I just wondered if there was a way to trigger a dns spew on port 53

Steve
imagine the best case scenario where you have a javascript which can
talk the right protocols and send and receive data from a DNS server,
will port 53 be open on the client. The best way is therefore to have
your webserver perform the check based on the value of somepost, and
send back the result via XHR or an iframe, however, I'm not sure that
MX records actually /have/ to exist (I read it along time ago)
although the A record does, and so provided there is at least an A
record you are ok. cacert.org uses pretty good email testing suite you
could purloin, by downloading their source code, which is open
(despite some copyright notices still hanging around) their script
tests the server with a connection attempt without actually sending
them mail. (dont forget to ban all those temporary domains - btw if
you have or find a maintained list of temporary email domians, could
you post a link here) :)

Apr 28 '07 #3
On Apr 28, 5:22 pm, shimmyshack <matt.fa...@gmail.comwrote:
On Apr 28, 9:45 am, steve <s...@aol.comwrote:
hi,
Has anyone come across a "hack" to do a dns look up via JS
I want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there but i need a way to look up the email servers MX
record.
I just wondered if there was a way to trigger a dns spew on port 53
Steve

imagine the best case scenario where you have a javascript which can
talk the right protocols and send and receive data from a DNS server,
will port 53 be open on the client.
i shoudl have said "can the client get to port 53 on an external
server" they might be forced to use a proxy on a LAN, or a socks
etc...

The best way is therefore to have
your webserver perform the check based on the value of somepost, and
send back the result via XHR or an iframe, however, I'm not sure that
MX records actually /have/ to exist (I read it along time ago)
although the A record does, and so provided there is at least an A
record you are ok. cacert.org uses pretty good email testing suite you
could purloin, by downloading their source code, which is open
(despite some copyright notices still hanging around) their script
tests the server with a connection attempt without actually sending
them mail. (dont forget to ban all those temporary domains - btw if
you have or find a maintained list of temporary email domians, could
you post a link here) :)
Apr 28 '07 #4
On Sun, 29 Apr 2007 00:54:14 +0800, shimmyshack wrote
(in article <11*********************@o5g2000hsb.googlegroups.c om>):
On Apr 28, 5:22 pm, shimmyshack <matt.fa...@gmail.comwrote:
>On Apr 28, 9:45 am, steve <s...@aol.comwrote:
>>hi,
Has anyone come across a "hack" to do a dns look up via JS
>>I want to evaluate an email address against a server to see if it is
valid ,
I'm 50 % of the way there but i need a way to look up the email servers
MX
record.
>>I just wondered if there was a way to trigger a dns spew on port 53
>>Steve

imagine the best case scenario where you have a javascript which can
talk the right protocols and send and receive data from a DNS server,
will port 53 be open on the client.
i shoudl have said "can the client get to port 53 on an external
server" they might be forced to use a proxy on a LAN, or a socks
etc...

The best way is therefore to have
>your webserver perform the check based on the value of somepost, and
send back the result via XHR or an iframe, however, I'm not sure that
MX records actually /have/ to exist (I read it along time ago)
although the A record does, and so provided there is at least an A
record you are ok. cacert.org uses pretty good email testing suite you
could purloin, by downloading their source code, which is open
(despite some copyright notices still hanging around) their script
tests the server with a connection attempt without actually sending
them mail. (dont forget to ban all those temporary domains - btw if
you have or find a maintained list of temporary email domians, could
you post a link here) :)
Hi Shimmy,

sorry I do not have any pointers to temp email domain list, I imagine it
changes every day

steve
..

Apr 28 '07 #5
On Sat, 28 Apr 2007 19:18:58 +0800, Man-wai Chang wrote
(in article <46**********@rain.i-cable.com>):
steve wrote:
>hi,
Has anyone come across a "hack" to do a dns look up via JS

If you are using IE, you could use activex winsock control. If not, you
would need to submit the page back to the server to do it...

it has to be cross platform, if it was as easy as being able to use activex
I would be laughing.
Yes i can submit it back to the server, but I wanted the mental challenge.

steve

Apr 28 '07 #6
TC
On Apr 28, 5:45 pm, steve <s...@aol.comwrote:
Has anyone come across a "hack" to do a dns look up via JS
I want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there but i need a way to look up the email servers MX
record.
You may be wasting your time.

Many ISPs reject all outbound SMTP traffic, except to their own
outgoing mailserver. So you won't be able to establish an SMTP dialog
directly with the target user's mailserver.

Also, most mailservers no longer support the SMTP VRFY command - or
they seem to support it, but actually lie (eg. they say that *all*
addresses are valid). Your only remaining possibility is to check the
response to a dummy RCPT TO command - but I'm not sure that even this
is reliable now.

Try picking a relevant user's mailserver (not your ISP's outgoing
mailserver), and use Telnet to test the process manually. For example:

telnet mail.blah.com 25
HELO me
VRFY someuser
MAIL FROM me
RCPT TO someuser
(or somesuch)

If you cann't get it to work via Telnet, you won't be able to program
it - in Javascript or anything else.

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com

Apr 29 '07 #7
On Apr 29, 4:48 pm, TC <gg.20.keen4s...@spamgourmet.comwrote:
On Apr 28, 5:45 pm, steve <s...@aol.comwrote:
Has anyone come across a "hack" to do a dns look up via JS
I want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there but i need a way to look up the email servers MX
record.

You may be wasting your time.

Many ISPs reject all outbound SMTP traffic, except to their own
outgoing mailserver. So you won't be able to establish an SMTP dialog
directly with the target user's mailserver.

Also, most mailservers no longer support the SMTP VRFY command - or
they seem to support it, but actually lie (eg. they say that *all*
addresses are valid). Your only remaining possibility is to check the
response to a dummy RCPT TO command - but I'm not sure that even this
is reliable now.

Try picking a relevant user's mailserver (not your ISP's outgoing
mailserver), and use Telnet to test the process manually. For example:

telnet mail.blah.com 25
HELO me
VRFY someuser
MAIL FROM me
RCPT TO someuser
(or somesuch)

If you cann't get it to work via Telnet, you won't be able to program
it - in Javascript or anything else.

HTH,
TC (MVP MSAccess)http://tc2.atspace.com
the smtp traffic would be server side of course, the results sent back
via javascript.

Apr 29 '07 #8
VK
On Apr 29, 1:38 am, steve <s...@aol.comwrote:
Has anyone come across a "hack" to do a dns look up via JS
If you are using IE, you could use activex winsock control. If not, you
would need to submit the page back to the server to do it...

it has to be cross platform, if it was as easy as being able to use activex
I would be laughing.
Yes i can submit it back to the server, but I wanted the mental challenge.
Javascript does not have socket capabilities, so out of Javascript
itself it is plain impossible.
Write a few-liners server-side script on Perl, invoke it using GET/
iframe, script implant, ajaxoid or remote service. If server-side
script gets HELLO from the remote daemon, let it send text/plain "var
emai_ok=true;" otherwise let it send back "var email_ok=false;"
Then just use the return value in your client-side script for check.
Obviously email_ok variable can be called any way you like. There is
no mental challenge in this trivia - simply take care of timeout
fallbacks - some SMTP servers are deadly slow.

Apr 29 '07 #9
TC
On Apr 30, 1:19 am, shimmyshack <matt.fa...@gmail.comwrote:
On Apr 29, 4:48 pm, TC <gg.20.keen4s...@spamgourmet.comwrote:
On Apr 28, 5:45 pm, steve <s...@aol.comwrote:
Has anyone come across a "hack" to do a dns look up via JS
I want to evaluate an email address against a server to see if it is valid ,
I'm 50 % of the way there but i need a way to look up the email servers MX
record.
You may be wasting your time.
Many ISPs reject all outbound SMTP traffic, except to their own
outgoing mailserver. So you won't be able to establish an SMTP dialog
directly with the target user's mailserver.
Also, most mailservers no longer support the SMTP VRFY command - or
they seem to support it, but actually lie (eg. they say that *all*
addresses are valid). Your only remaining possibility is to check the
response to a dummy RCPT TO command - but I'm not sure that even this
is reliable now.
Try picking a relevant user's mailserver (not your ISP's outgoing
mailserver), and use Telnet to test the process manually. For example:
telnet mail.blah.com 25
HELO me
VRFY someuser
MAIL FROM me
RCPT TO someuser
(or somesuch)
If you cann't get it to work via Telnet, you won't be able to program
it - in Javascript or anything else.
HTH,
TC (MVP MSAccess)http://tc2.atspace.com

the smtp traffic would be server side of course, the results sent back via javascript
Understood. I assumed, probably incorrectly, that the code would run
on a client PC. But none-the-less, I still think he will not be able
to do what he wants (for other reasons stated above).

Cheers,
TC (MVP MSAccess)
http://tc2.atspace.com

Apr 30 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gowhera Hussain | last post by:
Use This for Learning Only .... Do Not Try To Act Smart HACKING WITH JAVASCRIPT Dr_aMado Sun, 11 Apr 2004 16:40:13 UTC This tutorial is an overview of how javascript can be used to bypass...
13
by: Kevin | last post by:
Help! Why are none of these valid? var arrayName = new Array(); arrayName = new Array('alpha_val', 1); arrayName = ; I'm creating/writing the array on the server side from Perl, but I
8
by: Prometheus Research | last post by:
http://newyork.craigslist.org/eng/34043771.html We need a JavaScript component which will auto-submit a form after a set period has elapsed. The component must display a counter that dynamically...
22
by: VK | last post by:
A while ago I proposed to update info in the group FAQ section, but I dropped the discussion using the approach "No matter what color the cat is as long as it still hounts the mice". Over the last...
15
by: binnyva | last post by:
Hello Everyone, I have just compleated a JavaScript tutorial and publishing the draft(or the beta version, as I like to call it) for review. This is not open to public yet. The Tutorial is...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
4
by: Martin Feuersteiner | last post by:
Dear Group I'm using VB to write an aspnet application. I would like to call a javascript function from within a VB Sub or VB Function, is it possible? My code is something like this: VB...
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.