From: michael Date: Mon, 22 Dec 2014 12:03:40 +0000 (+0000) Subject: - Removed contrib/ & network-bopm/ X-Git-Tag: 1.0.0beta1~85 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=08494eea3cf0cd6bcda31a867d954bab5760ea0d;p=hopm.git - Removed contrib/ & network-bopm/ git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5053 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/contrib/CVS/Entries b/contrib/CVS/Entries deleted file mode 100644 index 97df658..0000000 --- a/contrib/CVS/Entries +++ /dev/null @@ -1,4 +0,0 @@ -/bopm.spec/1.1/Sun May 26 07:32:45 2002// -D/crontab//// -D/logrotate//// -D/opm-xml//// diff --git a/contrib/CVS/Repository b/contrib/CVS/Repository deleted file mode 100644 index 9d7d524..0000000 --- a/contrib/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -bopm/contrib diff --git a/contrib/CVS/Root b/contrib/CVS/Root deleted file mode 100644 index 55f09d1..0000000 --- a/contrib/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:dg@cvs.blitzed.org:/data/cvs diff --git a/contrib/bopm.spec b/contrib/bopm.spec deleted file mode 100644 index 1dd14df..0000000 --- a/contrib/bopm.spec +++ /dev/null @@ -1,53 +0,0 @@ -Summary: A daemon that protects an IRC server from insecure proxies. -Name: bopm -Version: 2.31 -Release: 1 -Copyright: GPL -Group: Applications/System -Source: http://www.blitzed.org/bop/files/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-root -URL: http://www.blitzed.org/bopm/ - -%description -The Blitzed Open Proxy Monitor is designed to connect to an IRC -server and become an IRC operator. It then watches connect notices -in order to scan all connecting clients for open (insecure) proxies. -Such insecure proxies are commonly used for spamming, floods and other -abusive activities. - -BOPM can detect WinGates, HTTP proxies, SOCKS 4/5 proxies and Cisco -routers with default passwords. BOPM also has support for checking -against a DNS-Based Blacklist (similar to MAPS RBL) and can be -configured to report new proxies back to the Blitzed Open Proxy -Monitoring project. - -For more details please see http://www.blitzed.org/bopm. - -%prep -%setup -q - -%build -rm -rf $RPM_BUILD_ROOT -./configure --prefix=/usr --localstatedir=/var/log -make - -%install -install -d $RPM_BUILD_ROOT/usr/bin -install -d $RPM_BUILD_ROOT/etc -install -m755 -s src/bopm $RPM_BUILD_ROOT/usr/bin -install -m755 -s src/bopchecker $RPM_BUILD_ROOT/usr/bin -install -m600 bopm.conf.sample $RPM_BUILD_ROOT/etc/bopm.conf - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%doc README INSTALL ChangeLog -%{_bindir}/bopm -%{_bindir}/bopchecker -%config %{_sysconfdir}/bopm.conf - -%changelog -* Sun May 26 2002 Andy Smith -- Initial RPM attempt diff --git a/contrib/crontab/CVS/Entries b/contrib/crontab/CVS/Entries deleted file mode 100644 index c7d48c0..0000000 --- a/contrib/crontab/CVS/Entries +++ /dev/null @@ -1,2 +0,0 @@ -/bopmchk/1.3/Wed Jan 29 18:03:44 2003// -D diff --git a/contrib/crontab/CVS/Repository b/contrib/crontab/CVS/Repository deleted file mode 100644 index 62e14c6..0000000 --- a/contrib/crontab/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -bopm/contrib/crontab diff --git a/contrib/crontab/CVS/Root b/contrib/crontab/CVS/Root deleted file mode 100644 index 55f09d1..0000000 --- a/contrib/crontab/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:dg@cvs.blitzed.org:/data/cvs diff --git a/contrib/crontab/bopmchk b/contrib/crontab/bopmchk deleted file mode 100644 index 2f824a9..0000000 --- a/contrib/crontab/bopmchk +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# Blitzed Open Proxy Monitor Crontab Script - Restart BOPM if needed. -# -# From skold@habber.net. -# -# To install this script: -# -# Edit the first line of the script below to reflect the directory -# you installed BOPM in. -# -# Copy this script to the directory you want it to stay in. This -# could be the directory you installed BOPM in, or something neutral, -# such as ~/crontabs or something. -# -# Run crontab -e -# -# To have the script run every minute, type this: -# -# * * * * * ~/crontabs/bopmchk -# -# Save, and exit. The script will now run every minute. - -cd ~/bopm - -# Leave the rest alone. - -if [ -f var/bopm.pid ] ; then - PID=`cat var/bopm.pid` - if `kill -CHLD $PID >/dev/null 2>&1`; then - exit 0; - fi - rm -f var/bopm.pid -fi - -bin/bopm -exit 0; diff --git a/contrib/logrotate/.cvsignore b/contrib/logrotate/.cvsignore deleted file mode 100644 index dbec55f..0000000 --- a/contrib/logrotate/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.sw[op] diff --git a/contrib/logrotate/CVS/Entries b/contrib/logrotate/CVS/Entries deleted file mode 100644 index 36965a2..0000000 --- a/contrib/logrotate/CVS/Entries +++ /dev/null @@ -1,3 +0,0 @@ -/.cvsignore/1.1/Sat Jun 21 04:31:31 2003// -/logrotate.sh/1.1/Sat Jun 21 04:31:31 2003// -D diff --git a/contrib/logrotate/CVS/Repository b/contrib/logrotate/CVS/Repository deleted file mode 100644 index 6d2df55..0000000 --- a/contrib/logrotate/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -bopm/contrib/logrotate diff --git a/contrib/logrotate/CVS/Root b/contrib/logrotate/CVS/Root deleted file mode 100644 index 55f09d1..0000000 --- a/contrib/logrotate/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:dg@cvs.blitzed.org:/data/cvs diff --git a/contrib/logrotate/logrotate.sh b/contrib/logrotate/logrotate.sh deleted file mode 100755 index 7d297da..0000000 --- a/contrib/logrotate/logrotate.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -# This little snippet should periodically rotate your BOPM logs if you have -# nothing else better to do it for you. -# -# Once you have tested that it works, you can crontab it once a day like this: -# -# crontab -e -# 30 02 * * * /path/to/logrotate.sh >/dev/null 2>&1 -# -# which will call it once per day at 02:30AM -# -# From: Andy Smith - -# Location of your logs (full path) -LOGDIR=~/bopm/var - -# Location of PID file (full path) -PIDFILE=~/bopm/var/bopm.pid - -# Names of the files to rotate -FILES="bopm.log scan.log" - -# Program to use to create a new filename for the rotated logfile. The new -# filename will be the original filename followed by a dash and then whatever -# this program outputs. Normally you would use it to append a datestamp. -# This default corresponds to YYYYMMDD-HHMMSS. -APPENDPROG="date +%Y%m%d-%H%M%S" - -# Program to use to compress the logfile after rotating it. Set to the empty -# string ("") to disable compression. Expects something like gzip or bzip2. -ZIPPROG="/bin/bzip2" - -# Nothing configurable below here - -APPEND="-$($APPENDPROG)" - -if [ -f $PIDFILE ]; then - PID=$(cat $PIDFILE) - - cd $LOGDIR - if [ $? -ne 0 ]; then - exit - fi - - for F in $FILES; do - if [ -f $F ]; then - mv $F "$F$APPEND" - fi - done - - kill -USR1 $PID - - if [ ! -z $ZIPPROG ]; then - for F in $FILES; do - F="$F$APPEND" - if [ -f $F ]; then - $ZIPPROG $F - fi - done - fi -else - echo "BOPM doesn't appear to be running!" -fi diff --git a/contrib/opm-xml/CVS/Entries b/contrib/opm-xml/CVS/Entries deleted file mode 100644 index 41164e9..0000000 --- a/contrib/opm-xml/CVS/Entries +++ /dev/null @@ -1,2 +0,0 @@ -/op.php/1.2/Mon Feb 17 14:17:45 2003// -D diff --git a/contrib/opm-xml/CVS/Repository b/contrib/opm-xml/CVS/Repository deleted file mode 100644 index ffc6378..0000000 --- a/contrib/opm-xml/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -bopm/contrib/opm-xml diff --git a/contrib/opm-xml/CVS/Root b/contrib/opm-xml/CVS/Root deleted file mode 100644 index 55f09d1..0000000 --- a/contrib/opm-xml/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:dg@cvs.blitzed.org:/data/cvs diff --git a/contrib/opm-xml/op.php b/contrib/opm-xml/op.php deleted file mode 100644 index ea1f3f3..0000000 --- a/contrib/opm-xml/op.php +++ /dev/null @@ -1,111 +0,0 @@ - - * PHP scripting and layout by CaliMonk - * - * Axenet IRC Network 2003 - * January 11, 2003 - * - * Feel free to use this script as you like, just leave the credits - * to the people who deserve it. - * - * Version 1.0 - * - */ - -/* Change the settings below to your liking. - * - * Be sure to point your kline/gline message for your BOPM - * to whatever URL you run this script on. - * - * For instance if you call this file bopm.php and put it on www.mysite.com - * You should refer to that location in your BOPM kline/gline message - * like for instance: - * kline = "KLINE *@%h :Open Proxy found on your host. Please visit www.mysite.com/bopm.php?ip=%i for more information."; - * - */ - -// Some funky color settings, use as you like. -$cell_color = "#EDE7E7"; // Color of the cells in the table -$top_color = "#FFE1B5"; // Color of the table 'Header' -$linecolor = "#000000"; // Color of the line - -/* Redirection URL - * Do NOT remove the %26, it stands for & - * So the below URL points to http://www.axenet.org/index.php?page=op&removed=1& - * Replacing %26 with a & will NOT work. (Be sure to add a %26 to the end of your Link!) - */ -$redirect = "http://www.axenet.org/index.php?page=op%26removed=1%26"; - -/* Do not edit below this line unless you know what you are doing! */ - -echo ""; -echo ""; - -if ($removed == 1) { - switch ($error) { - case "removed": - echo "
Proxy report for ".$ip."
".$ip." has been removed from the proxy list. It may take up"; - echo "to 30 minutes for the proxy to actually be removed
"; - return; - case "cannot": - echo "".$ip." can not be removed from the proxy list."; - return; - case "nonefound": - echo "".$ip." was not found in the proxy list."; - return; - } -} - -// Opening the XML page to get the results -$stream = fopen("http://opm.blitzed.org/getXML?ip=".$ip."", "r"); -if (!$stream) { echo "Error getting results"; return; } -while (!feof($stream)) { - $buffer .= fread($stream, 5000); -} - -$xmlparser = xml_parser_create(); -xml_parser_set_option($xmlparser,XML_OPTION_CASE_FOLDING,0); -xml_parser_set_option($xmlparser,XML_OPTION_SKIP_WHITE,1); -xml_parse_into_struct($xmlparser, $buffer, $XML_values, $XML_indexes); -xml_parser_free($xmlparser); -if ($XML_values[$XML_indexes["error"][0]]) -{ - switch ($XML_values[$XML_indexes["error"][0]]["attributes"]["code"]) - { - case 2: - echo "Error: The specified IP does not appear in the database"; - return; - case 3: - echo "Error: The specified IP could not be resolved"; - return; - default: - echo "Error: " . $XML_values[$XML_indexes["error"][0]]["attributes"]["text"] . ""; - return; - } -} -echo "Reported by " . $XML_values[$XML_indexes["reporter"][0]]["value"] . ""; -if ($XML_values[$XML_indexes["active"][0]]["value"] == 1) - echo "This proxy is currently active
\n"; -else - echo "This proxy is not currently active
\n"; -echo "Type of Proxy:\n"; -echo "
    "; -for ($i = 0; $XML_values[$XML_indexes["type"][$i]]["value"]; $i++) -{ - echo "
  • " . $XML_values[$XML_indexes["type"][$i]]["value"] . " (port: " . $XML_values[$XML_indexes["type"][$i]]["attributes"]["port"] . ")" . "\n"; -} -echo "

