A lil confirmation.

These are old archives. They are kept for historic purposes only.
Post Reply
GouroB
Posts: 182
Joined: Thu Oct 28, 2004 7:42 pm
Location: London
Contact:

A lil confirmation.

Post 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
-=GouroB=-
https://www.shunno.info
Your complete web Solution
Irc.BanglaCafe.com
LargesT Chat server in BanglaDesH
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post 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}$

Code: Select all

^([a-z]{10}).*!~?\1@.+:\1
Also, the second one is very broad, even though it requires 10 characters. There may be some innocent users getting banned
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post 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.
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Actually, they are 10 characters :P

*** Notice -- Client connecting on port 6667: poo ([email protected]) [clients]
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

Must be 10 including the ~ then because i looked at someones ident earlier and it was only 9 chars excluding the ~
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Yes, the ~ counts as one of the 10
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post 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.
DeadNotBuried
Posts: 44
Joined: Wed Mar 10, 2004 5:30 am
Location: irc.majestic-liaisons.com
Contact:

Post by DeadNotBuried »

so a

Code: Select all

^(\w{9})(\w).*!(~\1|\1\2)@.+:\1\2$
should do the trick
Majestic Liaisons Adult Chat - [url=irc://irc.majestic-liaisons.com:6667]IRC[/url] , Java
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

I think that should yes.
Post Reply