This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Proxy Banning Script

Old posts that have not been replied to for several years.
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Proxy Banning Script

Post by toefraz »

I need a script to ban hosts that are IPs. They contain no letters, only numbers and decimals. I want it to perm ban them, but I also want it to be able to allow exceptions. So like, if it bans someone I actually want to allow access to my channel, it'll let them through. Anyone know of a script like this, or can make one for me? Thanks in advance. :)
When the going gets tough...Make lemonade!!!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

use ban exceptions (+e) if your server/network allows it (EFnet, DALnet, ircd-hybrid and bahamut- based networks)
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

it doesn't. :-?
When the going gets tough...Make lemonade!!!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

then maintain full host (not masked) bans only
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

the reason i want this, is because im trying to get around spammers. They come in using different proxies with different ips, and they mostly only use ips in their hostnames. So I wanted a way to ban them automatically when they enter, so that I don't have to see any more spam.
When the going gets tough...Make lemonade!!!
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

it's kinda hard to manually ban them without them spamming first. since the spam, then quit irc.
When the going gets tough...Make lemonade!!!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well, I'd recommend spambuster.tcl :P
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Proxy Banning Script

Post by user »

toefraz wrote:I need a script to ban hosts that are IPs.
I want it to perm ban them, but I also want it to be able to allow exceptions.

Code: Select all

bind join - "#yourChan *" ipchk
proc ipchk {n u h c} {
	if {![isbotnick $n]&&![validuser $h]&&[string match {*[0-9]} $u]} {
		newchanban $c *!*@[lindex [split $u @] end] ${::botnet-nick} "I love you"
	}
}
...to exempt people from being banned, add them to your bot. (if you have several regulars that should have no other privileges than being able to join without getting banned, add a single "exempt user" with multiple hosts and no flags :)
Have you ever read "The Manual"?
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

thank you
When the going gets tough...Make lemonade!!!
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

how can i make that to be with all channels?
When the going gets tough...Make lemonade!!!
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

toefraz wrote:how can i make that to be with all channels?
remove the channel name from the bind (make the mask "*")
Have you ever read "The Manual"?
User avatar
toefraz
Halfop
Posts: 44
Joined: Thu Jul 01, 2004 4:35 am

Post by toefraz »

so it would be

Code: Select all

bind join - "*" ipchk 
?
When the going gets tough...Make lemonade!!!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

user's proc will ban ANYONE with unresolving host (who isn't recognized as a botuser) - not just alleged spammers - so beware what you wish(ed) for, for you might get it
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I do usually always a !seen on the host before considering a wide ban. You might get really busy exempting wished users (and some might never return, because the don't understand IRC well enough to notice you didn't ban them but their whole hostmark style ^^). Maybe you just add wideban for the proxys, there aren't too many as long your Network g-lines open Proxys (and I hope all do today, but probably they don't ^^). If your network doesn't you might contact an IRC oper to ask if it planed.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

some of the big 4 (i.e. EFnet and IRCnet) have pretty decentralized policies on this, so you might find yourself on a server that scans your hostname on connect for open proxies on well-known ports, or you may be using a server which couldn't care less - it's up to server's admin to install and use a proxy scanner

there are scripts (I've seen at least one) that scan users on join, but this is too heavy burden on eggdrop IMHO - it's far from easy to implement proper and efficient scanner in a script

besides, novadays most spammers don't use open proxies - they are spawned by trojans/viruses from infected windows boxes
Locked