Page 1 of 1
A lil confirmation.
Posted: Wed Nov 22, 2006 3:55 pm
by GouroB
Hello all, can anyone confirm these 2 regex, whether they could work against random nick bots and clone-x bots,
^[a-z][0-9]{1,4}![a-z][0-9]{1,4}@.+:[a-z]{6}$
&
^([a-z]{10}).*!\1@.+:\1
Thanks
Posted: Wed Nov 22, 2006 5:01 pm
by Stealth
Those should.
However, if you have Identd checking, you should add ~? after the ! in those. This is how they should look for identd checking:
Code: Select all
^[a-z][0-9]{1,4}!~?[a-z][0-9]{1,4}@.+:[a-z]{6}$
Also, the second one is very broad, even though it requires 10 characters. There may be some innocent users getting banned
Posted: Wed Nov 22, 2006 6:28 pm
by Jobe
I wouldnt have thought "^([a-z]{10}).*!~?\1@.+:\1" would match anyone since as far as i can see ident's are truncated to 9 characters (excluding the ~) anyway. So nobody will have a 10 char ident matching a 10 char nick.
Posted: Wed Nov 22, 2006 8:30 pm
by Stealth
Actually, they are 10 characters
*** Notice -- Client connecting on port 6667: poo (
[email protected]) [clients]
Posted: Wed Nov 22, 2006 10:58 pm
by Jobe
Must be 10 including the ~ then because i looked at someones ident earlier and it was only 9 chars excluding the ~
Posted: Thu Nov 23, 2006 5:20 am
by Stealth
Yes, the ~ counts as one of the 10
Posted: Thu Nov 23, 2006 12:38 pm
by Jobe
So "^([a-z]{10}).*!~?\1@.+:\1" wont macth then since including the ~ its matching against an ident thats 11 chars long (same as the nick prefixed with a ~) so the 11th char wont actually be there it wont macth.
Posted: Fri Nov 24, 2006 12:48 am
by DeadNotBuried
so a
Code: Select all
^(\w{9})(\w).*!(~\1|\1\2)@.+:\1\2$
should do the trick
Posted: Fri Nov 24, 2006 11:19 am
by Jobe
I think that should yes.