# open proxy checker for eggdrop
# (c) James Seward 2003/4
# version 1.0
# http://www.jamesoff.net/projects/eggdrop
# james@jamesoff.net
# chris@cs-room.com - Tosser^^
# Released under the GPL
# MADE BY James Seward 4/2003 Tweaked by Tosser^^ 7/2005 \(#eggtcl\)
## INSTRUCTIONS
###############################################################################
# This script will check the hosts of people joining channels against one or
# RBLs. Choose your RBLs wisely, some of them list DIALUP SPACE and that would
# be a bad thing to be matching your IRC users against :P
#
# Enable the 'proxycheck' flag for channels you want the script active on
# --> .chanset #somechannel +proxycheck
#
# Users who are +o, +v, or +f in your bot (local or global) won't be checked.
#
# Turn on console level d on the partyline to see some debug from the script
# --> .console +d (to enable)
# --> .console -d (to disable)
## CONFIG
###############################################################################
# space-separated list of RBLs to look in
set proxycheck_rbls { "cbl.abuseat.org" "opm.blitzed.org" "dnsbl.ahbl.org" }
# time in minutes to ban for
set proxycheck_bantime 0
# stop editing here unless you're TCL-proof
## CODE
###############################################################################
#add our channel flag
setudef flag proxycheck
setudef str antijoin
setudef str antidetected
setudef str antikicked
#bind our events
bind join - *!*@* proxycheck_join
#swing your pants
# catch joins
proc proxycheck_join { nick host handle channel } {
#check we're active
if {![channel get $channel proxycheck]} {
return 0
channel set $channel antijoin "[expr [channel get $channel antijoin] + 1]"
}
#don't apply to friends, voices, ops
if {[matchattr $handle fovC|fovC $channel]} {
return 0
}
#get the actual host
regexp ".+@(.+)" $host matches newhost
if [regexp {[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $newhost] {
#it's a numeric host, skip the lookup
proxycheck_check2 $newhost $newhost 1 $nick $newhost $channel
} else {
putloglev d * "proxycheck: doing dns lookup on $newhost to get IP"
dnslookup $newhost proxycheck_check2 $nick $newhost $channel
}
}
# first callback (runs RBL checks)
proc proxycheck_check2 { ip host status nick orighost channel } {
global proxycheck_rbls
if {$status} {
putloglev d * "proxycheck: $host resolves to $ip"
# reverse the IP
regexp {([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})} $ip matches a b c d
set newip "$d.$c.$b.$a"
# look it up in the rbls
foreach rbl $proxycheck_rbls {
putloglev d * "proxycheck: looking up $newip.$rbl"
dnslookup "$newip.$rbl" proxycheck_check3 $nick $host $channel $rbl
}
} else {
putlog "proxycheck: Couldn't resolve $host. (No further action taken.)"
}
}
# second callback (catches RBL results)
proc proxycheck_check3 { ip host status nick orighost channel rbl } {
global proxycheck_bantime
if {$status} {
putlog "proxycheck: got host $host = ip $ip from RBL $rbl ... banning"
if {[botisop $channel]} {
newchanban $channel "*!*@$orighost" "$::botnick" "Detected as a openproxy host. Original Host: \($orighost\) RBL \($rbl\)." $proxycheck_bantime
putquick "MODE $channel -ov+b $nick $nick *!*@$orighost"
putquick "KICK $channel $nick :Detected as a openproxy host. Original Host: \($orighost\) RBL: \($rbl\)."
channel set $channel antidetected "[expr [channel get $channel antidetected] + 1]"
channel set $channel antikicked "[expr [channel get $channel antikicked] + 1]"
set fp [open proxy.db a]
put $fp "$nick detected as a openproxy. Host: \($orighost\) RBL: \($rbl\) Banned on $channel for $proxycheck_bantime minutes."
close $fp
} else {
putlog "$nick detected as a openproxy. Host: \($orighost\) RBL: \($rbl\) Could not ban on $channel because i have no op."
newchanban $channel "*!*@$orighost" "$::botnick" "Detected as a openproxy host. Original Host: \($orighost\) RBL \($rbl\)." $proxycheck_bantime
set fp [open proxy.db a]
put $fp "$nick detected as a openproxy. Host: \($orighost\) RBL: \($rbl\) Could not ban on $channel because i have no op."
close $fp
channel set $channel antidetected "[expr [channel get $channel antidetected] + 1]"
}
}
#if we didn't get a host, they're not in RBL
}
putlog "proxycheck 1.0 Made By James Seward but Tweaked by Tosser^^ Loaded"
Now. As you know im not that good at tcl. I dont know if this script will actually work. If the script is up-to-date. Any chance anyone could look through this script and tell me if this script will actually work.
Thanks in advance!!
PS: I would test this. But i dont have a eggdrop to test it on, and my windrop dont want to work
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
man, i would love to install linux on my computer. But its shared with my two sisters. They know [censored] about linux. So, im stuck. I want linux, they dont know how to use it. Windows is crap. Linux is l33t. So i wont win, unless i teach them all i know about linux...
Tosser^^, Hows about build a second machine to run linux from. It doesnt have to be l33t as you put it. I run RH9 on a PentiumII just fine, then you can stop bugging us with your dumb questions
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Tosser^^ wrote:Yea, i could. Not all people have the time and money to do that. Also, i have to buy a ruoter etc to get it hooked up to the internet.
you don't need money, you need determination, persistance, modesty to become good with computers in general, not only good Tcl/eggdrop scripter
here, choose a free UNIX shell account provider, register, get account and try to teach yourself a thing or two; they won't let you to run bots, but you'll at least learn the basics of using UNIX/Linux (that is, if you are over 13 and serious about learning stuff)