summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-default/channels.xml182
-rw-r--r--config-default/users.xml2
-rwxr-xr-xmeta.pl13
-rw-r--r--modules/classes.pl14
-rw-r--r--modules/event.pl40
-rw-r--r--modules/inspect.pl4
-rw-r--r--modules/services.pl18
-rw-r--r--modules/xml.pl1
8 files changed, 222 insertions, 52 deletions
diff --git a/config-default/channels.xml b/config-default/channels.xml
index a23eebb..c9312b7 100644
--- a/config-default/channels.xml
+++ b/config-default/channels.xml
@@ -68,6 +68,10 @@
<opalert>##linux-ops</opalert>
</msgs>
</channel>
+ <channel id="##philosophy" silence="yes">
+ <hilights></hilights>
+ <msgs></msgs>
+ </channel>
<channel id="##physics">
<hilights></hilights>
<msgs></msgs>
@@ -76,6 +80,12 @@
<hilights></hilights>
<msgs></msgs>
</channel>
+ <channel id="##transgender">
+ <hilights>
+ <info>ttuttle</info>
+ </hilights>
+ <msgs></msgs>
+ </channel>
<channel id="##wikia">
<hilights>
<info>vegadark</info>
@@ -151,6 +161,7 @@
<high>mquin</high>
<high>ttuttle</high>
<info>njan</info>
+ <info>ttuttle</info>
<low>denny</low>
<low>Gary</low>
<low>JonathanD</low>
@@ -337,6 +348,22 @@
<debug>#wikimedia-ops</debug>
</msgs>
</channel>
+ <channel id="#wikimedia-office">
+ <hilights>
+ <info>mbimmler</info>
+ <info>Bastique</info>
+ <info>Philippe</info>
+ <info>Cbrown1023</info>
+ <info>StevenW</info>
+ <info>DenizG</info>
+ <info>Az1568</info>
+ <info>Theo10011</info>
+ <info>Ironholds</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ </msgs>
+ </channel>
<channel id="#wikimedia-ops">
<hilights>
<debug>Cbrown1023</debug>
@@ -363,6 +390,25 @@
<debug>jeremyb</debug>
<debug>kibble</debug>
<debug>Keegan</debug>
+ <info>Thehelpfulone</info>
+ <info>Rjd0060</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ </msgs>
+ </channel>
+ <channel id="#wikimedia-outreach">
+ <hilights>
+ <debug>Logan_</debug>
+ <debug>Thehelpfulone</debug>
+ <debug>Tempodivalse</debug>
+ <debug>Tanvir</debug>
+ <debug>Barras</debug>
+ <debug>peteforsyth</debug>
+ <debug>Az1568</debug>
+ <debug>Cbrown1023</debug>
+ <debug>fschulenburg</debug>
+ <debug>Bastique</debug>
</hilights>
<msgs>
<debug>#wikimedia-ops</debug>
@@ -407,6 +453,22 @@
<low>#wikimedia-ops</low>
</msgs>
</channel>
+ <channel id="#wikimedia-toolserver">
+ <hilights>
+ <info>Austin</info>
+ <info>James_F</info>
+ <info>Duesentrieb</info>
+ <info>zwitter</info>
+ <info>DaBPunkt</info>
+ <info>APPER</info>
+ <info>mindspillage</info>
+ <info>Simetrical</info>
+ <info>Werdna</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ </msgs>
+ </channel>
<channel id="#wikipedia" silence="yes">
<hilights>
<debug>Golbez</debug>
@@ -501,6 +563,49 @@
<debug>#wikimedia-ops</debug>
</msgs>
</channel>
+ <channel id="#wikipedia-en-abuse">
+ <hilights>
+ <info>Thehelpfulone</info>
+ <info>jamesofur</info>
+ <info>Nixeagle</info>
+ <info>DeltaQuad</info>
+ <info>Netalarm</info>
+ <info>JoeGazz84</info>
+ <info>MacMed</info>
+ <info>Snowolf</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ <low>#wikimedia-ops</low>
+ </msgs>
+ </channel>
+ <channel id="#wikipedia-en-ambassadors">
+ <hilights>
+ <info>anowlin</info>
+ <info>ragesoss</info>
+ <info>stwalkerster</info>
+ <info>chzz</info>
+ <info>Prodego</info>
+ <info>Deskana</info>
+ <info>Pathoschild</info>
+ <info>fetchcomms</info>
+ <info>BarkingFish</info>
+ <info>Cbrown1023</info>
+ <info>Earwig</info>
+ <info>ldavis</info>
+ <info>annielin</info>
+ <info>PeterSymonds</info>
+ <info>Shirik</info>
+ <info>Fluffernutter</info>
+ <info>Thehelpfulone</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ </msgs>
+ </channel>
+ <channel id="#wikipedia-en-classroom">
+ <hilights></hilights>
+ </channel>
<channel id="#wikipedia-en-help" silence="yes">
<hilights>
<debug>werdan7</debug>
@@ -536,17 +641,55 @@
<low>KFP</low>
<low>Gfoley4</low>
<low>sonia</low>
+ <low>Pine</low>
</hilights>
<msgs>
<debug>#wikimedia-ops</debug>
</msgs>
</channel>
+ <channel id="#wikipedia-en-spi">
+ <hilights>
+ <info>lucasbfr</info>
+ <info>Deskana</info>
+ <info>Tiptoety</info>
+ <info>Avraham</info>
+ <info>DeltaQuad</info>
+ <info>WilliamH_UK</info>
+ <info>Thehelpfulone</info>
+ <info>Steven_Zhang</info>
+ <info>PeterSymonds</info>
+ <info>Shirik</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ <low>#wikimedia-ops</low>
+ </msgs>
+ </channel>
<channel id="#wikipedia-social" silence="yes">
<hilights></hilights>
<msgs>
<low>#wikimedia-ops</low>
</msgs>
</channel>
+ <channel id="#wiktionary">
+ <hilights>
+ <info>yannf</info>
+ <info>Dvortygirl</info>
+ <info>Cbrown1023</info>
+ <info>Leftmost</info>
+ <info>flood</info>
+ <info>Versageek</info>
+ <info>Dmcdevit</info>
+ <info>msh210</info>
+ <info>Amgine</info>
+ <info>TheDaveRoss_</info>
+ <info>Wytukaze</info>
+ <info>Tawker</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ </msgs>
+ </channel>
<channel id="+#wikimedia-ops">
<hilights></hilights>
</channel>
@@ -558,45 +701,6 @@
<hilights></hilights>
</channel>
<channel id="master">
- <event id="advflood" class="advsplitflood" reason="advanced distributed flooding" risk="low" type="public,part,caction">5:3</event>
- <event id="ahbl" class="dnsbl" reason="host $evhost is in dnsbl.ahbl.org ( $xresult )" risk="info" type="join">dnsbl.ahbl.org</event>
- <event id="anontalk1" class="re" reason="anontalk.com spam" risk="medium" type="public">(?i)w(.?)w\1w\1?.\1?a\1n\1o\1n\1t\1a\1l\1k\1?.\1?c\1o\1m</event>
- <event id="autoremove" class="re" reason="on chanserv autoremove" risk="info" type="part">^requested by ChanServ</event>
- <event id="blacklist" class="strbl" reason="sending message containing blacklisted content" risk="low" type="public,part,quit,caction">blah</event>
- <event id="ctcp-dcc" class="re" reason="ctcp-dcc" risk="high" type="cdcc">.*</event>
- <event id="ctcp-ping" class="re" reason="channel-wide CTCP PING" risk="medium" type="cping">.*</event>
- <event id="ctcp-version" class="re" reason="channel-wide CTCP VERSION" risk="medium" type="cversion">.*</event>
- <event id="dcc" class="re" override="dcc-medium" reason="using the DC.C SE.ND exploit" risk="high" type="public">^DCC (SEND|S?CHAT) |\bDCC (SEND|S?CHAT) &quot;?[A-Za-z0-9]+&quot;? \d+ \d+ \d+</event>
- <event id="dcc-medium" class="re" reason="using the DC.C SE.ND exploit" risk="medium" type="public" xresult="1">\bDCC SEND </event>
- <event id="dcc-part" class="re" reason="using the DC.C SE.ND exploit in a part message" risk="high" type="part">\bDCC SEND </event>
- <event id="dcc-topic" class="re" reason="setting a bad topic" risk="medium" type="topic">\bDCC SEND </event>
- <event id="debugme" class="re" reason="sending a string designed to trigger a debug test alert, disregard this" risk="debug" type="public">debugantispambotdebug</event>
- <event id="dronebl" class="dnsbl" reason="host $evhost is in dnsbl.dronebl.org ( $xresult )" risk="info" type="join">dnsbl.dronebl.org</event>
- <event id="efnetbl" class="dnsbl" reason="host $evhost is in rbl.efnetrbl.org ( $xresult )" risk="info" type="join">rbl.efnetrbl.org</event>
- <event id="floodqueue10-20" class="floodqueue" reason="flooding (10 msgs in 20 seconds)" risk="low" type="public,caction">10:20</event>
- <event id="gnaa-topic" class="re" reason="setting a GNAA topic" risk="medium" type="topic">(?i)\bgnaa\b</event>
- <event id="gnaaquit" class="re" reason="quitting with a GNAA message" risk="medium" type="quit">(?i)\bgnaa\b</event>
- <event id="joinflood" class="floodqueue" reason="join flood (5 joins in 20 seconds)" risk="medium" type="join">5:20</event>
- <event id="keylogger" class="re" override="keylogger-medium" reason="using the norton start-key-logger exploit" risk="high" type="public">^startkeylogger$|^stopkeylogger$</event>
- <event id="keylogger-medium" class="re" reason="using the norton start-key-logger exploit" risk="medium" type="public">\bstartkeylogger\b|\bstopkeylogger\b</event>
- <event id="last_measure_regex" class="re" reason="posting what appears to be a last measure link" risk="high" type="public">(?i)(http://(\S+\.)?on\.nimp\.org|http://(\S+\.)?feenode.net|http://wikipaste\.eu|http://(\S+\.)?bioghost\.com|http://(\S+\.)?on\.zoy\.org|http://(lastmeasure|dirtysanchez|doom3|freeipods|halflife2|halo2|lastmeasure4|lastmeasureunified|softmeasure|traceroute)\.zoy\.org)</event>
- <event id="levenflood" class="levenflood" override="flood-5to3" reason="levenshtein flood match" risk="low" type="public">contentisuseless</event>
- <event id="malspreader1" class="nuhg" reason="suspicious NUHG, rule 1" risk="low" type="join">.*!~NUMONE@.*!REAL_NAME</event>
- <event id="massflood" class="splitflood" reason="distributed flooding" risk="high" type="public,part,caction">4:4</event>
- <event id="meepsheep1" class="nuhg" reason="common troll (meepsheep)" risk="info" type="join">(?i).*eepsheep.*</event>
- <event id="nickspam" class="nickspam" reason="nickspamming" risk="high" type="public">60:10</event>
- <event id="njabl" class="dnsbl" reason="host $evhost is in dnsbl.njabl.org ( $xresult )" risk="info" type="join">dnsbl.njabl.org</event>
- <event id="notice" class="re" reason="sending a notice to the channel" risk="medium" type="notice">.*</event>
- <event id="phishing1" class="re" override="notice" reason="trying to steal passwords (v1)" risk="high" type="notice">identify.*/msg .* identify &lt;password&gt;</event>
- <event id="phishing2" class="re" override="notice" reason="trying to steal passwords (v2)" risk="high" type="notice">^This nickname is registered</event>
- <event id="proxybl" class="dnsbl" reason="host $evhost is in dnsbl.proxybl.org" risk="info" type="join">dnsbl.proxybl.org</event>
- <event id="redarmyoflol" class="re" reason="parting with 'red army of lol'" risk="low" type="part">RED ARMY OF LOL</event>
- <event id="sms_spam" class="re" reason="spam link / virus" risk="low" type="public">\.com/sms.exe</event>
- <event id="sorbsbl" class="dnsbl" reason="host $evhost is in dnsbl.sorbs.net ( $xresult )" risk="info" type="join">dnsbl.sorbs.net</event>
- <event id="suckmynick" class="re" reason="using a potentially offensive nick" risk="low" type="join">(suck.*dick)</event>
- <event id="wikifags2" class="re" reason="saying 'sure are a lot of wikifag'..." risk="low" type="public">(?i)^sure are a ?lot of .*fags? in here</event>
- <event id="xchatbroad" class="re" reason="using an x-chat for windows unicode exploit (broad detection version, may be error prone)" risk="low" type="public,part,quit,caction">THISHASBEENDISABLED[&#240;-&#247;][&#128;-&#191;]{3}</event>
- <event id="xchatexploit" class="re" override="xchatbroad" reason="using an x-chat for windows unicode exploit" risk="high" type="public,part,quit,caction">&#243;&#160;&#129;&#159;</event>
<hilights>
<info>Corey</info>
<low>marienz</low>
diff --git a/config-default/users.xml b/config-default/users.xml
index 80f120c..d083b8e 100644
--- a/config-default/users.xml
+++ b/config-default/users.xml
@@ -9,10 +9,12 @@
<person id="dungodung" flags="oath" />
<person id="errantego" flags="doath" />
<person id="gary" flags="oath" />
+ <person id="idleone" flags="o" />
<person id="jeremyb" flags="th" />
<person id="jonathand" flags="oath" />
<person id="kindone" flags="t" />
<person id="ljl" flags="o" />
+ <person id="logan_" flags="oath" />
<person id="lstarnes" flags="oath" />
<person id="marienz" flags="oath" />
<person id="martinp23" flags="oath" />
diff --git a/meta.pl b/meta.pl
index 1719512..a769103 100755
--- a/meta.pl
+++ b/meta.pl
@@ -20,11 +20,14 @@ $::debug = 0;
$::cset = '';
%::debugx = (
"dnsbl" => 0,
- "pingpong" => 0
+ "pingpong" => 0,
+ "services" => 1,
+ "sync" => 1
);
%::dsock = ();
%::spy = ();
$::starttime = time;
+@::syncqueue = ();
BEGIN {
my @modules = qw/Util Xml Inspect Event Services Log Command Classes Mysql/;
@@ -72,6 +75,14 @@ sub init {
my @strbl = io('string_blacklist.txt')->getlines;
chomp @strbl;
@::string_blacklist = @strbl;
+ %::proxies = {};
+ my @proxy = io('proxy.txt')->getlines;
+ chomp @proxy;
+ foreach my $line (@proxy) {
+ if ($line =~ /(\d+\.\d+\.\d+\.\d+):\d+/) {
+ $::proxies{$1} = 1;
+ }
+ }
$irc->start();
}
diff --git a/modules/classes.pl b/modules/classes.pl
index d747815..fc80da1 100644
--- a/modules/classes.pl
+++ b/modules/classes.pl
@@ -25,6 +25,7 @@ sub new
"gecos" => \&gecos,
"nuhg" => \&nuhg,
"levenflood" => \&levenflood,
+ "proxy" => \&proxy
};
$self->{ftbl} = $tbl;
bless($self);
@@ -38,6 +39,17 @@ sub check
return $self->{ftbl}->{$item}->(@_);
}
+sub proxy
+{
+ my ($chk, $id, $event, $chan, $rev) = @_;
+ if (defined($rev) and ($rev =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)\./)) {
+ if (defined($::proxies{"$4.$3.$2.$1"})) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
my %ls = ();
sub levenflood
{
@@ -167,7 +179,7 @@ sub splitflood {
process_cf();
}
if ( scalar @{$cf{$id}{$chan}{$text}} == int($cut[0]) ) {
- $bs{$id}{$text} = time;
+ $bs{$id}{$text} = time unless length($text) < 10;
return 1;
}
return 0;
diff --git a/modules/event.pl b/modules/event.pl
index 39c733d..f9888e5 100644
--- a/modules/event.pl
+++ b/modules/event.pl
@@ -52,6 +52,7 @@ sub new
$conn->add_handler('topic', \&irc_topic);
$conn->add_handler('topicinfo', \&irc_topic);
$conn->add_handler('nicknameinuse', \&on_errnickinuse);
+ $conn->add_handler('bannickchange', \&on_bannickchange);
$conn->add_handler('kick', \&on_kick);
$conn->add_handler('cping', \&on_ctcp);
$conn->add_handler('cversion', \&on_ctcp);
@@ -62,6 +63,8 @@ sub new
$conn->add_handler('cclientinfo', \&on_ctcp);
$conn->add_handler('cfinger', \&on_ctcp);
$conn->add_handler('354', \&on_whoxreply);
+ $conn->add_handler('315', \&on_whoxover);
+ $conn->add_handler('263', \&on_whofuckedup);
$conn->add_handler('account', \&on_account);
$conn->add_handler('ping', \&on_ping);
$conn->add_handler('banlist', \&on_banlist);
@@ -128,7 +131,10 @@ sub on_account
sub on_connect {
my ($conn, $event) = @_; # need to check for no services
$conn->sl('MODE AntiSpamMeta +Q');
- $conn->privmsg( 'NickServ', "ghost $::settings->{nick} $::settings->{pass}" ) if lc $event->{args}->[0] ne lc $::settings->{nick};
+ if (lc $event->{args}->[0] ne lc $::settings->{nick}) {
+ $conn->privmsg( 'NickServ', "ghost $::settings->{nick} $::settings->{pass}" );
+ $conn->privmsg( 'NickServ', "release $::settings->{nick} $::settings->{pass}" );
+ }
$conn->sl('CAP REQ :extended-join multi-prefix account-notify'); #god help you if you try to use this bot off freenode
}
@@ -141,7 +147,11 @@ sub on_join {
if ( lc $conn->{_nick} eq lc $nick) {
$::sc{$chan} = {};
mkdir($::settings->{log}->{dir} . $chan);
- $conn->sl('who ' . $chan . ' %tcnuhra,314');
+ $::synced{$chan} = 0;
+ unless ( @::syncqueue ) {
+ $conn->sl('who ' . $chan . ' %tcnuhra,314');
+ }
+ push @::syncqueue, $chan;
}
$::sc{$chan}{users}{$nick} = {};
$::sc{$chan}{users}{$nick}{hostmask} = $event->{userhost};
@@ -232,6 +242,14 @@ sub on_errnickinuse
$conn->nick($_);
}
+sub on_bannickchange
+{
+ my ($conn, $event) = @_;
+ $_ = ${$::settings->{altnicks}}[rand @{$::settings->{altnicks}}];
+ print "Nick is in use, trying $_\n";
+ $conn->nick($_);
+}
+
sub on_quit
{
my ($conn, $event) = @_;
@@ -455,6 +473,24 @@ sub on_whoxreply
$::sn{$nick}->{account} = lc $account;
}
+sub on_whoxover
+{
+ my ($conn, $event) = @_;
+ my $chan = pop @::syncqueue;
+# print Dumper($event);
+ $::synced{$event->{args}->[1]} = 1;
+ if (defined($chan) ){
+ $conn->sl('who ' . $chan . ' %tcnuhra,314');
+ }
+}
+
+sub on_whofuckedup
+{
+ my ($conn, $event) = @_;
+ if ($::debugx{sync}) {
+ print "on_whofuckedup called!\n";
+ }
+}
sub on_banlist
{
my ($conn, $event) = @_;
diff --git a/modules/inspect.pl b/modules/inspect.pl
index c3a9c1a..6a4afec 100644
--- a/modules/inspect.pl
+++ b/modules/inspect.pl
@@ -32,11 +32,11 @@ sub inspect {
}
}
else {
-# $iaddr = gethostbyname($event->{host});
+ $iaddr = gethostbyname($event->{host});
$rev = join('.', reverse(unpack('C4', $iaddr))).'.' if (defined $iaddr);
}
## NB: isn't there a better way to do this with grep, somehow?
- %aonx = %{$::channels->{channel}->{master}->{event}};
+ %aonx = %{$::rules->{event}};
foreach $chan ( @{$event->{to}} ) {
next unless $chan =~ /^#/;
next if ((defined($::channels->{channel}->{$chan}->{monitor})) and ($::channels->{channel}->{$chan}->{monitor} eq "no"));
diff --git a/modules/services.pl b/modules/services.pl
index e2c53e0..aafe68e 100644
--- a/modules/services.pl
+++ b/modules/services.pl
@@ -22,15 +22,19 @@ sub doServices {
elsif ( $event->{args}->[0] =~ /^You are now identified/ )
{
my @autojoins = @{$::settings->{autojoins}};
- while (@autojoins) {
- my $joinstr = join (',', shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins);
- $conn->schedule($i, sub { $conn->join($joinstr); });
- $i += 7;
- }
- $conn->schedule($i-6, sub { $conn->privmsg('#antispammeta', 'Now joined to all channels in '. (time - $::starttime) . " seconds."); });
+# while (@autojoins) {
+# my $joinstr = join (',', shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins,
+# shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins);
+# $conn->schedule($i, sub { $conn->join($joinstr); });
+# $i += 1;
+# }
+ $conn->join(join(',', @autojoins[0..30]));
+ $conn->join(join(',', @autojoins[30..60]));
+ $conn->schedule(2, sub { $conn->privmsg('#antispammeta', 'Now joined to all channels in '. (time - $::starttime) . " seconds."); });
}
- elsif ($event->{args}->[0] =~ /has been killed$/ )
+ elsif ($event->{args}->[0] =~ /has been (killed|released)/ )
{
+ print "Got kill/release successful from nickserv!\n" if $::debugx{services};
$conn->nick( $::settings->{nick} );
}
elsif ($event->{args}->[0] =~ /Password Incorrect/ )
diff --git a/modules/xml.pl b/modules/xml.pl
index dbe4365..14f5826 100644
--- a/modules/xml.pl
+++ b/modules/xml.pl
@@ -16,6 +16,7 @@ sub readXML {
$::commands = $::xs1->XMLin( "$p/commands.xml", ForceArray => [qw/command/]);
$::mysql = $::xs1->XMLin( "$p/mysql.xml", ForceArray => []);
$::dnsbl = $::xs1->XMLin( "$p/dnsbl.xml", ForceArray => []);
+ $::rules = $::xs1->XMLin( "$p/rules.xml", ForceArray => []);
}
sub writeXML {