DNSBL.mRC

By iota on Jan 16, 2013

dnsbl script originally by Aha2Y (http://www.hawkee.com/profile/63626/)
I've edited it to be a bot command, and added a few dnsbls
If you think of anymore I should add, let me know.

;- DNSBL.mRC

on *:TEXT:!dnsbl*:#: {
  proxycheck $2
}
alias proxycheck { 
  if ($1 == $null) { msg $chan 3* Missing parameters: /proxycheck <ip> or to check your own ip /proxycheck localhost }
  else {
    if ($1 == localhost) { 
      set %dnscheckproxy 1
      msg $chan 3* Checking your ip address, Please wait...
      set %checkip $ip
      /proxycheck.progress
      halt
    }
    else {
      set %dnscheckproxy 1
      msg $chan 3* Checking ip address, Please wait...
      set %checkip $1
      /proxycheck.progress
    }
  }
}

alias -l proxycheck.progress {
  .timer 1 1 dronebl 
  .timer 1 2 proxybl 
  .timer 1 3 tor.dnsbl.sectoor
  .timer 1 4 tor.dan.me.uk
  .timer 1 5 dnsbl.njabl.org
  .timer 1 6 rbl.efnet.org
  .timer 1 7 virbl.dnsbl.bit.nl
  .timer 1 8 dnsbl.ahbl.org
  .timer 1 9 rbl.faynticrbl.org
  .timer 1 10 dnsbl.ipocalypse.net
  .timer 1 11 dnsbl.rizon.net
  .timer 1 12 dnsbl.swiftbl.org
  .timer 1 13 irclib
  .timer 1 14 bnc4free
  .timer 1 15 sorbs
}

alias -l dronebl {
  set %dbl dnsbl.dronebl.org
  dns $revip(%checkip) $+ .dnsbl.dronebl.org
}
alias -l proxybl {
  set %dbl dnsbl.proxybl.org
  dns $revip(%checkip) $+ .dnsbl.proxybl.org
}
alias -l tor.dnsbl.sectoor {
  set %dbl tor.dnsbl.sectoor
  dns $revip(%checkip) $+ .tor.dnsbl.sectoor.de
}
alias -l tor.dan.me.uk {
  set %dbl tor.dan.me.uk
  dns $revip(%checkip) $+ .tor.dan.me.uk
}
alias -l dnsbl.njabl.org {
  set %dbl dnsbl.njabl.org
  dns $revip(%checkip) $+ .dnsbl.njabl.org
}
alias -l rbl.efnet.org {
  set %dbl rbl.efnet.org
  dns $revip(%checkip) $+ .rbl.efnet.org
}
alias -l virbl.dnsbl.bit.nl {
  set %dbl virbl.dnsbl.bit.nl
  dns $revip(%checkip) $+ .virbl.dnsbl.bit.nl
}
alias -l dnsbl.ahbl.org {
  set %dbl dnsbl.ahbl.org
  dns $revip(%checkip) $+ .dnsbl.ahbl.org
}
alias -l rbl.faynticrbl.org {
  set %dbl rbl.faynticrbl.org
  dns $revip(%checkip) $+ .rbl.faynticrbl.org
}
alias -l rbl.faynticrbl.org {
  set %dbl rbl.faynticrbl.org
  dns $revip(%checkip) $+ .rbl.faynticrbl.org
}
alias -l dnsbl.ipocalypse.net {
  set %dbl dnsbl.ipocalypse.net
  dns $revip(%checkip) $+ .dnsbl.ipocalypse.net
}
alias -l dnsbl.rizon.net {
  set %dbl dnsbl.rizon.net
  dns $revip(%checkip) $+ .dnsbl.rizon.net
}

alias -l dnsbl.swiftbl.org {
  set %dbl dnsbl.swiftbl.org
  dns $revip(%checkip) $+ .dnsbl.swiftbl.org
}
alias -l irclib {
  set %dbl dnsbl.libirc.so
  dns $revip(%checkip) $+ .dnsbl.libirc.so
}
alias -l bnc4free {
  set %dbl dnsbl.bnc4free.in
  dns $revip(%checkip) $+ .dnsbl.bnc4free.in
}
alias -l sorbs {
  set %dbl dnsbl.sorbs.net
  dns $revip(%checkip) $+ .dnsbl.sorbs.net
}
on *:DNS:{
  if (%dnscheckproxy == 1) { 
    if (%dbl == dnsbl.dronebl.org) { 
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl }
    }
    if (%dbl == dnsbl.proxybl.org) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == tor.dnsbl.sectoor) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == tor.dan.me.uk) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == dnsbl.njabl.org) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == rbl.efnet.org) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == virbl.dnsbl.bit.nl) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == dnsbl.ahbl.org) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == rbl.faynticrbl.org) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == dnsbl.ipocalypse.net) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == dnsbl.rizon.net) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == dnsbl.swiftbl.org) {   
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl } 
    }
    if (%dbl == dnsbl.libirc.so) {
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl }
    }
    if (%dbl == dnsbl.bnc4free.in) {
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl }
    }
    if (%dbl == dnsbl.sorbs.net) {
      if ($iaddress != $null) { msg $chan 4* The IP %checkip has been found in BL zone %dbl }
      else { msg $chan 3* The IP %checkip has not been found in BL zone %dbl }
    }
    unset %dbl
    unset %dnsproxycheck
  }
}

