Host check

By RusselB on Sep 13, 2009

This snippet was written to check to see if a specified host resolved back correctly, or if it resolved to another address, which in turn had to be resolved (possibly several times over), before getting a final valid match.

Usage: /check_host

must be a valid address format eg: or 127.345.67.92 ```mirc alias check_host { if $hget(DNS) { hfree DNS } if !$1 { .notice $me Check host error. No host specified } else { set %dns $1 .dns %dns } } on *:DNS:{ if !$window(@DNS) { window @DNS } else { echo @DNS $crlf } if !$dns(0) { .hadd -m DNS %dns Un-resolved .echo @DNS %dns Un-resolved } else { set $+(%,a,.,%dns) 1 set $+(%,b,.,%dns) $dns(0) while $($+(%,a,.,%dns),2) <= $($+(%,b,.,%dns),2) { .hadd -m DNS %dns $dns($($+(%,a,.,%dns),2)).addr $dns($($+(%,a,.,%dns),2)).ip echo @DNS %dns $dns($($+(%,a,.,%dns),2)).addr $dns($($+(%,a,.,%dns),2)).ip if (%dns == $dns($($+(%,a,.,%dns),2)).addr) && !$hfind(DNS,$+(*,$dns($($+(%,a,.,%dns),2)).ip),0,w) { set %dns $dns($($+(%,a,.,%dns),2)).ip dns %dns } else { if (%dns == $dns($($+(%,a,.,%dns),2)).ip) && !$hfind(DNS,$+($dns($($+(%,a,.,%dns),2)).addr,*),0,w) { set %dns $dns($($+(%,a,.,%dns),2)).addr dns %dns } } inc $+(%,a,.,%dns) } } halt } ```


Sign in to comment.
RusselB   -  Oct 02, 2009

Yes, the snippet would go into the remotes section.
1) Press Alt + R
2) If the page that shows is not blank, Click File -> New
3) Copy & paste the snippet from here to the blank remote page.
4) Click File -> Save & Exit

MSJ   -  Oct 02, 2009

Thank you for your other question as I'm getting used to mIRC..

Where does the snippet go, the remote or ?

Again, I appreciate your help and time..

RusselB   -  Oct 02, 2009

Kindly clarify what it is about the script that you consider to be not working.
This script is being used by myself and a few other IRC network owners, and I have not heard from any of them that there is a major problem.

elpito   -  Oct 02, 2009

this not workz

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.