initial import of blsb

This commit is contained in:
Fish 2005-05-08 09:24:11 +00:00
parent 13c2bec79f
commit af1ee101a6
15 changed files with 6674 additions and 0 deletions

14
.gitattributes vendored
View file

@ -1 +1,15 @@
* text=auto !eol * text=auto !eol
/ChangeLog -text
/LICENSE -text
/Makefile.in -text
/README.blsb -text
/RELNOTES -text
/aclocal.m4 -text
/blsb.c -text
/blsb.h -text
/blsb_help.c -text
/configure -text
/configure.in -text
/install-sh -text
/modconfig.h.in -text
/modconfigwin32.h -text

4
ChangeLog Normal file
View file

@ -0,0 +1,4 @@
Black List Scanning Bot Module for NeoStats Changelog.
==============================================================================
1.0 - Fish (M)
- Initial Version

341
LICENSE Normal file
View file

@ -0,0 +1,341 @@
# $Id: LICENSE,v 1.1 2002/09/04 08:52:34 fishwaldo Exp $
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

60
Makefile.in Normal file
View file

@ -0,0 +1,60 @@
#Neostats Module Makefile
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LIBS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
DIRECTORY = @DIRINST@/modules/
INCLUDES = -I@DIRINST@/include/ -I.
SRCS = blsb.c blsb_help.c
OBJS = ${SRCS:.c=.o}
TARGET = blsb.so
DOCS = README.blsb
DATA =
SCRIPTS =
DISTFILES = $(SRCS) $(DOCS) modconfig.h.in configure install-sh ChangeLog Makefile.in blsb.h LICENSE RELNOTES modconfigwin32.h
DISTDIR = @PACKAGE@-@VERSION@
all: module
@echo "Compilation complete."
@echo "Run 'make install' (or 'gmake install' on some systems) to install."
@echo "If you require support, see the README file."
# include dependency info
@MAKEDEPENDENCIES@
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $<
$(CC) -MM $(INCLUDES) -c $< > $*.d
module: $(OBJS)
$(LD) -shared -o $(TARGET) $(LDFLAGS) $(OBJS)
clean:
/bin/rm -rf $(TARGET) *.o Makefile *.log modconfig.h
install: module
$(INSTALL) -m 644 $(TARGET) $(DIRECTORY)
$(INSTALL) -m 644 $(DOCS) $(DIRECTORY)../doc/
@echo "Installation complete."
@echo "See the README file for instructions on loading this module."
dist:
@echo -n "Creating directories"
@-rm -rf $(DISTDIR)
@mkdir $(DISTDIR)
@mkdir $(DISTDIR)/libopm
@echo "Done"
@echo -n "Copying distribution files"
@for file in $(DISTFILES); do \
echo -n "."; \
cp -pr $$file $(DISTDIR)/$$file; \
done
@echo "Done"
@tar -czf $(DISTDIR).tar.gz $(DISTDIR)/*
@echo "Tar file $(DISTDIR).tar.gz created, Freshmeat Time"
$(OBJS): Makefile

680
README.blsb Normal file
View file

@ -0,0 +1,680 @@
OPSB Manual
_________________________________________________________________
1. Prerequisites and Installation.
1.1. Compiling and Installation
2. Basic Configuration
2.1. Exclusion Lists
2.2. TARGET IP and TARGET PORT
2.3. BanTime
3. Detailed Configuration
3.1. CACHETIME Setting
3.2. SCAN Setting
3.3. AKILL Setting
3.4. OPMDOMAIN Setting
3.5. MAXBYTES Setting
3.6. TIMEOUT
3.7. OPENSTRING
3.8. SPLITTIME
3.9. SCANMSG Setting
3.10. PORTS Setting
3.10.1. Listing Ports/Protocols
3.10.2. Adding Ports
3.10.3. Deleting Ports
4. Operational Commands
4.1. LOOKUP Command
4.2. INFO Command
4.3. CHECK Command
4.4. STATUS Command
Welcome to the Open Proxy Scanning Bot (OPSB) Manual. This document
will aid you in setting up and running OPSB on your IRC network.
OPSB is a Proxy Scanning Service that scans connecting clients for
Open Proxies. These Open Proxies are often used by malicious users and
trojans to connect to your network and attack the network, users, or
channels that you host. It bases its scanning engine on the BOPM proxy
scanning library available at http://www.blitzed.org, but unlike the
BOPM software, it has native support to scan all clients network wide,
rather than via individual servers. This means that you only need one
OPSB service running on your network to protect your entire IRC
network.
Additionally, OPSB makes use of Open Proxy lists. These lists often
contain IP addresses of verified Open Proxies, and OPSB can ban these
users without even scanning. By default, OPSB uses the blitzed open
proxy list (More details available at http://opm.blitzed.org)
OPSB is flexible in that it has many advanced configuration options
available to IRC administrators, including the ability to easily
modify the protocols and ports to scan of connecting users, as well as
exclude certian users or servers from scanning. This allows you maxium
flexibility without the overhead of running multiple copies of proxy
scanning software. In addition, it has the ability to Queue up scans,
so during periods of peak usage, OPSB will not consume all bandwidth
or file descriptors, but still scan users in a timely manor.
Proxy Scanning is only one defence against Trojans and Malicious
users, and can not detect all types of open Proxies. We therefore
recomend that the IRC administrators run other software such as
SecureServ, and familiarize themselves with the OperServ functionality
found in most traditional IRC services packages.
By Default, OPSB scans the following protocols and ports (But this can
be easily customized)
* HTTP Proxies on Port 80, 3128, 8000, 8080
* HTTP Post Proxies on Port 80, 3128, 8000, 8080
* Wingate Servers on Port 23
* Insecure Cisco Routers on port 23
* SOCKS4 Servers on 1080
* SOCKS5 Servers on 1080
These ports are some of the more common ports, but administrators
might find other ports that are often associated with open proxies. In
these cases, the administrator can simple add the new port to be
scanning without restarting OPSB.
Warning
When picking a host to run OPSB from, make sure you check with your
Shell or ISP provider to ensure that there are no Transparent HTTP
proxies enabled on that network. Transparent proxies are often used to
speed up HTTP downloads for users without requiring the user to update
their browser configuration. If you often get false positive scans on
users on port 80, then most likely your hosting provider has
implemented a Transparent Proxy. See if they can disable this
transparent proxy for you, or alternativly, find a new hosting
provider that does not run a transparent proxy. THERE IS NO WAY FOR
OPSB TO DETECT IT IS BEHIND A TRANSPARENT PROXY.
OPSB is written and maintained by Justin Hammond. It requires the
NeoStats software. More information about OPSB, or NeoStats, can be
found at http://www.neostats.net/
OPSB is Copyright, 2004 by Justin Hammond.
1. Prerequisites and Installation.
OPSB is designed to run on Top of NeoStats. The Following requirements
at the time of writting are required for NeoStats:
* A Linux or BSD based Server or Shell.
* A supported IRCd. Currently, Hybrid7, Unreal, Ultimate2.x,
Ultimate3.x, NeoIRCd, Bahumat
* Some basic Unix administration Skill
* Of Course, a IRC network to connect it all together.
Please refer to the NeoStats website for more information on the
requirements
OPSB itself requires the following:
* NeoStats 2.5.8 or Higher correctly installed and Running
* The time to read this entire document.
Warning
OPSB has the potential to Akill/Gline your entire network. Its
strongly suggested that you read this entire document before even
attempting to compile OPSB, as I'm just going to laugh, if you
didn't read, and it AKILL's your entire network. This is Beta
Software, there are BUGS. beware.
1.1. Compiling and Installation
As long as you have successfully setup NeoStats, and installed it
correctly, Compiling OPSB is very simple and straight forward. First
you must extract the files from the download package. This is as
simple as:
bash$ tar -xzf OPSB-<ver>.tar.gz
This should then create a directory called OPSB-<version> where
<version> is the Version of OPSB. Then Proceed to Change into the OPSB
directory, and run Configure as follows:
bash$./configure [--enable-debug | --with-neostats=<dir>]
--enable-debug is only usefull for diagnostics purposes when used in
conjuction with debugging tools. There should be no need to use this
option on a day to day basis
--with-neostats=<dir> should be used if your neostats directory is not
in a standard location (~/NeoStats/). Replace <dir> with the full path
to your NeoStats installation directory (NOT SOURCE DIRECTORY)
Configuring OPSB will look something like the following screen:
[Fish@fish-dt]$ ./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for pcre_compile in -lpcre... yes
checking Location of NeoStats...... /home/fish/NeoStats/
checking for /home/fish/NeoStats//include/dl.h... yes
checking Version of NeoStats...... Compatible Version
checking Whether to Enable Debuging...... no
configure: creating ./config.status
config.status: creating Makefile
(*----------------------------------------------------------*)
(| To compile your module, please type 'make' |)
(| If make completes without errors, then you |)
(| Must 'make install', but please be sure that NeoStats |)
(| Is not currently running with a module of the same name |)
(| Running, otherwise Make install will not work |)
(| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |)
(| If you are running a BSD, make install may produce a |)
(| Error, if that is the case, then please manually copy |)
(| opsb.so to the NeoStats/dl directory |)
(| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |)
(*----------------------------------------------------------*)
(| For Support please visit: |)
(| IRC: /server irc.irc-chat.org |)
(| #neostats channel |)
(| WWW: http://www.neostats.net/boards/ |)
(*----------------------------------------------------------*)
(|This Module was written by: |)
(| fish (fish@dynam.ac) |)
(*----------------------------------------------------------*)
If the configuration did not produce a error, you may then move onto
Compiling OPSB. Compiling is simply just issuing the "make" command
(or "gmake" if you are running BSD):
[Fish@fish-dt]$ make
(cd libopm; make libopm.a)
make[1]: Entering directory `/home/fish/opsb/libopm'
gcc -c -O2 -Wall -I. -I.. compat.c
gcc -c -O2 -Wall -I. -I.. config.c
gcc -c -O2 -Wall -I. -I.. inet.c
gcc -c -O2 -Wall -I. -I.. libopm.c
gcc -c -O2 -Wall -I. -I.. list.c
gcc -c -O2 -Wall -I. -I.. malloc.c
gcc -c -O2 -Wall -I. -I.. proxy.c
ar cru libopm.a compat.o config.o inet.o libopm.o list.o malloc.o proxy.o
ranlib libopm.a
make[1]: Leaving directory `/home/fish/opsb/libopm'
gcc -c -O2 -Wall -I/home/fish/NeoStats//include/ -I. -Ilibopm opsb.c
gcc -c -O2 -Wall -I/home/fish/NeoStats//include/ -I. -Ilibopm proxy.c
gcc -c -O2 -Wall -I/home/fish/NeoStats//include/ -I. -Ilibopm opsb_help.c
ld -shared -o opsb.so opsb.o proxy.o opsb_help.o libopm/libop
m.a
[1005|/home/fish/opsb]
[Fish@fish-dt]$
Again, check for Error messages. As long as there are not error
messages, "make install" will install OPSB, this README file, and any
auxiluary files needed into your NeoStats directory:
[Fish@fish-dt]$ make install
(cd libopm; make libopm.a)
make[1]: Entering directory `/home/fish/opsb/libopm'
make[1]: `libopm.a' is up to date.
make[1]: Leaving directory `/home/fish/opsb/libopm'
ld -shared -o opsb.so opsb.o proxy.o opsb_help.o libopm/libop
m.a
/usr/bin/install -c
-m 644 opsb.so
/home/fish/NeoStats//dl/
/usr/bin/install -c
-m 644 README.opsb opsb.S
ettings /home/fish/NeoStats//dl/../doc/
[1006|/home/fish/opsb]
If you recieve *ANY* errors at all during the this process, please
post them on our Support boards, at http//www.neostats.net/boards/
Once Installation is complete, you can either configure NeoStats to
load OPSB when it starts, or load OPSB via IRC.
To Configure NeoStats to automatically load OPSB when it boots, add
the following line to your "neostats.cfg" file in the NeoStats
directory:
LOAD_MODULE OPSB
To load OPSB via IRC, you must make sure you have the appropriate
permissions and issue the following command:
/msg neostats load OPSB
Thats it. OPSB is now loaded and ready for use (in fact, it will
already be running now, but read on for futher information.
2. Basic Configuration
OPSB is completly configured online via IRC. When you first start up
OPSB, it attempts some "Sane" defaults for you to get started with,
but you should always review these settings as soon as you install.
Additionally, while its in this "Default" state, it will warn you
every so often via a global message as well as messages to the
services channel that it is still "unconfigured". Some of the settings
that you may want to review right away are:
* Exclusion Lists - You should setup a Exclude list for your IRC
Services server (NickServ etc)
* Target IP address and Ports that OPSB tries to get the proxies to
connect to.
* Default Ban Time when OPSB finds a open Proxy.
These are outlined below:
2.1. Exclusion Lists
Exclusion lists allow you to specify certian Hostmasks or Servers that
should be excluded from monitoring by OPSB. This exclusion list would
allow a administrator to say, allow users on that are matched against
a open proxy, when the administrator has verified that the trojan does
not in fact exist on the users host.
Caution
Exclusions should be setup for your Services Server, so that OPSB does
not try to scan ChanServ, or NickServ, or any of the bots relating to
Nickname protection.
Adding a Entry
To add a entry to the Exclusion list, use the following format:
/msg OPSB exclude add <1/0> <type> <reason>
Where:
<host> = The HostName/Server or Channel name. WildCards ? and * are
permitted.
<type> = The type of exclusion. 0 is for HostNames, 1 is for Servers
<reason> = a short description of the exclusion, for operator
reference only.
The output is as follows:
>OPSB< exclude add services.irc-chat.net 1 Blah is my reason
-OPSB- Added services.irc-chat.net (Server) exception to list
Listing an Entry
To list the Exclusions simple type:
/msg OPSB exclude list
And all the current exclusions are listed. Additionaly, a Position
number is provided for use with the delete command. The output is as
follows:
>OPSB< exclude list
-OPSB- Exception List:
-OPSB- 1) *.blah.com (Server) Added by Fish for Blah is my reason
-OPSB- 2) is.blah.com (HostName) Added by Fish for can by high
-OPSB- End of List.
Deleting an Entry
To delete a entry, you should first lookup the Position of the entry
that you wish to delete. The format of the command is as follows:
/msg OPSB exclude del <num>
Where:
<num> is the position of the entry you wish to delete in the list
The output of the command is as follows:
>OPSB< exclude del 1
-OPSB- Deleted services.irc-chat.net server out of exception list
2.2. TARGET IP and TARGET PORT
By default, OPSB sets up each proxy scan to attempt to connect back to
the IP address and port of the server that NeoStats connects to. This
may not always be what you wish, as it can help a attacker map our how
your network is structured. Ideally, you should pick the IP address of
a IRC server you host that is stable and on a fast connection, and
enter its IP address and port numbers into OPSB.
Changing the TargetIP
To add a entry to the Helper list, use the following format:
/msg OPSB set targetip <newipaddress>
Where:
<newipaddress> = The ip address to attempt to get proxies to connect
to
The output is as follows:
-> *opsb* set targetip 203.208.228.144
=opsb= Target IP set to 203.208.228.144
Changing the Target Port
To list the helpers simple type:
/msg OPSB set targetport <newport>
Where:
<newport> = the new port to attempt to get proxies to connect to
The output is as follows:
-> *opsb* set targetport 6667
=opsb= Target PORT set to 6667
2.3. BanTime
OPSB by default bans the IP/Hostname of a Open Proxy for 1 day (86400
seconds). Some networks may wish to increase or decrease this time
value.
Changing the Ban Time
To change the akilltime, type:
-> *opsb* set akilltime 86400
=opsb= Ban time changed to 86400
3. Detailed Configuration
OPSB attempts to be as configurable as possible in order to cater for
each individual networks requirements. This in turn though makes the
configuration very complex. There are many many settings with OPSB
that affect how it operates, how it responds and even, how affects the
performance of NeoStats Overall. Out of the box, OPSB provides
sensible defaults for these settings, but you may wish to read this
section for details on exactly what each option does, and its affect
on how OPSB operates.
The following list summaries the available Options you can set in OPSB
* CACHETIME
* SCAN
* AKILL
* OPMDOMAIN
* MAXBYTES
* TIMEOUT
* OPENSTRING
* SPLITTIME
* SCANMSG
* PORTS
To change any of these settings, you use the Set Interface in OPSB.
Eg:
/msg OPSB set <option> <params>
To view the current settings, issue the following command:
/msg OPSB set list
The following Sections describes the different options, their params,
and the effect on OPSB in detail.
3.1. CACHETIME Setting
In order to improve performance, OPSB caches the results of scans it
has performed so if a user disconnects and reconnects, they are not
scanned again, and thus this saves bandwidth and improves the
performance of OPSB. By default, OPSB saves previous scans for 1 hour.
Smaller IRC networks may wish to increase this value, while larger IRC
networks that are concerned about performance or memory usage of OPSB
may with to leave this setting as it is. Setting the cache time to 0
disables the use of caching, and forces OPSB to scan every user
connecting every time.
To Change the setting, issue the following Command:
/msg OPSB set CACHETIME <seconds>
3.2. SCAN Setting
Sometimes a IRC administrator may wish to only make use of the Open
Proxy list lookup, and not actually perform a scan on users.
SCAN forces OPSB to only perform a lookup of the IP address in
the configured OPMDOMAIN.
If you wish to turn off Proxy checks, issue the following command
/msg OPSB set SCAN <ON/OFF>
3.3. AKILL Setting
Often, when setting up OPSB for the first time, or making changes to
the ports that are to be scanning, you may wish to test OPSB without
it actually performing a AKILL. Turning AKILL off disables the
placement of a AKILL on open Proxy hosts.
To Change the setting, issue the following Command:
/msg OPSB set AKILL <ON/OFF>
3.4. OPMDOMAIN Setting
This setting changes with domain OPSB should consult for a positive
match on a particular IP address. By Default, OPSB checks
opm.blizted.org. Another list may be substituted instead of the
default on. At this time, we have not tested any other open proxy
list, although most lists should work with no problems. Please report
success/failure to our boards
To Change this Setting, issue the following Command:
/msg OPSB set OPMDOMAIN <newdomain>
3.5. MAXBYTES Setting
Maxbytes controls how much data to read from a open connection before
determining that the host in question does not contain a Open Proxy.
As we check ports that are common with legitimate applications such as
webservers, we don't need to download the entire webpage to determine
that it is not a open proxy. By default, we only read 500 bytes which
should be sufficient for most networks.
To Change this Setting, issue the following Command:
/msg OPSB set MAXBYTES <bytelimit>
3.6. TIMEOUT
It is very common for users to now use personal firewall software on
their PC. This often leads to probes the the users ip address that
never actually get rejected or are successfull, but just hang trying
to connect. the Timeout value controls how long to wait before
assuming that the host is not operating a proxy. By default, we wait
30 seconds
To Change this setting, issue the following command:
/msg OPSB set TIMEOUT <seconds>
3.7. OPENSTRING
This setting controls what strings to look for that indicate a Open
Proxy. By default, we look for the standard string "*** Looking up
your hostname..." which is one of the first messages sent to
connecting IRC clients. There should be no need to change this
setting. Internally, OPSB also scans for common Trottle or akill
messages.
To Change this setting, issue the following command:
/msg OPSB set OPENSTRING <newstring>
3.8. SPLITTIME
OPSB is very sensitive to timedrifts on the IRC network. In order to
not scan users that might be part of a Netjoin (When two IRC servers
reconnect after a Netsplit) we only scan users who's signon time is
less than this setting. If your IRC network times are not in sync, you
might experience issues where users connecting to one "lagged" out
server are not scanning. In this case, you should fix the time on the
affected server. A last resort is to increase this time value. By
default, we only scan users that connected in the last 300 seconds
To Change this setting, issue the following command:
/msg OPSB set SPLITTIME <seconds>
3.9. SCANMSG Setting
This setting changes the default message that is sent to users when
they sign on the IRC network. You can customise this message to point
to a webpage giving more details, or customize to your local language.
To Change the setting, issue the following Command:
/msg OPSB set SCANMSG <msg>
3.10. PORTS Setting
The ports setting allows you to customize what ports and protocols are
scanned when users connect to your IRC network. This can be used to
detect proxies that are running on additional ports that OPSB does not
scan by default.
3.10.1. Listing Ports/Protocols
To list the current protocols and the assocated ports, issue the
following command:
/msg OPSB ports list
And the following is displayed:
>opsb< ports list
-opsb- Port List:
-opsb- 1) HTTP Port: 80
-opsb- 2) HTTP Port: 8080
-opsb- 3) HTTP Port: 8000
-opsb- 4) HTTP Port: 3128
-opsb- 5) SOCKS4 Port: 1080
-opsb- 6) SOCKS5 Port: 1080
-opsb- 7) WINGATE Port: 23
-opsb- 8) ROUTER Port: 23
-opsb- 9) HTTPPOST Port: 80
-opsb- 10) HTTPPOST Port: 8080
-opsb- 11) HTTPPOST Port: 8000
-opsb- 12) HTTPPOST Port: 3128
-opsb- End of List.
3.10.2. Adding Ports
To add a additional port to scan with a particular protocol, use the
following command:
/msg opsb ports add <type> <port>
Where:
<type> is the type of Protocol to use. Either:
HTTP
HTTPPOST
SOCKS4
SOCKS5
WINGATE
ROUTER
<port> is any valid port number between 1 and 65535
The change is imediate, and new users will have these ports scanned
when they connect.
3.10.3. Deleting Ports
If you wish to delete a port to be scanned, issue the following
command:
/msg opsb ports del <id>
Where <id> is the ID number of the port/Protocol you wish to delete.
ID can be obtained from a port listing command described above.
OPSB requires a restart when deleting a port, so you should either
restart NeoStats, or Reload the OPSB module.
4. Operational Commands
OPSB has a number of commands that you can issue it in order to
perform checks or operations on your IRC network. These commands aid
Administrators in keeping their network secure, and keeping OPSB upto
date.
The following list summerizes these commands:
* LOOKUP
* INFO
* CHECK
* STATUS
* REMOVE
The following Sections Describe these commands in detail
4.1. LOOKUP Command
The lookup comand can perform DNS lookups for you. You can specify
what information you wish to retrive. This command is open to all
users by default.
The format of the command is as follows:
/msg OPSB lookup <ip|hostname> <flag>
Where:
<ip|hostname> is the item you wish to lookup.
<flag> is optional, and specified what type of data you wish to
lookup. Available options include:
txt - Lookup Text Records rp - Lookup the Responsible Person for this
record ns - Lookup the Name Servers for this record soa - Lookup the
SOA for this Record
If no flag is given, we attempt to lookup the A record.
The output of the command is as follows:
-> *opsb* lookup irc.irc-chat.net
=opsb= irc.irc-chat.net resolves to 202.181.4.129
=opsb= irc.irc-chat.net resolves to 203.208.228.144
=opsb= irc.irc-chat.net resolves to 216.218.235.254
=opsb= irc.irc-chat.net resolves to 66.227.101.55
4.2. INFO Command
This command provides users with information about what functions OPSB
performs. Its intended to just provide directions to users for more
information
The format of the command is as follows:
/msg OPSB info
4.3. CHECK Command
This command forces OPSB to perform a full scan on the specified
nickname, ip adress or hostname.
The format of the command is as follows:
/msg OPSB check <nick|host>
The output is as follows:
=opsb= Checking fish for open Proxies
<opsb> Starting proxy scan on Fish (XXXX.singnet.com.sg) by Request of Fish
=opsb= Negitiation failed for protocol HTTP(80)
=opsb= Negitiation failed for protocol HTTP(8000)
=opsb= Negitiation failed for protocol HTTP(3128)
=opsb= Negitiation failed for protocol SOCKS4(1080)
=opsb= Negitiation failed for protocol SOCKS5(1080)
=opsb= Negitiation failed for protocol WINGATE(23)
=opsb= Negitiation failed for protocol ROUTER(23)
=opsb= Negitiation failed for protocol HTTPPOST(80)
=opsb= Negitiation failed for protocol HTTPPOST(8000)
=opsb= Negitiation failed for protocol HTTPPOST(3128)
=opsb= Closed Proxy on Protocol HTTP (8080)
=opsb= Closed Proxy on Protocol HTTPPOST (8080)
=opsb= scan finished on Fish
=opsb= XXXX.singnet.com.sg does not appear in DNS black list
4.4. STATUS Command
This command gives the Administrator statistics on the how OPSB is
performing, how many checks it has conducted, and other information
relating to the performance of OPSB.
The format of the command is as follows:
-> *opsb* status
=opsb= Proxy Results:
=opsb= Hosts Scanned: 5831 Hosts found Open: 1 Exceptions 0
=opsb= Cache Entries: 128
=opsb= Cache Hits: 5523
=opsb= Blacklist Hits: 4
=opsb= Currently Scanning 0 Proxies (0 in queue):

27
RELNOTES Executable file
View file

@ -0,0 +1,27 @@
* BLSB * M & Fish * Version 1.0.0
==============================================================================
Important information you should know: (READ THIS!)
==============================================================================
This is an alpha release. Not all features will work and there may be major
bugs in the software. This release is purely for us to get feedback on the new
version of NeoStats and should not be run on production networks. This release
is ideal for users with test networks or those that want an opportunity to
help us develop the new version with feedback and suggestions.
No support is provided for this release so if you have problems and are unable
to resolve them using the provided documentation, you should use the supported
stable 2.5 series instead until NeoStats 3.0 is further along.
Bugs, requests and suggestions should be reported using the bug tracking
system. You must provide all information required as listed in the README
section on support or your entry will be removed.
Settings and data files from 2.5.x will not work with 3.0. Settings for a1
may not be compatible with this version. You should delete all files with
"config" in the filename from the directory ~/NeoStats 3.0/data before
using this version.
Known issues that we are aware of and should not be reported:
None

146
aclocal.m4 vendored Normal file
View file

@ -0,0 +1,146 @@
dnl This is copyright Rüdiger Kuhlmann <info@ruediger-kuhlmann.de>
AC_DEFUN([AC_FUNC_SNPRINTF],
[AC_CHECK_FUNCS(snprintf vsnprintf)
AC_MSG_CHECKING(for working snprintf)
AC_CACHE_VAL(ac_cv_have_working_snprintf,
[AC_TRY_RUN(
[#include <stdio.h>
int main(void)
{
char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
int i;
i = snprintf (bufs, 2, "%s", "111");
if (strcmp (bufs, "1")) exit (1);
if (i != 3) exit (1);
i = snprintf (bufd, 2, "%d", 111);
if (strcmp (bufd, "1")) exit (1);
if (i != 3) exit (1);
exit(0);
}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
AC_MSG_RESULT([$ac_cv_have_working_snprintf])
AC_MSG_CHECKING(for working vsnprintf)
AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
[AC_TRY_RUN(
[#include <stdio.h>
#include <stdarg.h>
int my_vsnprintf (char *buf, const char *tmpl, ...)
{
int i;
va_list args;
va_start (args, tmpl);
i = vsnprintf (buf, 2, tmpl, args);
va_end (args);
return i;
}
int main(void)
{
char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
int i;
i = my_vsnprintf (bufs, "%s", "111");
if (strcmp (bufs, "1")) exit (1);
if (i != 3) exit (1);
i = my_vsnprintf (bufd, "%d", 111);
if (strcmp (bufd, "1")) exit (1);
if (i != 3) exit (1);
exit(0);
}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
AC_LIBOBJ(snprintf)
AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.])
AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken")
fi])
dnl This macro figures out what libraries are required on this platform to link
dnl sockets programs. It's usually -lsocket and/or -lnsl or neither. We test for
dnl all three combinations.
dnl Copyright Warren Young <warren@etr-usa.com>
AC_DEFUN([ETR_SOCKET_NSL],
[
AC_CACHE_CHECK(for libraries containing socket functions,
ac_cv_socket_libs, [
oCFLAGS=$CFLAGS
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
],
[
struct in_addr add;
int sd = socket(AF_INET, SOCK_STREAM, 0);
inet_ntoa(add);
],
ac_cv_socket_libs=-lc, ac_cv_socket_libs=no)
if test x"$ac_cv_socket_libs" = "xno"
then
CFLAGS="$oCFLAGS -lsocket"
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
],
[
struct in_addr add;
int sd = socket(AF_INET, SOCK_STREAM, 0);
inet_ntoa(add);
],
ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no)
fi
if test x"$ac_cv_socket_libs" = "xno"
then
CFLAGS="$oCFLAGS -lsocket -lnsl"
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
],
[
struct in_addr add;
int sd = socket(AF_INET, SOCK_STREAM, 0);
inet_ntoa(add);
],
ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no)
fi
CFLAGS=$oCFLAGS
])
if test x"$ac_cv_socket_libs" = "xno"
then
AC_MSG_ERROR([Cannot find socket libraries])
elif test x"$ac_cv_socket_libs" = "x-lc"
then
ETR_SOCKET_LIBS=""
else
ETR_SOCKET_LIBS="$ac_cv_socket_libs"
fi
AC_SUBST(ETR_SOCKET_LIBS)
]) dnl ETR_SOCKET_NSL
AC_DEFUN([TYPE_SOCKLEN_T],
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>],
[socklen_t len = 42; return 0;],
ac_cv_type_socklen_t=yes,
ac_cv_type_socklen_t=no)
])
if test $ac_cv_type_socklen_t != yes; then
AC_DEFINE(socklen_t, int, "have socklet_t defined?")
fi
])

240
blsb.c Normal file
View file

@ -0,0 +1,240 @@
/* NeoStats - IRC Statistical Services
** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
** http://www.neostats.net/
**
** 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
**
** NeoStats CVS Identification
** $Id: blsb.c 162 2005-04-28 09:45:44Z Fish $
*/
#include "neostats.h"
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#include "blsb.h"
Bot *blsb_bot;
int do_set_cb (CmdParams *cmdparams, SET_REASON reason);
static int ss_event_signon (CmdParams* cmdparams);
/** Copyright info */
const char *blsb_copyright[] = {
"Copyright (c) 1999-2005, NeoStats",
"http://www.neostats.net/",
NULL
};
/** Module Info definition
* version information about our module
* This structure is required for your module to load and run on NeoStats
*/
ModuleInfo module_info = {
"OPSB",
"An Black List Scanning Bot",
blsb_copyright,
blsb_about,
NEOSTATS_VERSION,
MODULE_VERSION,
__DATE__,
__TIME__,
MODULE_FLAG_LOCAL_EXCLUDES,
0,
};
static int blsb_set_exclusions_cb( CmdParams *cmdparams, SET_REASON reason )
{
if( reason == SET_LOAD || reason == SET_CHANGE )
{
SetAllEventFlags( EVENT_FLAG_USE_EXCLUDE, blsb.exclusions );
}
return NS_SUCCESS;
}
static bot_cmd blsb_commands[]=
{
{NULL, NULL, 0, 0, NULL, NULL}
};
static bot_setting blsb_settings[]=
{
{"AKILL", &blsb.doakill, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, NULL, blsb_help_set_akill, do_set_cb, (void*)1 },
{"AKILLTIME", &blsb.akilltime, SET_TYPE_INT, 0, 20736000,NS_ULEVEL_ADMIN, NULL, blsb_help_set_akilltime, do_set_cb, (void*)86400 },
{"CACHETIME", &blsb.cachetime, SET_TYPE_INT, 0, 86400, NS_ULEVEL_ADMIN, NULL, blsb_help_set_cachetime, do_set_cb, (void*)3600 },
{"VERBOSE", &blsb.verbose, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, NULL, blsb_help_set_verbose, do_set_cb, (void*)1 },
{"EXCLUSIONS", &blsb.exclusions, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, NULL, blsb_help_set_exclusions, blsb_set_exclusions_cb, (void *)0 },
{NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL },
};
/** BotInfo */
static BotInfo blsb_botinfo =
{
"blsb",
"blsb1",
"blsb",
BOT_COMMON_HOST,
"BlackList Scanning Bot",
BOT_FLAG_SERVICEBOT|BOT_FLAG_RESTRICT_OPERS|BOT_FLAG_DEAF,
blsb_commands,
blsb_settings,
};
int do_set_cb (CmdParams *cmdparams, SET_REASON reason) {
return NS_SUCCESS;
}
/** @brief ModSynch
*
* Startup handler
*
* @param none
*
* @return NS_SUCCESS if suceeds else NS_FAILURE
*/
int ModSynch (void)
{
SET_SEGV_LOCATION();
blsb_bot = AddBot (&blsb_botinfo);
if(blsb.verbose) {
irc_chanalert (blsb_bot, "Black List Scanning bot has started");
}
return NS_SUCCESS;
};
void addtocache(unsigned long ip)
{
lnode_t *cachenode;
cache_entry *ce;
SET_SEGV_LOCATION();
/* pop off the oldest entry */
if (list_isfull(cache)) {
dlog (DEBUG2, "blsb: Deleting Tail of Cache: %d", (int)list_count(cache));
cachenode = list_del_last(cache);
ce = lnode_get(cachenode);
lnode_destroy(cachenode);
ns_free(ce);
}
cachenode = list_first(cache);
while (cachenode) {
ce = lnode_get(cachenode);
if (ce->ip == ip) {
dlog (DEBUG2,"blsb: Not adding %ld to cache as it already exists", ip);
return;
}
cachenode = list_next(cache, cachenode);
}
ce = malloc(sizeof(cache_entry));
ce->ip = ip;
ce->when = time(NULL);
lnode_create_append(cache, ce);
}
int checkcache(unsigned long ip)
{
#if 0
Client *scanclient;
lnode_t *node, *node2;
cache_entry *ce;
SET_SEGV_LOCATION();
if( scandata->server )
{
scanclient = FindServer(scandata->server);
if( scanclient && ModIsServerExcluded( scanclient ) )
{
return 1;
}
}
if( scandata->who )
{
scanclient = FindUser(scandata->who);
if( scanclient && ModIsUserExcluded( scanclient ) )
{
return 2;
}
}
node = list_first(cache);
while (node) {
ce = lnode_get(node);
/* delete any old cache entries */
if ((time(NULL) - ce->when) > blsb.cachetime) {
dlog (DEBUG1, "blsb: Deleting old cache entry %ld", ce->ip);
node2 = list_next(cache, node);
list_delete(cache, node);
lnode_destroy(node);
ns_free(ce);
node = node2;
break;
}
if (ce->ip == scandata->ip.s_addr) {
dlog (DEBUG1, "blsb: user %s is already in Cache", scandata->who);
blsb.cachehits++;
if (scandata->reqclient)
irc_prefmsg (blsb_bot, scandata->reqclient, "User %s is already in Cache", scandata->who);
return 3;
}
node = list_next(cache, node);
}
#endif
return 0;
}
ModuleEvent module_events[] =
{
{ EVENT_NICKIP, ss_event_signon, EVENT_FLAG_EXCLUDE_ME},
{ EVENT_NULL, NULL}
};
/* this function kicks of a scan of a user that just signed on the network */
static int ss_event_signon (CmdParams* cmdparams)
{
return 1;
}
int ModInit( void )
{
ModuleConfig (blsb_settings);
/* we have to be careful here. Currently, we have 7 sockets that get opened per connection. Soooo.
* we check that MAX_SCANS is not greater than the maxsockets available / 7
* this way, we *shouldn't* get problems with running out of sockets
*/
me.want_nickip = 1;
return NS_SUCCESS;
}
int ModFini( void )
{
return NS_SUCCESS;
}
#ifdef WIN32 /* temp */
int main (int argc, char **argv)
{
return 0;
}
#endif