"; -echo "Proxy was first added to the database on " . $XML_values[$XML_indexes["first_added"][0]]["value"] . "
\n"; -echo "Proxy was last seen on " . $XML_values[$XML_indexes["last_seen"][0]]["value"] . "
\n"; -echo "

\n"; -if ($XML_values[$XML_indexes["active"][0]]["value"] == 1) { - echo "If you think this ban was made in error click here to remove the entry.
\n"; - } -echo ""; -?> diff --git a/network-bopm/CVS/Entries b/network-bopm/CVS/Entries deleted file mode 100644 index 45e9b08..0000000 --- a/network-bopm/CVS/Entries +++ /dev/null @@ -1,2 +0,0 @@ -/network-bopm.pl/1.13/Thu Oct 6 21:57:44 2005// -D diff --git a/network-bopm/CVS/Repository b/network-bopm/CVS/Repository deleted file mode 100644 index 321c638..0000000 --- a/network-bopm/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -bopm/network-bopm diff --git a/network-bopm/CVS/Root b/network-bopm/CVS/Root deleted file mode 100644 index 55f09d1..0000000 --- a/network-bopm/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:dg@cvs.blitzed.org:/data/cvs diff --git a/network-bopm/network-bopm.pl b/network-bopm/network-bopm.pl deleted file mode 100644 index a2b3728..0000000 --- a/network-bopm/network-bopm.pl +++ /dev/null @@ -1,304 +0,0 @@ -#!/usr/bin/perl -#Copyright (C) 2003 Erik Fears -# -#This program is free software; you can redistribute it and/or -#modify it under the terms of the GNU General Public License -#as published by the Free Software Foundation; either version 2 -#of the License, or (at your option) any later version. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. -# -#You should have received a copy of the GNU General Public License -#along with this program; if not, write to the Free Software -# -# Foundation, Inc. -# 59 Temple Place - Suite 330 -# Boston, MA 02111-1307, USA. - - - -use strict; -use Socket; - -#Options -my %BOPM = ( - NICK => 'bopm', #Our bopm's nick - TS_GRACE => 30, #Delta allowed above LAST_SCAN in seconds - LAST => time, #TS of last scan - ); - - -my %IRC = ( - NAME => 'bopm.blitzed.org', #Your server name - HOST => 'localhost', #Remote server we're linking to - PORT => '6667', #Port of remote server we're linking to - PASS => 'link', #Link password from C/N - ); - - -#Bahamut -my %PROTOCOL = ( - CAPAB => 'TS3 NOQUIT SSJOIN BURST UNCONNECT NICKIP TSMODE', - ); - -my %NICKFORMAT = ( - NICK => 1, - TS => 3, - USERNAME => 5, - HOSTNAME => 6, - SERVER => 7, - IP => 9, - REALNAME => 10, - ); - -###### END CONFIGURATION ###### - -my %IRC_FUNCTIONS = ( - 'PING' => \&m_ping, - 'NICK' => \&m_nick, - ); - -my $IRC_SOCKET; -my $IRC_DATA; - - -main(); - -# main -# -# Main connects to the IRC server -# and handles the main daemon loop. - -sub main #() -{ - my $read; - - irc_init(); - irc_connect(); - - while(1) { - if($IRC_SOCKET) - { - irc_read(); - } - irc_reconnect(); - } -} - - -# do_log -# -# Log! - -sub do_log #($data) -{ - my $data = $_[0]; - print STDOUT "[" . scalar localtime() . "] " . $data . "\n"; -} - - -# init -# -# Initialize IRC socket -# - -sub irc_init #() -{ - if(!socket($IRC_SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp'))) - { - do_log(sprintf('IRC -> Error initializing IRC socket: %s', $!)); - die; - } -} - - -# irc_connect -# -# Connect to IRC and send registration data -# - -sub irc_connect #() -{ - if(!connect($IRC_SOCKET, sockaddr_in($IRC{PORT}, inet_aton($IRC{HOST})))) - { - do_log(sprintf('IRC -> Error connecting to IRC host: %s', $!)); - return; - } - - irc_send(sprintf('PASS %s', $IRC{PASS})); - irc_send(sprintf('CAPAB %s',$PROTOCOL{CAPAB})); - irc_send(sprintf('SERVER %s', $IRC{NAME})); -} - - - -# irc_reconnect -# -# Reconnct to IRC server -# - -sub irc_reconnect #() -{ - - do_log('IRC -> Reconnecting to server in 30 seconds..'); - - close($IRC_SOCKET); - - sleep(30); - - if(!socket($IRC_SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp'))) - { - do_log(sprintf('IRC -> Error initializing IRC socket: %s', $!)); - die; - } - - irc_connect(); -} - - - -# irc_send -# -# Send data to IRC server -# -# $_[0] IRC Data to send - -sub irc_send #($data) -{ - my $data = $_[0]; - - - do_log(sprintf('IRC SEND -> %s', $data)); - - $data .= "\n\n"; - - if(!send($IRC_SOCKET, $data, 0)) - { - do_log(sprintf('IRC -> send() error: %s', $!)); - irc_reconnect(); - } -} - - -# irc_read -# -# Read data from IRC server -# - -sub irc_read #() -{ - while(<$IRC_SOCKET>) - { - chomp; - irc_parse($_); - } -} - - - -sub irc_parse #($line) -{ - my $line = $_[0]; - - my @parv; - my $command; - my $message; - my %source; - - chomp $line; - - do_log(sprintf('IRC READ -> %s', $line)); - - if(index($line, ':', 1) != -1) - { - @parv = split(/\s+/, substr($line, 0, index($line, ':', 1))); - $message = substr($line, index($line, ':', 1) + 1, length($line)); - } - else - { - @parv = split(/\s+/, $line); - } - - push @parv, $message; - - if($parv[0] =~ /:/) - { - $parv[0] = substr($parv[0], 1, length($parv[0])); - } - else - { - unshift @parv, $IRC{HOST}; - } - - #parse the nick!user@host if it exists - if($parv[0] =~ /([^!]+)!([^@]+)@(.*)/) - { - $source{nickname} = $1; - $source{username} = $2; - $source{hostname} = $3; - $source{is_user} = 1; - } - else { $source{is_user} = 0; } - - - if(exists($IRC_FUNCTIONS{$parv[1]})) - { - $IRC_FUNCTIONS{$parv[1]}(\@parv, \%source); - } -} - - -# m_ping -# -# PING from server. -# -# parv[0] = SOURCE -# parv[1] = PING -# parv[2] = PACKAGE -# - -sub m_ping # \@parv, \%source -{ - my $parv = $_[0]; - irc_send(sprintf('PONG :%s', $$parv[2])); -} - -# m_nick -# - -sub m_nick -{ - my $parv = $_[0]; - my $conn; - - if(@$parv <= 3) - { - return; - } - shift @$parv; - - - #Check if the NICK TS is older than last scan time, give TS_GRACE seconds grace - if($$parv[$NICKFORMAT{TS}] < ($BOPM{LAST} + $BOPM{TS_GRACE})) - { - do_log(sprintf('BOPM -> Not scanning %s due to old TS (%d < %d + %d)', - $$parv[$NICKFORMAT{NICK}], $$parv[$NICKFORMAT{TS}], $BOPM{LAST} , $BOPM{TS_GRACE})); - return; - } - - - $conn = sprintf('*** Notice -- Client connecting: %s (%s@%s) [%s] {class}', - $$parv[$NICKFORMAT{NICK}], - $$parv[$NICKFORMAT{USERNAME}], - $$parv[$NICKFORMAT{HOSTNAME}], - inet_ntoa(pack("N", $$parv[$NICKFORMAT{IP}])), - ); - - #send hybrid connection notice - irc_send(sprintf(':%s NOTICE %s :%s', $IRC{NAME}, $BOPM{NICK}, $conn)); - - $BOPM{LAST} = time; -}