GetDNS (Retrieve DNS)

A thew days ago i was in need to find the DNS of a special host,after a while i knew some web pages with had the service to retrieve the DSN through their database, so i thought why not making a little function that makes it much easier for me to retrieve fast the DNS Server ?
So i started and after 1 glass coke I’ve done this little function that works pretty well.

‘ Function : GetDNS
‘ DateTime : 24.06.2010 10:46PM
‘ Author : Kreshnik Hasanaj
‘ Mail :
‘ Purpose : Retrieves DNS of a givin URL
Option Explicit
Public Function GetDNS(TheURL As String) As String
Dim HTTP As Object

Const URL As String = StrReverse(“=emantsoh&1=di?php.xaja/ten.sndymstahw.www//:ptth”)

Set HTTP = CreateObject(“Winhttp.Winhttprequest.5.1”)

.Open “GET”, URL & TheURL & “&type=A”
GetDNS = .ResponseText
End With

End Function


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s