Page 1 of 1

version reply empty ?

Posted: Thu Apr 06, 2006 1:08 pm
by akin
-> [nick] VERSION
[nick VERSION reply]

version reply is empty ? what is regex

Posted: Thu Apr 06, 2006 2:39 pm
by Mark
Please take a look at http://forums.unrealircd.com/viewtopic.php?t=3203

It isn't possible using a spamfilter!

Posted: Thu Apr 06, 2006 4:41 pm
by aquanight
In this case - it is possible.
There is a difference between no version reply and an empty version reply. Notice that a version string IS in fact being sent back - it simply appears to contain nothing.

(I say appears to because it could very easily consist of whitespace. Or it could use color codes to make the version text the same color as your bg color. The regex considers only the spaces-only situation. Colors can't be checked for in regexes since they get stripped.)

Code: Select all

spamfilter {
    regex "^\\x01VERSION \\s*\\x01$";
    target private-notice; // CTCP replies are sent via NOTICE.
    action kline;
    reason "Empty version string.";
};
-or-

/spamfilter + n gline - Empty_version_string. ^\x01VERSION \s*\x01$

Posted: Thu Apr 06, 2006 6:23 pm
by Guest
aquanight wrote:In this case - it is possible.
There is a difference between no version reply and an empty version reply. Notice that a version string IS in fact being sent back - it simply appears to contain nothing.

(I say appears to because it could very easily consist of whitespace. Or it could use color codes to make the version text the same color as your bg color. The regex considers only the spaces-only situation. Colors can't be checked for in regexes since they get stripped.)

Code: Select all

spamfilter {
    regex "^\\x01VERSION \\s*\\x01$";
    target private-notice; // CTCP replies are sent via NOTICE.
    action kline;
    reason "Empty version string.";
};
-or-

/spamfilter + n gline - Empty_version_string. ^\x01VERSION \s*\x01$
= no

what is regex? :roll:

Posted: Fri Apr 07, 2006 3:27 am
by ARcanUSNUMquam
Anonymous wrote:what is regex? :roll:
Wikipedia wrote:A regular expression (abbreviated as regexp or regex, with plural forms regexps, regexes, or regexen) is a string that describes or matches a set of strings, according to certain syntax rules.
--from http://en.wikipedia.org/wiki/Regex

Regex is like a way more powerful version of wildcards. It allows you to do text matching with a good deal of accuracy and selection. Pretty awesome.

Posted: Fri Apr 07, 2006 5:46 am
by aquanight
Well by that definition alone you could say wildcards are regexes! :P

</obligatory>

Posted: Fri Apr 07, 2006 8:02 pm
by ARcanUSNUMquam
But wildcards dont match the "certain syntax rules" =P

Posted: Thu May 11, 2006 6:37 pm
by akin
in server send /ctcp nick version

Code: Select all

spamfilter { 
    regex "\x1VERSION"; 
    target private-notice;
    action kill; 
    reason "exit."; 
};
good pozitive

but!!!!

Code: Select all

* Connecting to irc.xxxx.com (6666)
-
-irc.xxxx.com- *** Couldn't resolve your hostname; using your IP address instead
-
[IRC VERSION]
-
Welcome to the xxxx IRC Network
nick connect server negative? why?

help me pleas?

Posted: Thu May 11, 2006 11:49 pm
by Stealth
  1. Your regex isn't valid.
  2. Your regex is too broad and would not let ANYONE connect.
aquanight's example should work perfectly
Guest wrote:= no
Then why not? If you don't want to accept our help and give us reasons why it won't work, I see no reason to keep this topic open...

Posted: Tue May 16, 2006 1:54 pm
by akin
ircd edit pozitiv

Code: Select all

code removed
spamfilter negativ

WHY?

Code: Select all

in server send /ctcp nick version 
Code: 

spamfilter { 
    regex "\x1VERSION"; 
    target private-notice; 
    action kill; 
    reason "exit."; 
}; 
 

good pozitive 

but!!!! 
Code: 

* Connecting to irc.xxxx.com (6666) 
- 
-irc.xxxx.com- *** Couldn't resolve your hostname; using your IP address instead 
- 
[IRC VERSION] 
- 
Welcome to the xxxx IRC Network 
 

nick connect server negative? why? 

Posted: Tue May 16, 2006 3:19 pm
by Dukat
akin, we don't support modifying the source code.
http://www.vulnscan.org/UnrealIrcd/faq/#40

Topic locked.

Posted: Wed May 17, 2006 12:58 am
by Stealth
Code removed.

Posted: Wed May 17, 2006 8:53 am
by Dukat
:D