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.

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
C
Casey952
Voice
Posts: 15
Joined: Tue Jun 24, 2008 10:46 pm

Post by Casey952 »

All Protection regular expressions does not detect and does nothing.

Random Drones and Caps that use regular expressions are not detecting and does nothing, does not warn, kick, ban.

Do we need to install a regex package for regular expressions to work? (Debian)


Many Thanks.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Casey952 wrote:All Protection regular expressions does not detect and does nothing.

Random Drones and Caps that use regular expressions are not detecting and does nothing, does not warn, kick, ban.

Do we need to install a regex package for regular expressions to work? (Debian)


Many Thanks.
No need to install anything extra AFAIK. Could you elaborate a bit? Give a few examples and the reason you think the script should react?
C
Casey952
Voice
Posts: 15
Joined: Tue Jun 24, 2008 10:46 pm

Post by Casey952 »

4.7 running on Debian.

I was having a look at Random Drones testing it out with random nicks which it did not kick.

I noticed the setting did not have kb

Code: Select all

lappend ap:udefs {ap:drones "+ 180 45 2"}
I put in kb (+ 180 kb 2) which did not work.

I tried a copy and paste of some of the regex letters in the script with both kb and 45 which did not work.

I saw a forum post on here with Random Drones with a nick that got kicked but did not work on my one.

I had a look for another regular expressions on Caps and tested that but did not work doing all caps.

Code: Select all

lappend ap:udefs {ap:caps "60:90 120 w:k:kb 2"}
repeat - flood - etc work fine.

Was thinking I might need a regex package installed for it to work.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Regarding the ap:drones default settings, it's explained in the setting's documentation

Code: Select all

# Use .chanset #channel ap:drones + <btime> <pmeth> <btype> (in DCC to enable)
# Set default value here: (+ enabled, - disabled)
# If you set <pmeth> to a positive-integer then the bot will only kick the drone once.
# So if the drone rejoins within this amount of seconds it won't be kicked again.
lappend ap:udefs {ap:drones "+ 180 45 2"}
So 45 would still make the bot kick an offender after it joins for the first time.

Also note that modifying the settings inside the script won't work as these are only the default settings when you load the script for the first time. You need to use .chanset to make any changes to AP's settings for each channel:

Code: Select all

# * All settings are enabled via .chanset DCC command. Example: .chanset #channel ap:textl 5:2 15 w:k:kb 2
# this will enable the text flood (lines) protection on #channel (punish on 5 lines or more in 2 seconds)
# 1st warn - 2nd kick - 3rd kickban. ban is 15 minutes and ban type is 2.
I can't really help you if you don't give us an example nickname that you expect the script to catch. The script's drone detector is pretty limited so don't expect it to be super effective.

If you want to manually test regular expressions you can just run tclsh in your terminal and try it out. Example:
% regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} "aasdsds" dronm
1
% puts $dronm
sdsds
1 means there was a match, otherwise the output is 0.
C
Casey952
Voice
Posts: 15
Joined: Tue Jun 24, 2008 10:46 pm

Post by Casey952 »

In the terminal I did tclsh which said command not found

seems like I do not have something installed for regex to work.


The packages I have installed:

apt-get install ntp build-essential git bison flex openssl libssl-dev oidentd nano tcl8.6-dev


tclsh I also tried:

tclsh regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} "aasdsds" dronm

tclsh % regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} "aasdsds" dronm

command not found


The nick I tried for random drones: qhubekela

from the post I saw on here.
qhubekela [qhubekela@bombshellz/user/...]
qhubekela was kicked from #bombshellz by BattleStar [Possible random drone detected. (*qh*) :: [Sat Apr 30
11:45:48 2011] - Banned 0 minutes ·43·]
it did not kick using that nick.

I did a copy and paste of some of the regex letters in the script to try but did not kick.

q[bcdfghknpqrstwzxv]|x

Code: Select all

  "drones" {
   variable droneexempts
   if {$off != "+"} {return 0}
   set Nod 0
   if {[info exists droneexempts([set chan [string tolower $chan]])]} { set l $droneexempts($chan) } { set l $droneexempts(global) }
   foreach e $l { if {[string match -nocase $e $nick!$uhost]} {set Nod 1 ; break} }
   if {$Nod} {return 0}
   set id [string trimleft [lindex [split $uhost @] 0] ~]
   if {[follow 2 dr:$chan 3] != -1} {return 0}
   if {[regexp {^[a-z]{4,}![a-z]{4,}$} $nick!$id]} {
    if {(![string match {*[aeiou]*} $nick]) || ([regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} $nick dronm] && ![regexp {a{3}|e{3}|i{3}|o{3}|u{3}} $nick])} {
     if {![info exists dronm]} { set dronm "no vowels" }
     droneb $nick $uhost $chan $btime $pmeth $btype *$dronm*
    } elseif {![string match *$id* $nick] && [regexp {q[bcdfghknpqrstwzxv]|x[dfghkmnqrvz]|z[bcdfhmqrtvx]|v[bfghkmnqxw]|g[zv]|kz|bgb|wj|lx|jwm} $nick dronm]} {
     droneb $nick $uhost $chan $btime $pmeth $btype *$dronm*
    }
   }
  }

