Dns lookup

By Smokey on Aug 31, 2006

This is a simple dns lookup script.

paste it in remotes then type !dns IP/DOMAIN/HOSTNAME

EX: !dns google.com

:D

on *:TEXT:*:*: {
 if ($1 == !dns) {
    set %dnsnick $nick
    set %dnschan $chan
    set %dns $2
    sockopen dns baremetal.com 80
  }
}

on *:sockopen:dns: {
  sockwrite -n $sockname GET /cgi-bin/dnsip?target= $+ %dns HTTP/1.1
  sockwrite -n $sockname Host: baremetal.com $+ $crlf $+ $crlf
}

on *:sockread:dns: {
  if ($sockerr) {
    msg %dnschan Error.
    sockclose dns
    halt
  }
  else {
    var %dnsread
    sockread %dnsread
  }
  if (%dns isin %dnsread) && (<b> isin %dnsread) && (</b> <br> isin %dnsread) {
    if (<b></b> <br> !isin %dnsread) {
      msg %dnschan  $+ %dns $+  ->  $+ $htmlfree(%dnsread) $+ 
      sockclose dns
      halt
    }
    else {
      msg %dnschan  $+ %dns $+  Does not Resolve.
    }
  }
}

Comments

Sign in to comment.
hxck   -  Aug 13, 2013

--

 Respond  
M[n]M   -  Jan 07, 2008

lol now its working ... but your script is not working.. =|

 Respond  
M[n]M   -  Jan 07, 2008

Not working at all man

 Respond  
M[n]M   -  Jan 07, 2008

lol =))))))))))))))))) look what i\'ve just done ahh i am so idiot

 Respond  
M[n]M   -  Jan 07, 2008

Not working at all man

 Respond  
Scakk   -  Sep 17, 2007

Here is the $htmlfree alias I use. Got it from the Hawkee Forum.

alias -l htmlfree { 
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&,$chr(9)) 
  return %x 
}
 Respond  
Lindrian   -  Sep 17, 2007

$htmlfree alias is missing...

 Respond  
ermansanidhya   -  Sep 17, 2007

not work in my mirc :)

 Respond  
Smokey   -  Sep 01, 2006

BEACUSE THIS IS BETTER.
And its for a bot.

 Respond  
Midnight   -  Aug 31, 2006

...Why not just use /dns domain.com ?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.