62
blsb.h Normal file
View file

@ -0,0 +1,62 @@
/* NeoStats - IRC Statistical Services
** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
** http://www.neostats.net/
**
** 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
**
** NetStats CVS Identification
** $Id: blsb.h 162 2005-04-28 09:45:44Z Fish $
*/
#ifndef blsb_H
#define blsb_H
#ifdef WIN32
#include "modconfigwin32.h"
#else
#include "modconfig.h"
#endif
extern Bot *blsb_bot;
struct blsb {
int akilltime;
int cachetime;
int cachehits;
int doakill;
int verbose;
int exclusions;
} blsb;
typedef struct cache_entry {
unsigned long ip;
time_t when;
} cache_entry;
/* this is a list of cached scans */
list_t *cache;
/* blsb_help.c */
extern const char *blsb_help_set_akill [];
extern const char *blsb_help_set_akilltime [];
extern const char *blsb_help_set_cachetime [];
extern const char *blsb_help_set_verbose [];
extern const char *blsb_help_set_exclusions[];
extern const char *blsb_about[];
#endif /* blsb_H */

208
blsb_help.c Normal file
View file

@ -0,0 +1,208 @@
/* NeoStats - IRC Statistical Services
** Copyright (c) 1999-2005 Adam Rutter, Justin Hammond, Mark Hetherington
** http://www.neostats.net/
**
** 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
**
** NeoStats CVS Identification
** $Id: blsb_help.c 156 2005-03-07 23:27:30Z Mark $
*/
#include "neostats.h"
const char blsb_help_status_oneline[] = "View blsb state information";
const char blsb_help_lookup_oneline[] = "Lookup DNS record";
const char blsb_help_remove_oneline[] = "Remove an akill set by blsb";
const char blsb_help_check_oneline[] = "Scan a selected user";
const char blsb_help_ports_oneline[] = "Allows you to customize the ports scanned";
const char blsb_help_set_oneline[] = "Change blsb configuration options";
const char *blsb_help_lookup[] = {
"Syntax: \2LOOKUP <ip|hostname> [type]\2",
"",
"Lookup DNS records for an ip address or hostname.",
"The default lookup is the ip address for a hostname",
"or the hostname for an ip address.",
"",
"Options for type are:",
" txt - text records",
" rp - responsible person for this record",
" ns - name servers for this record",
" soa - SOA for this record",
"",
NULL
};
const char *blsb_about[] = {
"\2Open Proxy Scanning Bot Information\2",
"",
"This service scans clients connecting to this network for",
"insecure proxies. Insecure proxies are often used to attack",
"networks or channels with clone bots. If you have a firewall,",
"or IDS software, please ignore any errors that this scan",
"may generate.",
"",
"If you have any further questions, please contact network",
"administration.",
NULL
};
const char *blsb_help_check[] = {
"Syntax: \2CHECK <nick|ip|hostname>\2",
"",
"This option will scan either a user connected to your",
"network, an IP address, or Hostname for Insecure proxies,",
"and report the status to you. If an Insecure proxy is",
"found, the host will be banned from the network",
NULL
};
const char *blsb_help_status[] = {
"Syntax: \2STATUS\2",
"",
"Display status of the open proxy scanning bot",
NULL
};
const char *blsb_help_set_doscan [] = {
"\2SCAN <ON|OFF>\2",
"Disables the proxy scan and only do a lookup in the DNS",
"blacklist to see if this host is listed as an open proxy",
NULL
};
const char *blsb_help_set_akill [] = {
"\2AKILL <ON|OFF>\2",
" ",
NULL
};
const char *blsb_help_set_targetip [] = {
"\2TARGETIP <ip>\2",
"IP address of server we try to make the proxies connect to",
NULL
};
const char *blsb_help_set_targetport [] = {
"\2TARGETPORT <port>\2",
"IRCd port number we try to make proxies connect to.",
NULL
};
const char *blsb_help_set_opmdomain [] = {
"\2OPMDOMAIN <domain>\2",
"Domain used for blacklists.",
"This setting should not be changed unless you know the",
"effects in full",
NULL
};
const char *blsb_help_set_maxbytes [] = {
"\2MAXBYTES <max>\2",
"Maximum number of bytes we receive from a proxy before disconnecting",
"This setting should not be changed unless you know the",
"effects in full",
NULL
};
const char *blsb_help_set_timeout [] = {
"\2TIMEOUT <time>\2",
"Time we wait for a proxy to respond to our servers before",
"disconnecting and assuming its not an open proxy.",
"This setting should not be changed unless you know the",
"effects in full",
NULL
};
const char *blsb_help_set_openstring [] = {
"\2OPENSTRING <string>\2",
"The string we expect to see if there is an open proxy",
"This setting should not be changed unless you know the",
"effects in full",
NULL
};
const char *blsb_help_set_scanmsg [] = {
"\2SCANMSG <msg>\2",
"Message sent to a user when we scan their hosts",
NULL
};
const char *blsb_help_set_akilltime [] = {
"\2AKILLTIME <time>\2",
"How long the user will be banned from the network for",
NULL
};
const char *blsb_help_set_cachetime [] = {
"\2CACHETIME <time>\2",
"Time (in seconds) that an entry will be cached",
NULL
};
const char *blsb_help_set_verbose [] = {
"\2VERBOSE <ON|OFF>\2",
"Whether blsb is verbose in operation or not",
NULL
};
const char *blsb_help_set_exclusions[] = {
"\2EXCLUSIONS <ON|OFF>\2",
"Use global exclusion list in addition to local exclusion list",
NULL
};
const char *blsb_help_ports[] = {
"Syntax: \2PORTS <LIST>\2",
" \2PORTS <ADD> <type> <port>\2",
" \2PORTS <DEL> <index>\2",
"",
"This command lets you view or manipulate the ports",
"and proxy types scanned when users connect to your",
"IRC network. By Default, blsb scans some default Ports",
"but you may wish to update this list with some additional",
"protocols and ports custom to your network"
"",
"\2LIST\2 will list the current ports and protocols scanned",
"and a ID number for use in removing entries.",
"",
"\2ADD\2 will add an entry of <type> running on port <port>",
"to the port list.",
"<type> can be either:",
" HTTP",
" HTTPPOST",
" SOCKS4",
" SOCKS5",
" WINGATE",
" ROUTER",
"and port can be any valid port number. The new port is scanned",
"straight away",
"",
"\2DEL\2 will delete entry <index> from the list of",
"ports. Requires a Restart of blsb to become effective. Alternatively",
"Reloading the blsb module will make this effective",
NULL
};
const char *blsb_help_remove[] = {
"Syntax: \2REMOVE <ip|hostname>\2",
"",
"Remove akills that have been set by blsb.",
"",
"<ip|hostname> is the hostname listed in your akill list",
"(usually found with /stats a)",
NULL
};