Code: Select all

elseif {![string match *$id* $nick] && [regexp {q[bcdfghknpqrstwzxv]|x[dfghkmnqrvz]|z[bcdfhmqrtvx]|v[bfghkmnqxw]|g[zv]|kz|bgb|wj|lx|jwm} $nick dronm]} {

Doing all caps

CAPS CAPS CAPS CAPS CAPS CAPS CAPS
CAPSCAPSCAPSCAPSCAPSCAPSCAPSCAPS

did not warn - kick - ban.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Seems you do have a problem with your TCL interpreter (I'm not sure what exactly). Try re-installing TCL and recompile Eggdrop. If you face further problems, try asking in the Eggdrops section as I'm not using Eggdrop at all nowadays so perhaps someone with a better grip can help you if needed.
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

If you have tcl8.6-dev as you state then get on the shell and type tclsh then hit Enter. After this you will see a % as your terminal and cop/paste that regexp line in there.

I tested the regexp you mentioned and works fine, meaning returns 1.

Code: Select all

user@blah ~ $ tclsh
% regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} "aasdsds" dronm
1
%
Then to exit just type exit and hit Enter.
Once the game is over, the king and the pawn go back in the same box.
C
Casey952
Voice
Posts: 15
Joined: Tue Jun 24, 2008 10:46 pm

Post by Casey952 »

I uninstalled tcl8.6-dev and installed tcl tcl-dev

I only did tcl8.6-dev.

TCLSH worked and those commands work.

tcl8.6-dev -- tclsh <enter> said command not found.

doing all caps worked, was long enough for it to kick, was too short when I was trying before.


Random Drones --

I was doing it in Kiwi IRC using the random nick qhubekela but did not kick.

I tried it in mIRC which worked and did a kick on qhubekela

Kiwi IRC has your ident as your address, which I tried the ident in mIRC and did not kick.

Kiwi IRC ident -- b4b59a4a

qhubekela ! b4b59a4a@* -- does not kick

qhubekela ! casey@* -- kicks


When the ident has certain things in it, it does not kick (nick qhubekela)
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Casey952 wrote:qhubekela ! b4b59a4a@* -- does not kick

qhubekela ! casey@* -- kicks


When the ident has certain things in it, it does not kick (nick qhubekela)
The condition for the drones punishment requires that both the nickname and ident are 4 or more lower case alphabets (non-numeric). Since "b4b59a4a" fails this check, it's not considered a drone.

Again, the drone kicker is very primitive so don't expect it be very effective. It may have been decent in 2005, but certainly not in 2016.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Version 4.9b4 with Eggdrop 1.8 support released: https://github.com/sirfz/allprotection. ... tag/v4.9b4
C
Casey952
Voice
Posts: 15
Joined: Tue Jun 24, 2008 10:46 pm

Post by Casey952 »

I am having some issues with the AntiSpam bot.

In DCC to the bot, it says AntiSpam connecting to server which says it a few times before it gets connected.

Then the AntiSpam bot gets disconnected connection timed out after a minute or so, and then reconnects with a second bot name and then another bot name about 3 of them in the channel.

When you join the channel, and you get the checking for spam message the bot sends you, you get several checking for spam messages from the one bot.

The bots in the channel do not get disconnected from the network being a dead connection. When you .die the bot from DCC, all bots disconnect.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Hey Casey952, I assume you're using the beta release? In addition, could you specify on which network you're testing it so I can try and locally reproduce your issue.
C
Casey952
Voice
Posts: 15
Joined: Tue Jun 24, 2008 10:46 pm

Post by Casey952 »

AntiSpam on All Protection 4.7 with Eggdrop 1.6.21.

This is on a VPS on the Charybdis IRC Server with AntiSpam.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Casey952 wrote:AntiSpam on All Protection 4.7 with Eggdrop 1.6.21.

This is on a VPS on the Charybdis IRC Server with AntiSpam.
If the bot connects and behaves normally on another IRC network then it's network-specific issue that needs to be handled properly by the bot, can you confirm this?
g
gembels
Voice
Posts: 26
Joined: Sat Jul 07, 2012 9:31 pm

rehash

Post by gembels »

Hi Sir_Fz,

I am one of your fans... I just wondering.. I did some modification in your code just to make the antispam can change their ip, ident and nick every time they cycles. But to do that, so far I am using rehash command, i know its not right or so blatantly. is there anyway to kill the antispam bot with proc and reconnect again ?

Thanks in advance
Post Reply