+++ /dev/null
-/bopm.spec/1.1/Sun May 26 07:32:45 2002//
-D/crontab////
-D/logrotate////
-D/opm-xml////
+++ /dev/null
-bopm/contrib
+++ /dev/null
-:ext:dg@cvs.blitzed.org:/data/cvs
+++ /dev/null
-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 <grifferz@blitzed.org>
-- Initial RPM attempt
+++ /dev/null
-/bopmchk/1.3/Wed Jan 29 18:03:44 2003//
-D
+++ /dev/null
-bopm/contrib/crontab
+++ /dev/null
-:ext:dg@cvs.blitzed.org:/data/cvs
+++ /dev/null
-#!/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;
+++ /dev/null
-/.cvsignore/1.1/Sat Jun 21 04:31:31 2003//
-/logrotate.sh/1.1/Sat Jun 21 04:31:31 2003//
-D
+++ /dev/null
-bopm/contrib/logrotate
+++ /dev/null
-:ext:dg@cvs.blitzed.org:/data/cvs
+++ /dev/null
-#!/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 <grifferz@blitzed.org>
-
-# 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
+++ /dev/null
-/op.php/1.2/Mon Feb 17 14:17:45 2003//
-D
+++ /dev/null
-bopm/contrib/opm-xml
+++ /dev/null
-:ext:dg@cvs.blitzed.org:/data/cvs
+++ /dev/null
-<?php
-/* This script gets results from the DNSBL list which blitzed.org maintains.
- * It Gets its results by sending an IP adres to an XML interface
- * and its gets the results parsed by the XML.
- *
- * Thanks goes out to the Blitzed crew for helping us set this up.
- *
- * XML parser by codemastr <codemastr at axenet.org>
- * PHP scripting and layout by CaliMonk <calimonk at axenet.org>
- *
- * 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 "<TABLE CELLSPACING=1 CELLPADDING=2 width=500 align=center bgcolor=\"".$linecolor."\">";
-echo "<TR><TD COLSPAN=4 bgcolor=\"".$top_color."\" align=center>Proxy report for ".$ip."</TD></TR>";
-
-if ($removed == 1) {
- switch ($error) {
- case "removed":
- echo "<TR><TD bgcolor=\"".$cell_color."\">".$ip." has been removed from the proxy list. It may take up";
- echo "to 30 minutes for the proxy to actually be removed</td></tr></table>";
- return;
- case "cannot":
- echo "<TR><TD bgcolor=\"".$cell_color."\">".$ip." can not be removed from the proxy list.</td></tr></table>";
- return;
- case "nonefound":
- echo "<TR><TD bgcolor=\"".$cell_color."\">".$ip." was not found in the proxy list.</td></tr></table>";
- return;
- }
-}
-
-// Opening the XML page to get the results
-$stream = fopen("http://opm.blitzed.org/getXML?ip=".$ip."", "r");
-if (!$stream) { echo "<TR><TD bgcolor=\"".$cell_color."\">Error getting results</td></tr></table>"; 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 "<TR><TD bgcolor=\"".$cell_color."\">Error: The specified IP does not appear in the database</td></tr></table>";
- return;
- case 3:
- echo "<TR><TD bgcolor=\"".$cell_color."\">Error: The specified IP could not be resolved</td></tr></table>";
- return;
- default:
- echo "<TR><TD bgcolor=\"".$cell_color."\">Error: " . $XML_values[$XML_indexes["error"][0]]["attributes"]["text"] . "</td></tr></table>";
- return;
- }
-}
-echo "<TR><TD bgcolor=\"".$cell_color."\">Reported by " . $XML_values[$XML_indexes["reporter"][0]]["value"] . "</td></tr><TR><TD bgcolor=\"".$cell_color."\">";
-if ($XML_values[$XML_indexes["active"][0]]["value"] == 1)
- echo "This proxy is currently active<BR>\n";
-else
- echo "This proxy is not currently active<BR>\n";
-echo "Type of Proxy:\n";
-echo "<UL>";
-for ($i = 0; $XML_values[$XML_indexes["type"][$i]]["value"]; $i++)
-{
- echo "<LI>" . $XML_values[$XML_indexes["type"][$i]]["value"] . " (port: " . $XML_values[$XML_indexes["type"][$i]]["attributes"]["port"] . ")" . "\n";
-}
-echo "</UL><P>";
-echo "Proxy was first added to the database on " . $XML_values[$XML_indexes["first_added"][0]]["value"] . "<BR>\n";
-echo "Proxy was last seen on " . $XML_values[$XML_indexes["last_seen"][0]]["value"] . "<BR>\n";
-echo "<P>\n";
-if ($XML_values[$XML_indexes["active"][0]]["value"] == 1) {
- echo "If you think this ban was made in error <A HREF=\"http://opm.blitzed.org/remove?ip=$ip&doit=1&redirect=".$redirect."\">click here to remove</A> the entry.<BR>\n";
- }
-echo "</td></tr></table>";
-?>
+++ /dev/null
-/network-bopm.pl/1.13/Thu Oct 6 21:57:44 2005//
-D
+++ /dev/null
-bopm/network-bopm
+++ /dev/null
-:ext:dg@cvs.blitzed.org:/data/cvs
+++ /dev/null
-#!/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;
-}