;-RevIP script by Patje from SwiftIRC.
alias revip { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }

Comments

Sign in to comment.
ProIcons   -  Jan 19, 2013
on *:TEXT:!dnsbl*:#: {
  proxycheck $2 $chan $nick
}
alias proxycheck { 
  if ($1 == $null) { msg $chan 3* Missing parameters: !dnsbl <ip> }

  elseif ($1 == callback) {
    msg $hget(dbl,chan) 3* The IP has been detected in $+($hget(dbl,found),/,$hget(dbl,num)) BL zones.
    if ($hget(dbl,found) > 0) {
      var %i = 1
      var %s
      while (%i <= $hget(dbl,num)) {
        var %dbl = $gettok($hget(dbl,list),%i,44)
        if ($hget(dbl,%dbl)) { 
          %s = $+(%s,$chr(32),%dbl)
        }
        inc %i
      }
      msg $hget(dbl,chan) 3* Detected BL zones: %s
    }
    .disable #dbl
    hfree dbl
  }
  else {
    if ($1 == localhost) {
      tokenize 32 $ip $2 $3
    }
    if ($longip($1)) {
      msg $2 3* Checking IP Address ( $+ $1 $+ ), Please wait...
      if ($hget(dbl)) { hfree dbl }
      hmake dbl
      hadd -m dbl list dnsbl.dronebl.org,dnsbl.proxybl.org,tor.dnsbl.sectoor.de,tor.dan.me.uk,dnsbl.njabl.org,rbl.efnet.org,virbl.dnsbl.bit.nl,dnsbl.ahbl.org,rbl.faynticrbl.org,dnsbl.ipocalypse.net,dnsbl.rizon.net,dnsbl.swiftbl.org,dnsbl.libirc.so,dnsbl.bnc4free.in,dnsbl.sorbs.net
      hadd -m dbl num $numtok($hget(dbl,list),44)
      hadd -m dbl ip $1
      hadd -m dbl found 0
      hadd -m dbl chan $2
      hadd -m dbl nick $3
      .enable #dbl
      var %i = 1
      while (%i <= $hget(dbl,num)) {
        .dns $+($revip($1),.,$gettok($hget(dbl,list),%i,44))
        inc %i
      }
    }
    else { msg $chan 3* Invalid IP Address. }
  }
}
#dbl off
on *:DNS:{
  var %dbl = $gettok($dns(1),5-,46)
  hadd -m dbl count $calc($hget(dbl,count) + 1) 
  if ($dns(0).ip) { hadd -m dbl %dbl 1 | hadd -m dbl found $calc($hget(dbl,found) + 1) }
  if ($hget(dbl,count) == $hget(dbl,num)) { proxycheck callback }
}
#dbl end

;-RevIP script by Patje from SwiftIRC.
alias revip { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }

-=16:16:01=- !dnsbl localhost
-=16:16:01=- <@Devian> Checking IP Address (176.58.193.22), Please wait...
-=16:16:22=- <@Devian>
The IP has been detected in 0/16 BL zones.
-=16:20:27=- <@Devian> !dnsbl 80.63.56.146
-=16:20:27=- Checking IP Address (80.63.56.146), Please wait...
-=16:20:47=-
The IP has been detected in 3/16 BL zones.
-=16:20:47=- * Detected BL zones: dnsbl.dronebl.org rbl.efnet.org dnsbl.sorbs.net

Jordyk19  -  Jan 21, 2013

No.. I challenged Iota now he can just use your code.. -.-

ProIcons  -  Jan 21, 2013

Well i can see if someone even try to rip my codes so its ok :P...
Btw 5 days with no reply? He doesn't even care:D

iota  -  Jan 22, 2013

I actually tried, but to no avail, I didn't feel like coming back for a while
Plus I have an IRC Network to take care of.

Sign in to comment

Jordyk19   -  Jan 16, 2013

Looks good but you should reduce the lines. Now it spams 15 lines just for each check.
I challenge you to make it something like:

<Bot> The IP has been detected 5 times by 14 BL zones.
<Bot> Detected BL zones: dnsbl.dronebl.org, dnsbl.proxybl.org, tor.dan.me.uk, virbl.dnsbl.bit.nl, dnsbl.ahbl.org

Do you accept my challenge?

iota  -  Jan 16, 2013

Image
Yes

Sign in to comment

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.