4307
configure vendored Executable file

File diff suppressed because it is too large Load diff

93
configure.in Normal file
View file

@ -0,0 +1,93 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(blsb.c)
AC_CONFIG_HEADER(modconfig.h)
PACKAGE=BLSB
MODULE_MAJOR=1
MODULE_MINOR=0
MODULE_REV=0
VERSION=$MODULE_MAJOR.$MODULE_MINOR.$MODULE_REV
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(MODULE_MAJOR, "$MODULE_MAJOR")
AC_DEFINE_UNQUOTED(MODULE_MINOR, "$MODULE_MINOR")
AC_DEFINE_UNQUOTED(MODULE_REV, "$MODULE_REV")
DIRINST=~/NeoStats3.0/
AC_PREFIX_DEFAULT(~/NeoStats3.0/)
CFLAGS="$CFLAGS -O2 -Wall -fno-strict-aliasing"
case "$host_os" in
*openbsd*)
MAKEDEPENDENCIES="";;
*freebsd*)
MAKEDEPENDENCIES="";;
*)
MAKEDEPENDENCIES="-include \$(OBJS:.o=.d)";;
esac
AC_MSG_CHECKING(Location of NeoStats...)
AC_ARG_WITH(neostats,
[ --with-neostats=DIR Location of NeoStats installation],
[DIRINST=$withval])
AC_MSG_RESULT($DIRINST)
AC_CHECK_FILE($DIRINST/include/neostats.h,
[INCLUDEDIR="$DIRINST/include/"],
[AC_MSG_ERROR(Can't find existing NeoStats Installation please supply with --with-neostats option)])
CPPFLAGS="$CPPFLAGS -I$INCLUDEDIR"
dnl Check we are running the latest supported version of NeoStats
AC_MSG_CHECKING(Version of NeoStats...)
AC_TRY_RUN(
[
#include <config.h>
#include <stdlib.h>
int main(void) {
if (MAJOR >= 3) {
if (MINOR >= 0) {
exit(0);
}
}
exit(1);
}
], ns_version_ok='yes',
ns_version_ok='no',
ns_version_ok='no')
if test "$ns_version_ok" = "yes"; then
AC_MSG_RESULT(Compatible version);
else
AC_MSG_ERROR(This module requires NeoStats 3.0.a2 or higher)
fi
dnl check if we are running with debug....
AC_MSG_CHECKING(Whether to enable debug...)
AC_ARG_ENABLE(debug,
[ --enable-debug - enable debug],
[ case "$enableval" in
yes)
CFLAGS="$CFLAGS -Wall -ggdb"
AC_DEFINE(DEBUG,1)
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_SUBST(DIRINST)
AC_SUBST(MAKEDEPENDENCIES)
AC_SUBST(CFLAGS)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_OUTPUT(Makefile)
echo "Configuration complete."
read -p "Press Enter key to read the release notes"
clear
more RELNOTES
echo "Run 'make' (or 'gmake' on some systems) to compile NeoStats."
echo "If you require support, see the README file."

251
install-sh Executable file
View file

@ -0,0 +1,251 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

110
modconfig.h.in Normal file
View file

@ -0,0 +1,110 @@
/* modconfig.h.in. Generated from configure.in by autoheader. */
/* Enable Debugging */
#undef DEBUG
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `gethostbyname2' function. */
#undef HAVE_GETHOSTBYNAME2
/* Define to 1 if you have the `inet_aton' function. */
#undef HAVE_INET_ATON
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Version number of package */
#undef MODULE_VERSION
/* Major Version */
#undef MODULE_MAJOR
/* Minor Version */
#undef MODULE_MINOR
/* Revision */
#undef MODULE_REV
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* "enable replacement (v)snprintf if system (v)snprintf is broken" */
#undef PREFER_PORTABLE_SNPRINTF
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* "have socklet_t defined?" */
#undef socklen_t

131
modconfigwin32.h Executable file
View file

@ -0,0 +1,131 @@
#ifndef _MODCONFIGWIN32_H_
#define _MODCONFIGWIN32_H_
/* modconfig.h. Generated by configure. */
/* define this to enable debug code for this module */
/* #undef DEBUG */
/* Version number of package */
#define MODULE_VERSION "3.0.a2"
/* Major Version */
#define MODULE_MAJOR "3"
/* Minor Version */
#define MODULE_MINOR "0"
/* Revision */
#define MODULE_REV "a2"
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `gethostbyname' function. */
#define HAVE_GETHOSTBYNAME 1
/* Define to 1 if you have the `gethostbyname2' function. */
/* #undef HAVE_GETHOSTBYNAME2 */
/* Define to 1 if you have the `inet_aton' function. */
/*#define HAVE_INET_ATON 1*/
/* Define to 1 if you have the `inet_pton' function. */
/* #undef HAVE_INET_PTON */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
/*#define HAVE_STRINGS_H 1*/
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/poll.h> header file. */
/*#define HAVE_SYS_POLL_H 1*/
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
/*#define HAVE_SYS_TIME_H 1*/
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
/*#define HAVE_UNISTD_H 1*/
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Name of package */
/* #undef PACKAGE */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* "enable replacement (v)snprintf if system (v)snprintf is broken" */
/* #undef PREFER_PORTABLE_SNPRINTF */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/*#define TIME_WITH_SYS_TIME 1*/
/* Version number of package */
/* #undef VERSION */
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
#ifndef POLLIN
#define snprintf _snprintf
struct pollfd { int fd; short events; short revents; };
#define POLLIN 1
#define POLLPRI 2
#define POLLOUT 4
#define POLLERR 8
#define POLLHUP 16
#define POLLNVAL 32
#endif
#endif /* _MODCONFIGWIN32_H_ */