Compare commits
111 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c5e061d9a7 | ||
![]() |
7efef9e071 | ||
![]() |
754351622b | ||
![]() |
226ec38597 | ||
![]() |
db81975189 | ||
![]() |
a74f4ab861 | ||
![]() |
68a5eee21c | ||
![]() |
07040d3e8e | ||
![]() |
ec0b7826a1 | ||
![]() |
948bd43519 | ||
![]() |
d953c64beb | ||
![]() |
9b163e40d3 | ||
![]() |
ada337cb15 | ||
![]() |
3c80b3387e | ||
![]() |
baeac4a049 | ||
![]() |
fcf56ab7aa | ||
![]() |
3afc6c2c38 | ||
![]() |
27a9de98a4 | ||
![]() |
ee4525c81f | ||
![]() |
3303c2e97c | ||
![]() |
ee1f9b244e | ||
![]() |
8881667a22 | ||
![]() |
8ebc6523d8 | ||
![]() |
4279ef08e3 | ||
![]() |
b2ce557f1e | ||
![]() |
961703999f | ||
![]() |
6b2ca3932b | ||
![]() |
be083886ad | ||
![]() |
e46a4a3244 | ||
![]() |
289cc432ae | ||
![]() |
ee8fc6413b | ||
![]() |
dd6f97d4cd | ||
![]() |
1aeaea4cb3 | ||
![]() |
e979946e35 | ||
![]() |
ac34f6f25d | ||
![]() |
a5811daaaf | ||
![]() |
3e37001a0e | ||
![]() |
52b35bd232 | ||
![]() |
10de99000e | ||
![]() |
5ba155387f | ||
![]() |
e5033c980e | ||
![]() |
665a8eac5d | ||
![]() |
7b662580c0 | ||
![]() |
637bb1bbd0 | ||
![]() |
02a1aa4e6c | ||
![]() |
b2c4d93015 | ||
![]() |
5a330e8ef6 | ||
![]() |
3cb3eb7301 | ||
![]() |
e153b22834 | ||
![]() |
87764468fc | ||
![]() |
6e891d9b6c | ||
![]() |
70042dabb9 | ||
![]() |
a3d2dffdf4 | ||
![]() |
c3d9b1c33a | ||
![]() |
4a110b5c62 | ||
![]() |
3e8c91a8c6 | ||
![]() |
3298930bbd | ||
![]() |
9d01a5cb34 | ||
![]() |
91f933d59b | ||
![]() |
ba8f680445 | ||
![]() |
e129573abb | ||
![]() |
6ddc3be499 | ||
![]() |
0eef06ff90 | ||
![]() |
5dd339fb30 | ||
![]() |
3e9422b4bb | ||
![]() |
4a51c8c854 | ||
![]() |
ffb7979246 | ||
![]() |
28e917cf89 | ||
![]() |
d43d276063 | ||
![]() |
183810fce4 | ||
![]() |
bf6b2ba1fc | ||
![]() |
7dfa0231f3 | ||
![]() |
29d9409783 | ||
![]() |
26840c23b2 | ||
![]() |
d6e17e7726 | ||
![]() |
55bff89abc | ||
![]() |
f757e6f450 | ||
![]() |
16a2ac0217 | ||
![]() |
7aabb4ede0 | ||
![]() |
cd86708d43 | ||
![]() |
1748508f2c | ||
![]() |
6220af868c | ||
![]() |
b56f950c15 | ||
![]() |
e856eb1b68 | ||
![]() |
2cb6957c40 | ||
![]() |
c27475cb94 | ||
![]() |
e4068b4eb4 | ||
![]() |
31d48531fc | ||
![]() |
816f56fbd0 | ||
![]() |
997bd647eb | ||
![]() |
781d7edae9 | ||
![]() |
c6a9ce79af | ||
![]() |
a9cf95810a | ||
![]() |
173bdd3f18 | ||
![]() |
45124e818c | ||
![]() |
810adc864d | ||
![]() |
6f6007a777 | ||
![]() |
0f4e0d7480 | ||
![]() |
95ed82e454 | ||
![]() |
a03a50d917 | ||
![]() |
0ac901bf1c | ||
![]() |
4eaf20d71a | ||
![]() |
348592da3c | ||
![]() |
4613e7f50a | ||
![]() |
b18914cc77 | ||
![]() |
8905e25960 | ||
![]() |
3d627346c8 | ||
![]() |
2ee0256b62 | ||
![]() |
b8d5e23925 | ||
![]() |
d4a0ac2624 | ||
![]() |
a1051b1882 |
43 changed files with 19552 additions and 9865 deletions
34
.gitattributes
vendored
34
.gitattributes
vendored
|
@ -1,41 +1,19 @@
|
|||
* text=auto !eol
|
||||
/ChangeLog -text
|
||||
/LICENSE -text
|
||||
/Makefile.am -text
|
||||
/Makefile.in -text
|
||||
/OPSB.xml -text
|
||||
/README.opsb -text
|
||||
/README.opsb.html -text
|
||||
/README.opsb.xml -text
|
||||
/RELNOTES -text
|
||||
/aclocal.m4 -text
|
||||
/configure -text
|
||||
/configure.in -text
|
||||
/html.css -text
|
||||
/install-sh -text
|
||||
libopm/.cvsignore -text
|
||||
libopm/LICENSE -text
|
||||
libopm/Makefile.in -text
|
||||
libopm/README -text
|
||||
libopm/compat.c -text
|
||||
libopm/compat.h -text
|
||||
libopm/config.c -text
|
||||
libopm/config.h -text
|
||||
libopm/inet.c -text
|
||||
libopm/inet.h -text
|
||||
libopm/libopm.c -text
|
||||
libopm/libopm.h -text
|
||||
libopm/list.c -text
|
||||
libopm/list.h -text
|
||||
libopm/malloc.c -text
|
||||
libopm/malloc.h -text
|
||||
libopm/opm.h -text
|
||||
libopm/opm_common.h -text
|
||||
libopm/opm_error.h -text
|
||||
libopm/opm_types.h -text
|
||||
libopm/proxy.c -text
|
||||
libopm/proxy.h -text
|
||||
libopm/test.c -text
|
||||
/modconfig.h.in -text
|
||||
/modconfigwin32.h -text
|
||||
/opsb.Settings -text
|
||||
/opsb.c -text
|
||||
/opsb.h -text
|
||||
/opsb_help.c -text
|
||||
/proxy.c -text
|
||||
/opsb.vcproj -text
|
||||
/pulse.xml -text
|
||||
|
|
37
ChangeLog
37
ChangeLog
|
@ -1,5 +1,40 @@
|
|||
Open Proxy Scanning Bot Module for NeoStats Changelog.
|
||||
==============================================================================
|
||||
3.0.b1 - Mark (M) & Fish (F) & DeadNotBuried (D)
|
||||
- Timeouts should not call DelSock (In fact nothing should!) (F)
|
||||
- fix crash on too many file descriptors open by deleting sockets correctly (D)
|
||||
- Increase max number of ports to scan (D)
|
||||
- change LIST command to LISTPORTS as LIST can't have a access level changed
|
||||
if set as a command (D)
|
||||
- fix crash on adding new port (D)
|
||||
- Fix the open_proxy crash when a user had signed off and thus we had a
|
||||
dangling pointer (F)
|
||||
- Fix make install when NeoStats is installed in a non-default location (F)
|
||||
- Fix a issue with SockRead Functions when timeouts or connection refused
|
||||
called, we return NS_FAILURE when it should be NS_SUCCESS (F)
|
||||
|
||||
3.0.a3 - Mark (M) & Fish (F)
|
||||
- AKILL support and open proxy reporting (F)
|
||||
- Get default targetip when starting up correctly (F)
|
||||
- Simplify command path. (M)
|
||||
- Fix event and command return values. (M)
|
||||
- Clean up config.h entries. (M)
|
||||
- Fix Win32 CRT calls. (M)
|
||||
- Port to new socket code. (F)
|
||||
|
||||
3.0.a2 - Mark (M)
|
||||
- Add option to use NeoStats global excludes. (M)
|
||||
- Update settings table to a2 compatible format. (M)
|
||||
- Fix segfault on msg opsb1 check ip.address.com. (M)
|
||||
- Change DISABLESCAN to SCAN. (M)
|
||||
|
||||
3.0.a1 - Mark (M)
|
||||
- Update module to use new core module exclusion support. (M)
|
||||
- Removed splittime setting which is now handled by core. (M)
|
||||
- Changes for Win32 compatibility. (M)
|
||||
- Split exempt code into seperate files. (M)
|
||||
- Port to 3.0 API (M)
|
||||
|
||||
* Version 2.3 * 25/7/2004 * Fish (F)
|
||||
- Fix a problem with "OPSB is not configured" messages
|
||||
- Make sure we are using the correct config type for serval set variables
|
||||
|
@ -70,4 +105,4 @@ Open Proxy Scanning Bot Module for NeoStats Changelog.
|
|||
- added to exclusion list who added the exclusion, and the reason
|
||||
|
||||
* Version 1.0Beta1 * 31/8/2002 * Fish
|
||||
- Initial Release
|
||||
- Initial Release
|
||||
|
|
15
Makefile.am
Normal file
15
Makefile.am
Normal file
|
@ -0,0 +1,15 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL_AMFLAGS = -I autotools
|
||||
AM_MAKEFLAGS = -s
|
||||
|
||||
pkglib_LTLIBRARIES = opsb.la
|
||||
opsb_la_SOURCES = opsb.c opsb_help.c proxy.c
|
||||
noinst_HEADERS = opsb.h
|
||||
|
||||
opsb_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
|
||||
EXTRA_DIST = autotools/ccdv.c autotools/shtool RELNOTES
|
||||
dist_doc_DATA = README.opsb README.opsb.html
|
||||
|
||||
include $(top_srcdir)/autotools/rules.mk
|
746
Makefile.in
746
Makefile.in
|
@ -1,60 +1,716 @@
|
|||
#Neostats Module Makefile!
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(am__configure_deps) $(dist_doc_DATA) $(noinst_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/modconfig.h.in $(top_srcdir)/autotools/rules.mk \
|
||||
$(top_srcdir)/configure ChangeLog autotools/compile \
|
||||
autotools/config.guess autotools/config.sub autotools/depcomp \
|
||||
autotools/install-sh autotools/ltmain.sh autotools/missing \
|
||||
autotools/mkinstalldirs install-sh
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \
|
||||
$(top_srcdir)/autotools/ax_distversion.m4 \
|
||||
$(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \
|
||||
$(top_srcdir)/autotools/ccdv.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs
|
||||
CONFIG_HEADER = modconfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(docdir)"
|
||||
pkglibLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(pkglib_LTLIBRARIES)
|
||||
opsb_la_LIBADD =
|
||||
am_opsb_la_OBJECTS = opsb.lo opsb_help.lo proxy.lo
|
||||
opsb_la_OBJECTS = $(am_opsb_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
SOURCES = $(opsb_la_SOURCES)
|
||||
DIST_SOURCES = $(opsb_la_SOURCES)
|
||||
dist_docDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(dist_doc_DATA)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
pkglibdir = $(prefix)/modules
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CCDV = @CCDV@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DIRINST = @DIRINST@
|
||||
DISTDIRVERSION = @DISTDIRVERSION@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
DIRECTORY = @DIRINST@/dl/
|
||||
INCLUDES = -I@DIRINST@/include/ -I. -Ilibopm
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USECCDV = @USECCDV@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = $(prefix)/data
|
||||
datarootdir = @datarootdir@
|
||||
docdir = $(prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
wi_PWD = @wi_PWD@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL_AMFLAGS = -I autotools
|
||||
AM_MAKEFLAGS = -s
|
||||
pkglib_LTLIBRARIES = opsb.la
|
||||
opsb_la_SOURCES = opsb.c opsb_help.c proxy.c
|
||||
noinst_HEADERS = opsb.h
|
||||
opsb_la_LDFLAGS = -module -avoid-version
|
||||
EXTRA_DIST = autotools/ccdv.c autotools/shtool RELNOTES
|
||||
dist_doc_DATA = README.opsb README.opsb.html
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
SRCS= opsb.c proxy.c opsb_help.c
|
||||
OBJS= ${SRCS:.c=.o}
|
||||
TARGET= opsb.so
|
||||
DOCS=README.opsb README.opsb.html opsb.Settings
|
||||
DISTFILES = $(SRCS) $(DOCS) modconfig.h.in configure install-sh ChangeLog Makefile.in opsb.h libopm/*.c libopm/*.h libopm/README libopm/LICENSE LICENSE libopm/*.in
|
||||
DISTDIR = @PACKAGE@-@VERSION@
|
||||
distdir = @DISTDIRVERSION@
|
||||
all: modconfig.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/autotools/rules.mk $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
all: module
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
modconfig.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
libopm.a:
|
||||
(cd libopm; $(MAKE) $@)
|
||||
|
||||
module: libopm.a $(OBJS)
|
||||
$(LD) -shared -o $(TARGET) $(LDFLAGS) $(OBJS) libopm/libopm.a
|
||||
stamp-h1: $(srcdir)/modconfig.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status modconfig.h
|
||||
$(srcdir)/modconfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
(cd libopm; $(MAKE) $@)
|
||||
/bin/rm -rf $(TARGET) *.o Makefile *.log modconfig.h
|
||||
distclean-hdr:
|
||||
-rm -f modconfig.h stamp-h1
|
||||
|
||||
install: module
|
||||
$(INSTALL) -m 644 $(TARGET) $(DIRECTORY)
|
||||
$(INSTALL) -m 644 $(DOCS) $(DIRECTORY)../doc/
|
||||
@cd $(DIRECTORY)..; \
|
||||
if ! test -f $(DIRECTORY)../kpconf/OPSB ; then ./kptool -i doc/opsb.Settings; fi
|
||||
dist:
|
||||
@echo -n "Creating Directories"
|
||||
@-rm -rf $(DISTDIR)
|
||||
@mkdir $(DISTDIR)
|
||||
@mkdir $(DISTDIR)/libopm
|
||||
@echo "Done"
|
||||
@echo -n "Copying Core Distribution Files"
|
||||
@for file in $(DISTFILES); do \
|
||||
echo -n "."; \
|
||||
cp -pr $$file $(DISTDIR)/$$file; \
|
||||
uninstall-pkglibLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
|
||||
done
|
||||
@echo "Done"
|
||||
@tar -czf $(DISTDIR).tar.gz $(DISTDIR)/*
|
||||
@echo "Tar file $(DISTDIR).tar.gz created, Freshmeat Time"
|
||||
|
||||
$(OBJS): Makefile
|
||||
clean-pkglibLTLIBRARIES:
|
||||
-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
|
||||
@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
opsb.la: $(opsb_la_OBJECTS) $(opsb_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(pkglibdir) $(opsb_la_LDFLAGS) $(opsb_la_OBJECTS) $(opsb_la_LIBADD) $(LIBS)
|
||||
|
||||
opsb.o: opsb.h opsb.c modconfig.h
|
||||
proxy.o: opsb.h proxy.c modconfig.h
|
||||
opsb_help.o: opsb.h
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opsb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opsb_help.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxy.Plo@am__quote@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
uninstall-dist_docDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(docdir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) modconfig.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) modconfig.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) modconfig.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) modconfig.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/autotools
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) modconfig.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(docdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_docDATA
|
||||
|
||||
install-exec-am: install-pkglibLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_docDATA uninstall-info-am \
|
||||
uninstall-pkglibLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-generic clean-libtool clean-pkglibLTLIBRARIES ctags dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dist_docDATA install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-pkglibLTLIBRARIES \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-dist_docDATA uninstall-info-am \
|
||||
uninstall-pkglibLTLIBRARIES
|
||||
|
||||
|
||||
.c.o:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||
|
||||
.c.lo:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
@list='ls .libs/*.so'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(pkglibdir)/$$f; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_dataDATA: $(dist_data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
|
||||
@list='$(dist_data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-dist_docDATA: $(dist_doc_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
$(CCDV) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-neoSCRIPTS: $(neo_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(neodir)" || $(mkdir_p) "$(DESTDIR)$(neodir)"
|
||||
@list='$(neo_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(neoSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(neodir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
distcleancheck:
|
||||
@:
|
||||
distuninstallcheck:
|
||||
@:
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
809
OPSB.xml
809
OPSB.xml
|
@ -1,809 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
<article>
|
||||
<title>OPSB Manual</title>
|
||||
|
||||
<para>Welcome to the Open Proxy Scanning Bot (OPSB) Manual. This document
|
||||
will aid you in setting up and running OPSB on your IRC network.</para>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>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)</para>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>By Default, OPSB scans the following protocols and ports (But this can
|
||||
be easily customized)</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>HTTP Proxies on Port 80, 3128, 8000, 8080</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>HTTP Post Proxies on Port 80, 3128, 8000, 8080</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Wingate Servers on Port 23</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Insecure Cisco Routers on port 23</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>SOCKS4 Servers on 1080</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>SOCKS5 Servers on 1080</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<warning>
|
||||
<para>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.</para>
|
||||
</warning>
|
||||
|
||||
<para>OPSB is written and maintained by Justin Hammond. It requires the
|
||||
NeoStats software. More information about OPSB, or NeoStats, can be found at
|
||||
<link linkend="???">http://www.neostats.net/</link></para>
|
||||
|
||||
<para>OPSB is Copyright, 2004 by Justin Hammond.</para>
|
||||
|
||||
<sect1>
|
||||
<title>Prerequisites and Installation.</title>
|
||||
|
||||
<para>OPSB is designed to run on Top of NeoStats. The Following
|
||||
requirements at the time of writting are required for NeoStats:<itemizedlist><listitem><para>A
|
||||
Linux or BSD based Server or Shell.</para></listitem><listitem><para>A
|
||||
supported IRCd. Currently, Hybrid7, Unreal, Ultimate2.x, Ultimate3.x,
|
||||
NeoIRCd, Bahumat</para></listitem><listitem><para>Some basic Unix
|
||||
administration Skill</para></listitem><listitem><para>Of Course, a IRC
|
||||
network to connect it all together.</para></listitem></itemizedlist></para>
|
||||
|
||||
<para>Please refer to the NeoStats website for more information on the
|
||||
requirements</para>
|
||||
|
||||
<para>OPSB itself requires the following:<itemizedlist><listitem><para>NeoStats
|
||||
2.5.8 or Higher correctly installed and Running</para></listitem><listitem><para>The
|
||||
time to read this entire document. <warning><para>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.</para></warning></para></listitem></itemizedlist></para>
|
||||
|
||||
<sect2>
|
||||
<title>Compiling and Installation</title>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<screen>bash$<command> tar -xzf OPSB-<ver>.tar.gz</command></screen>
|
||||
|
||||
<para>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:<screen>bash$<command>./configure [--enable-debug | --with-neostats=<dir>]</command></screen></para>
|
||||
|
||||
<para>--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</para>
|
||||
|
||||
<para>--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)</para>
|
||||
|
||||
<para>Configuring OPSB will look something like the following screen:</para>
|
||||
|
||||
<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) |)
|
||||
(*----------------------------------------------------------*)
|
||||
</screen>
|
||||
|
||||
<para>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):</para>
|
||||
|
||||
<screen>[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/libopm.a
|
||||
[1005|/home/fish/opsb]
|
||||
[Fish@fish-dt]$</screen>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<screen>[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/libopm.a
|
||||
/usr/bin/install -c -m 644 opsb.so /home/fish/NeoStats//dl/
|
||||
/usr/bin/install -c -m 644 README.opsb opsb.Settings /home/fish/NeoStats//dl/../doc/
|
||||
[1006|/home/fish/opsb]</screen>
|
||||
|
||||
<para>If you recieve *ANY* errors at all during the this process, please
|
||||
post them on our Support boards, at http//www.neostats.net/boards/</para>
|
||||
|
||||
<para>Once Installation is complete, you can either configure NeoStats
|
||||
to load OPSB when it starts, or load OPSB via IRC.</para>
|
||||
|
||||
<para>To Configure NeoStats to automatically load OPSB when it boots,
|
||||
add the following line to your "neostats.cfg" file in the
|
||||
NeoStats directory:</para>
|
||||
|
||||
<para><command>LOAD_MODULE OPSB</command></para>
|
||||
|
||||
<para>To load OPSB via IRC, you must make sure you have the appropriate
|
||||
permissions and issue the following command:</para>
|
||||
|
||||
<para><command>/msg neostats load OPSB</command></para>
|
||||
|
||||
<para>Thats it. OPSB is now loaded and ready for use (in fact, it will
|
||||
already be running now, but read on for futher information.</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Basic Configuration</title>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Exclusion Lists - You should setup a Exclude list for your IRC
|
||||
Services server (NickServ etc)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Target IP address and Ports that OPSB tries to get the proxies
|
||||
to connect to.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Default Ban Time when OPSB finds a open Proxy.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>These are outlined below:</para>
|
||||
|
||||
<sect2>
|
||||
<title>Exclusion Lists</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<caution>
|
||||
<para>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.</para>
|
||||
</caution>
|
||||
|
||||
<para><emphasis role="bold">Adding a Entry</emphasis></para>
|
||||
|
||||
<para>To add a entry to the Exclusion list, use the following format:</para>
|
||||
|
||||
<screen>/msg OPSB exclude add <1/0> <type> <reason></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><host> = The HostName/Server or Channel name. WildCards ?
|
||||
and * are permitted.</para>
|
||||
|
||||
<para><type> = The type of exclusion. 0 is for HostNames, 1 is
|
||||
for Servers</para>
|
||||
|
||||
<para><reason> = a short description of the exclusion, for
|
||||
operator reference only.</para>
|
||||
|
||||
<para>The output is as follows:</para>
|
||||
|
||||
<screen>>OPSB< exclude add services.irc-chat.net 1 Blah is my reason
|
||||
-OPSB- Added services.irc-chat.net (Server) exception to list</screen>
|
||||
|
||||
<para><emphasis role="bold">Listing an Entry</emphasis></para>
|
||||
|
||||
<para>To list the Exclusions simple type:</para>
|
||||
|
||||
<screen>/msg OPSB exclude list</screen>
|
||||
|
||||
<para>And all the current exclusions are listed. Additionaly, a Position
|
||||
number is provided for use with the delete command. The output is as
|
||||
follows:</para>
|
||||
|
||||
<screen>>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.</screen>
|
||||
|
||||
<para><emphasis role="bold">Deleting an Entry</emphasis></para>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<screen>/msg OPSB exclude del <num></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><num> is the position of the entry you wish to delete in
|
||||
the list</para>
|
||||
|
||||
<para>The output of the command is as follows:</para>
|
||||
|
||||
<screen>>OPSB< exclude del 1
|
||||
-OPSB- Deleted services.irc-chat.net server out of exception list</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>TARGET IP and TARGET PORT</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para><emphasis role="bold">Changing the TargetIP</emphasis></para>
|
||||
|
||||
<para>To add a entry to the Helper list, use the following format:</para>
|
||||
|
||||
<screen>/msg OPSB set targetip <newipaddress></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><newipaddress> = The ip address to attempt to get proxies
|
||||
to connect to</para>
|
||||
|
||||
<para>The output is as follows:</para>
|
||||
|
||||
<screen> -> *opsb* set targetip 203.208.228.144
|
||||
=opsb= Target IP set to 203.208.228.144</screen>
|
||||
|
||||
<para><emphasis role="bold">Changing the Target Port</emphasis></para>
|
||||
|
||||
<para>To list the helpers simple type:</para>
|
||||
|
||||
<screen>/msg OPSB set targetport <newport></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><newport> = the new port to attempt to get proxies to
|
||||
connect to</para>
|
||||
|
||||
<para>The output is as follows:</para>
|
||||
|
||||
<screen> -> *opsb* set targetport 6667
|
||||
=opsb= Target PORT set to 6667</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>BanTime</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para><emphasis role="bold">Changing the Ban Time</emphasis></para>
|
||||
|
||||
<para>To change the bantime, type:</para>
|
||||
|
||||
<screen> -> *opsb* set bantime 86400
|
||||
=opsb= Ban time changed to 86400</screen>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Detailed Configuration</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>The following list summaries the available Options you can set in
|
||||
OPSB</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>CACHETIME</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>DISABLESCAN</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>DOBAN</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>OPMDOMAIN</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>MAXBYTES</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>TIMEOUT</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>OPENSTRING</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>SPLITTIME</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>SCANMSG</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>PORTS</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>To change any of these settings, you use the Set Interface in OPSB.
|
||||
Eg:</para>
|
||||
|
||||
<screen>/msg OPSB set <option> <params></screen>
|
||||
|
||||
<para>To view the current settings, issue the following command:</para>
|
||||
|
||||
<screen>/msg OPSB set list</screen>
|
||||
|
||||
<para>The following Sections describes the different options, their
|
||||
params, and the effect on OPSB in detail.</para>
|
||||
|
||||
<sect2>
|
||||
<title>CACHETIME Setting</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>To Change the setting, issue the following Command:</para>
|
||||
|
||||
<screen>/msg OPSB set CACHETIME <seconds> </screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>DISABLESCAN Setting</title>
|
||||
|
||||
<para>Sometimes a IRC administrator may wish to only make use of the
|
||||
Open Proxy list lookup, and not actually perform a scan on users.
|
||||
DISABLESCAN forces OPSB to only perform a lookup of the IP address in
|
||||
the configured OPMDOMAIN.</para>
|
||||
|
||||
<para>If you wish to turn off Proxy checks, issue the following command</para>
|
||||
|
||||
<screen>/msg OPSB set DISABLESCAN <ON/OFF></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>DOBAN Setting</title>
|
||||
|
||||
<para>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 DOBAN off disables the placement
|
||||
of a AKILL on open Proxy hosts.</para>
|
||||
|
||||
<para>To Change the setting, issue the following Command:</para>
|
||||
|
||||
<screen>/msg OPSB set DOBAN <ON/OFF> </screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>OPMDOMAIN Setting</title>
|
||||
|
||||
<para>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</para>
|
||||
|
||||
<para>To Change this Setting, issue the following Command:</para>
|
||||
|
||||
<screen>/msg OPSB set OPMDOMAIN <newdomain></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>MAXBYTES Setting</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>To Change this Setting, issue the following Command:</para>
|
||||
|
||||
<screen>/msg OPSB set MAXBYTES <bytelimit></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>TIMEOUT</title>
|
||||
|
||||
<para>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</para>
|
||||
|
||||
<para>To Change this setting, issue the following command:</para>
|
||||
|
||||
<screen>/msg OPSB set TIMEOUT <seconds></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>OPENSTRING</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>To Change this setting, issue the following command:</para>
|
||||
|
||||
<screen>/msg OPSB set OPENSTRING <newstring></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>SPLITTIME</title>
|
||||
|
||||
<para>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</para>
|
||||
|
||||
<para>To Change this setting, issue the following command:</para>
|
||||
|
||||
<screen>/msg OPSB set SPLITTIME <seconds></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>SCANMSG Setting</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>To Change the setting, issue the following Command:</para>
|
||||
|
||||
<screen>/msg OPSB set SCANMSG <msg> </screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>PORTS Setting</title>
|
||||
|
||||
<para>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. </para>
|
||||
|
||||
<sect3>
|
||||
<title>Listing Ports/Protocols</title>
|
||||
|
||||
<para>To list the current protocols and the assocated ports, issue the
|
||||
following command:</para>
|
||||
|
||||
<screen>/msg OPSB ports list</screen>
|
||||
|
||||
<para>And the following is displayed:</para>
|
||||
|
||||
<screen>>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.</screen>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Adding Ports</title>
|
||||
|
||||
<para>To add a additional port to scan with a particular protocol, use
|
||||
the following command:</para>
|
||||
|
||||
<screen>/msg opsb ports add <type> <port></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><type> is the type of Protocol to use. Either:</para>
|
||||
|
||||
<para>HTTP</para>
|
||||
|
||||
<para>HTTPPOST</para>
|
||||
|
||||
<para>SOCKS4</para>
|
||||
|
||||
<para>SOCKS5</para>
|
||||
|
||||
<para>WINGATE</para>
|
||||
|
||||
<para>ROUTER</para>
|
||||
|
||||
<para><port> is any valid port number between 1 and 65535</para>
|
||||
|
||||
<para>The change is imediate, and new users will have these ports
|
||||
scanned when they connect. </para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Deleting Ports</title>
|
||||
|
||||
<para>If you wish to delete a port to be scanned, issue the following
|
||||
command:</para>
|
||||
|
||||
<screen>/msg opsb ports del <id></screen>
|
||||
|
||||
<para>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. </para>
|
||||
|
||||
<para>OPSB requires a restart when deleting a port, so you should
|
||||
either restart NeoStats, or Reload the OPSB module. </para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Operational Commands</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>The following list summerizes these commands:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>LOOKUP</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>INFO</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>CHECK</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>STATUS</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>REMOVE</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>The following Sections Describe these commands in detail</para>
|
||||
|
||||
<sect2>
|
||||
<title>LOOKUP Command</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg OPSB lookup <ip|hostname> <flag></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><ip|hostname> is the item you wish to lookup.</para>
|
||||
|
||||
<para><flag> is optional, and specified what type of data you
|
||||
wish to lookup. Available options include:</para>
|
||||
|
||||
<para>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</para>
|
||||
|
||||
<para>If no flag is given, we attempt to lookup the A record.</para>
|
||||
|
||||
<para>The output of the command is as follows:</para>
|
||||
|
||||
<screen> -> *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</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>INFO Command</title>
|
||||
|
||||
<para>This command provides users with information about what functions
|
||||
OPSB performs. Its intended to just provide directions to users for more
|
||||
information</para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg OPSB info</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>CHECK Command</title>
|
||||
|
||||
<para>This command forces OPSB to perform a full scan on the specified
|
||||
nickname, ip adress or hostname.</para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg OPSB check <nick|host></screen>
|
||||
|
||||
<para>The output is as follows:</para>
|
||||
|
||||
<screen>=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</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>STATUS Command</title>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen> -> *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):</screen>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</article>
|
24
README.opsb
24
README.opsb
|
@ -15,8 +15,8 @@ OPSB Manual
|
|||
3. Detailed Configuration
|
||||
|
||||
3.1. CACHETIME Setting
|
||||
3.2. DISABLESCAN Setting
|
||||
3.3. DOBAN Setting
|
||||
3.2. SCAN Setting
|
||||
3.3. AKILL Setting
|
||||
3.4. OPMDOMAIN Setting
|
||||
3.5. MAXBYTES Setting
|
||||
3.6. TIMEOUT
|
||||
|
@ -372,8 +372,8 @@ Caution
|
|||
|
||||
Changing the Ban Time
|
||||
|
||||
To change the bantime, type:
|
||||
-> *opsb* set bantime 86400
|
||||
To change the akilltime, type:
|
||||
-> *opsb* set akilltime 86400
|
||||
=opsb= Ban time changed to 86400
|
||||
|
||||
3. Detailed Configuration
|
||||
|
@ -389,8 +389,8 @@ Caution
|
|||
|
||||
The following list summaries the available Options you can set in OPSB
|
||||
* CACHETIME
|
||||
* DISABLESCAN
|
||||
* DOBAN
|
||||
* SCAN
|
||||
* AKILL
|
||||
* OPMDOMAIN
|
||||
* MAXBYTES
|
||||
* TIMEOUT
|
||||
|
@ -424,25 +424,25 @@ Caution
|
|||
To Change the setting, issue the following Command:
|
||||
/msg OPSB set CACHETIME <seconds>
|
||||
|
||||
3.2. DISABLESCAN Setting
|
||||
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.
|
||||
DISABLESCAN forces OPSB to only perform a lookup of the IP address in
|
||||
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 DISABLESCAN <ON/OFF>
|
||||
/msg OPSB set SCAN <ON/OFF>
|
||||
|
||||
3.3. DOBAN Setting
|
||||
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 DOBAN off disables the
|
||||
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 DOBAN <ON/OFF>
|
||||
/msg OPSB set AKILL <ON/OFF>
|
||||
|
||||
3.4. OPMDOMAIN Setting
|
||||
|
||||
|
|
155
README.opsb.html
155
README.opsb.html
File diff suppressed because one or more lines are too long
629
README.opsb.xml
Normal file
629
README.opsb.xml
Normal file
|
@ -0,0 +1,629 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
<article>
|
||||
<title>ModuleName 3.0 Manual</title>
|
||||
|
||||
<para>Welcome to the ModuleName Manual. This document will aid you in
|
||||
setting up and running ModuleName on your IRC network.</para>
|
||||
|
||||
<para><add module introduction></para>
|
||||
|
||||
<para>ModuleName is Copyright, 2006 by Justin Hammond.</para>
|
||||
|
||||
<sect1>
|
||||
<title>Prerequisites and Installation.</title>
|
||||
|
||||
<para>ModuleName is designed to run on Top of NeoStats. The Following
|
||||
requirements at the time of writing are required for
|
||||
NeoStats:<itemizedlist>
|
||||
<listitem>
|
||||
<para>A Linux or BSD based Server or Shell.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>A IRCd supported by NeoStats. See the <link
|
||||
linkend="???">NeoStats</link> website.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Some basic Unix administration Skill</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Of Course, a IRC network to connect it all together.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para>Please refer to the NeoStats website for more information on the
|
||||
requirements</para>
|
||||
|
||||
<para>ModuleName itself requires the following:<itemizedlist>
|
||||
<listitem>
|
||||
<para>NeoStats 3.0 or Higher correctly installed and Running</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The time to read this entire document. </para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<sect2>
|
||||
<title>Compiling and Installation</title>
|
||||
|
||||
<para>As long as you have successfully setup NeoStats, and installed it
|
||||
correctly, Compiling ModuleName is very simple and straight forward.
|
||||
First you must extract the files from the download package. This is as
|
||||
simple as:</para>
|
||||
|
||||
<screen>bash$<command> tar -xzf ModuleName-<ver>.tar.gz</command></screen>
|
||||
|
||||
<para>This should then create a directory called
|
||||
ModuleName-<version> where <version> is the Version of
|
||||
ModuleName. Then Proceed to Change into the ModuleName directory, and
|
||||
run Configure as follows:<screen>bash$<command>./configure [--enable-debug | --with-neostats=<dir>]</command></screen></para>
|
||||
|
||||
<para>--enable-debug is only useful for diagnostics purposes when used
|
||||
in conjunction with debugging tools. There should be no need to use this
|
||||
option on a day to day basis</para>
|
||||
|
||||
<para>--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)</para>
|
||||
|
||||
<para>Configuring ModuleName will look something like the following
|
||||
screen:</para>
|
||||
|
||||
<screen>Fishs-Mac:~/Documents/Dev/ModuleName justin$ ./configure
|
||||
checking whether to enable maintainer-specific portions of Makefiles... no
|
||||
checking for a BSD-compatible install... /usr/bin/install -c
|
||||
checking whether build environment is sane... yes
|
||||
checking for gawk... no
|
||||
checking for mawk... no
|
||||
checking for nawk... no
|
||||
|
||||
<snip>
|
||||
|
||||
checking To Enable AutoTools Debug Mode?... no
|
||||
checking silent building of source files... Enabled
|
||||
configure: creating ./config.status
|
||||
config.status: creating Makefile
|
||||
config.status: creating modconfig.h
|
||||
config.status: modconfig.h is unchanged
|
||||
config.status: executing depfiles commands
|
||||
Configuration complete.
|
||||
Press Enter key to read the release notes</screen>
|
||||
|
||||
<para>The Configure process will then prompt you to read the release
|
||||
notes. You are encouraged to read this document throughly as it might
|
||||
contain important information about the current version of ModuleName
|
||||
that isn't covered in the manual.</para>
|
||||
|
||||
<para>If the configuration did not produce a error, you may then move
|
||||
onto Compiling ModuleName. Compiling is simply just issuing the "make"
|
||||
command (or "gmake" if you are running BSD):</para>
|
||||
|
||||
<screen>Fishs-Mac:~/Documents/Dev/ModuleName justin$ make
|
||||
make -s all-am
|
||||
Compiling Helpers.c: [OK]
|
||||
Compiling ModuleName.c: [OK]
|
||||
Compiling scan.c: [OK]
|
||||
Compiling OnJoinBot.c: [OK]
|
||||
Compiling ModuleName_help.c: [OK]
|
||||
Compiling update.c: [OK] </screen>
|
||||
|
||||
<para>Again, check for Error messages. As long as there are not error
|
||||
messages, "make install" will install ModuleName, this README file, and
|
||||
any auxiliary files needed into your NeoStats directory:</para>
|
||||
|
||||
<screen>Fishs-Mac:~/Documents/Dev/ModuleName justin$ make install
|
||||
Installing ModuleName.so: [OK]
|
||||
Installing viri.dat: [OK]
|
||||
Installing README.ModuleName: [OK]
|
||||
Installing README.ModuleName.html: [OK] </screen>
|
||||
|
||||
<para>If you receive *ANY* errors at all during the this process, please
|
||||
post them on our Support boards, at
|
||||
http//www.neostats.net/boards/</para>
|
||||
|
||||
<para>Once Installation is complete, you can either configure NeoStats
|
||||
to load ModuleName when it starts, or load ModuleName via IRC.</para>
|
||||
|
||||
<para>To Configure NeoStats to automatically load ModuleName when it
|
||||
boots, modify the neostats.conf file and add ModuleName to the list of
|
||||
modules to load:</para>
|
||||
|
||||
<screen>MODULENAME = {
|
||||
"statserv",
|
||||
"hostserv",
|
||||
"ModuleName",
|
||||
} </screen>
|
||||
|
||||
<para>To load ModuleName via IRC, you must make sure you have the
|
||||
appropriate permissions and issue the following command:</para>
|
||||
|
||||
<para><command>/msg neostats load ModuleName</command></para>
|
||||
|
||||
<para>Thats it. ModuleName is now loaded and ready for use (in fact, it
|
||||
will already be running now, but read on for further
|
||||
information.)</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Basic Configuration</title>
|
||||
|
||||
<para>ModuleName is completely configured online via IRC. When you first
|
||||
start up ModuleName, it attempts some "Sane" defaults for you get started
|
||||
with, but you should always review these settings as soon as you install.
|
||||
There are a few important settings you may want to review right away. They
|
||||
are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>blah blah</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>blah blah</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>blah blah</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>These are outlined below:</para>
|
||||
|
||||
<sect2>
|
||||
<title>Blah Blah</title>
|
||||
|
||||
<para>Blah Blah</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Blah Blah</title>
|
||||
|
||||
<para>BLAH BLAH</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Detailed Configuration</title>
|
||||
|
||||
<para>ModuleName 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
|
||||
ModuleName that affect how it operates, how it responds and even, how
|
||||
affects the performance of NeoStats Overall. Out of the box, ModuleName
|
||||
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 ModuleName operates.</para>
|
||||
|
||||
<para>The following list summaries the available options you can set in
|
||||
ModuleName</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>NICK</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>ALTNICK</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>USER</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>HOST</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>REALNAME</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>EXCLUSIONS</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>BLAHBLAH</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>To change any of these settings, you use the Set Interface in
|
||||
ModuleName. Eg:</para>
|
||||
|
||||
<screen>/msg ModuleName set <option> <params></screen>
|
||||
|
||||
<para>To view the current settings, issue the following command:</para>
|
||||
|
||||
<screen>/msg ModuleName set list</screen>
|
||||
|
||||
<para>The following Sections describes the different options, their
|
||||
params, and the effect on ModuleName in detail.</para>
|
||||
|
||||
<sect2>
|
||||
<title>NICK Setting</title>
|
||||
|
||||
<para>This setting allows you to change the Nickname that ModuleName
|
||||
uses when it connects to your network. If you change this setting make
|
||||
sure you update your NeoNet account, otherwise you might loose access to
|
||||
the Secure IRC-Chat site if we perform a check on your network and can't
|
||||
find "ModuleName" running.</para>
|
||||
|
||||
<warning>
|
||||
<para>This option requires you to reload ModuleName or restart
|
||||
NeoStats to take effect.</para>
|
||||
</warning>
|
||||
|
||||
<screen>/msg ModuleName set NICK <nickname></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>ALTNICK Setting</title>
|
||||
|
||||
<para>This setting allows you to set a "Backup" nickname used for
|
||||
ModuleName. If the primary Nickname in the NICK Setting is not
|
||||
available, ModuleName will use this nickname, and if that is not
|
||||
available, it will use a automatically generated nickname</para>
|
||||
|
||||
<warning>
|
||||
<para>This option requires you to reload ModuleName or restart
|
||||
NeoStats to take effect</para>
|
||||
</warning>
|
||||
|
||||
<screen>/msg ModuleName set ALTNICK <nickname></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>USER Setting</title>
|
||||
|
||||
<para>This option allows you to customize the "user" or ident portion of
|
||||
the ModuleName Bot. </para>
|
||||
|
||||
<warning>
|
||||
<para>This option requires you to reload ModuleName or restart
|
||||
NeoStats to take effect</para>
|
||||
</warning>
|
||||
|
||||
<screen>/msg ModuleName set USER <user></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>HOST Setting</title>
|
||||
|
||||
<para>This option allows you to customize the Hostname that ModuleName
|
||||
uses when it signs onto your Network. It defaults to the Standard
|
||||
Hostname specified in your NeoStats configuration.</para>
|
||||
|
||||
<warning>
|
||||
<para>This option requires you to reload ModuleName or restart
|
||||
NeoStats to take effect</para>
|
||||
</warning>
|
||||
|
||||
<screen>/msg ModuleName set HOST <host></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>REALNAME Setting</title>
|
||||
|
||||
<para>This option allows you to customize the realname (or Gecos) that
|
||||
ModuleName uses when it signs onto your Network. </para>
|
||||
|
||||
<warning>
|
||||
<para>This option requires you to reload ModuleName or restart
|
||||
NeoStats to take effect</para>
|
||||
</warning>
|
||||
|
||||
<screen>/msg ModuleName set REALNAME <realname></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>EXCLUSIONS Setting</title>
|
||||
|
||||
<para>This option enables ModuleName to use the Global Exclusions list
|
||||
that is control by the main NeoStats bot. This allows you to maintain a
|
||||
"global" exclusion list that is applicable to all modules in NeoStats,
|
||||
and then only apply individual exclusions to ModuleName. </para>
|
||||
|
||||
<warning>
|
||||
<para>This option only becomes effective on new users joining your
|
||||
Network. Existing users that are already connected when you enable
|
||||
this option will not be rescanned for exclusions, as the Global
|
||||
Exclusions are only effected when a new user signs onto the Network.
|
||||
In order to make the global exclusions list effective straight away,
|
||||
you should restart NeoStats.</para>
|
||||
</warning>
|
||||
|
||||
<para>If you wish to enable or disable the Global Exclusions lists,
|
||||
issue the following command</para>
|
||||
|
||||
<screen>/msg ModuleName set EXCLUSIONS <ON/OFF></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>BLAH Blah Setting</title>
|
||||
|
||||
<para>blah blah description</para>
|
||||
|
||||
<para>To Change the setting, issue the following Command:</para>
|
||||
|
||||
<screen>/msg ModuleName set blahblah <blah> </screen>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Operational Commands</title>
|
||||
|
||||
<para>ModuleName 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 ModuleName
|
||||
upto date.</para>
|
||||
|
||||
<para>The following list summarizes these commands:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>HELP</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>VERSION</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>ABOUT</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>CREDITS</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>LEVELS</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>SET</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>EXCLUDE</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>BLAHBLAH</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>The following Sections Describe these commands in detail</para>
|
||||
|
||||
<sect2>
|
||||
<title>HELP Command</title>
|
||||
|
||||
<para>The help command allows the users to access the online help for
|
||||
the different commands available. You can get general help about the
|
||||
available commands, or can access more specific information about a
|
||||
command.</para>
|
||||
|
||||
<para>To see the help pages, use the following format:</para>
|
||||
|
||||
<screen>/msg ModuleName help [command]
|
||||
</screen>
|
||||
|
||||
<para>command is optional and only required if you want more specific
|
||||
information about a particular command</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>VERSION Command</title>
|
||||
|
||||
<para>This command displays the Version of ModuleName, and the dat
|
||||
files. </para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg ModuleName version
|
||||
</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>ABOUT Command</title>
|
||||
|
||||
<para>The about command shows a brief description of the Bot and its
|
||||
purpose.</para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg ModuleName about
|
||||
</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>CREDITS Command</title>
|
||||
|
||||
<para>The credits command shows details about the authors or
|
||||
contributors of to the Module</para>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg ModuleName credits
|
||||
</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>LEVELS Command</title>
|
||||
|
||||
<para>The levels command allows you to adjust the security of each
|
||||
command available in this module. You can make certian commands only
|
||||
available to higher "level" users in NeoStats. </para>
|
||||
|
||||
<para>For more information about NeoStats Levels and Security, please
|
||||
consult the NeoStats Manual</para>
|
||||
|
||||
<para>To list the currently configured levels, issue the following
|
||||
command:</para>
|
||||
|
||||
<screen>/msg ModuleName levels list
|
||||
</screen>
|
||||
|
||||
<para>To change the minimum level required to execute a command, issue
|
||||
the following command:</para>
|
||||
|
||||
<screen>/msg ModuleName levels <command> <level></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para>command = is the actual command name you wish to modify</para>
|
||||
|
||||
<para>level = a number between 0 and 200 that specifies the new
|
||||
level.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>SET Command</title>
|
||||
|
||||
<para>The set command allows you to modify settings applicable to this
|
||||
module. For a complete description of the available set options, please
|
||||
consult the Detailed Configuration Section of this manual.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>EXCLUDE Command</title>
|
||||
|
||||
<para>Exclusion lists allow you to specify certain Hostmasks, Servers,
|
||||
or Channels that should be excluded from monitoring by ModuleName. This
|
||||
exclusion list would allow a administrator to say, allow users on that
|
||||
are matched against Trojans, when the administrator has verified that
|
||||
the Trojan does not in fact exist on the users host.</para>
|
||||
|
||||
<caution>
|
||||
<para>Exclusions should be setup for your Services Server, so that
|
||||
ModuleName does not try to scan ChanServ, or NickServ, or any of the
|
||||
bots relating to Nickname protection.</para>
|
||||
</caution>
|
||||
|
||||
<para>With NeoStats 3.0, you should also be aware that there are two
|
||||
types of Exclusion Lists. There are "Global" exclusion lists that all
|
||||
modules may optionally use, and there is module specific exclusion
|
||||
lists. ModuleName defaults to not using the Global Exclusion lists. You
|
||||
can enable it by the following command:<screen>/msg ModuleName set exclusions on</screen></para>
|
||||
|
||||
<para><emphasis role="bold">Adding a Entry</emphasis></para>
|
||||
|
||||
<para>To add a entry to the Exclusion list, use the following
|
||||
format:</para>
|
||||
|
||||
<screen>/msg ModuleName exclude add <host/Server/Channel/UserHost> <pattern> <reason></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><Host/Server/Channel/UserHost> = The type of exclusion you
|
||||
are adding. The different types are:<itemizedlist>
|
||||
<listitem>
|
||||
<para>Host - The Users real (Internet) Hostname</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Server - The Users server they are connecting to. You should
|
||||
ensure you add a exclusion for your Services Server</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Channel - A specific channel on your IRC Network</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>UserHost - The users Virtual Hostname (IRC)</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para><pattern> = The pattern you wish to match on. May include
|
||||
wildcard charactors such as * and ?</para>
|
||||
|
||||
<para><reason> = a short description of the exclusion, for
|
||||
operator reference only.</para>
|
||||
|
||||
<para>The output is as follows:</para>
|
||||
|
||||
<screen>[13:20] -ModuleName- Added *.blah.com (userhost) to exclusion list
|
||||
[13:20] ModuleName Fish added *.blah.com (userhost) to the exclusion list</screen>
|
||||
|
||||
<para><emphasis role="bold">Listing an Entry</emphasis></para>
|
||||
|
||||
<para>To list the Exclusions simple type:</para>
|
||||
|
||||
<screen>/msg ModuleName exclude list</screen>
|
||||
|
||||
<para>And all the current exclusions are listed. Additionally, a
|
||||
Position number is provided for use with the delete command. The output
|
||||
is as follows:</para>
|
||||
|
||||
<screen>[13:21] -ModuleName- Exclusion list:
|
||||
[13:21] -ModuleName- #bothouse (Channel) Added by Fish on Sat Aug 13 2005 01:20 AM SGT for Requested
|
||||
[13:21] -ModuleName- #ircop (Channel) Added by Fish on Sat Aug 13 2005 07:40 PM SGT for IRCop channel
|
||||
[13:21] -ModuleName- *irc-chat.net (Host) Added by Fish on Tue Aug 09 2005 10:13 PM SGT for Services Exclusion
|
||||
[13:21] -ModuleName- chieftess!*@* (Userhost) Added by Fish on Tue Aug 09 2005 10:14 PM SGT for buggy client
|
||||
[13:21] -ModuleName- *.blah.com (Userhost) Added by Fish on Sun Jan 15 2006 01:20 PM SGT for Cause Blah.com is cool
|
||||
[13:21] -ModuleName- End of list.</screen>
|
||||
|
||||
<para><emphasis role="bold">Deleting an Entry</emphasis></para>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<screen>/msg ModuleName exclude del <pattern></screen>
|
||||
|
||||
<para>Where:</para>
|
||||
|
||||
<para><pattern> is the pattern of the entry you wish to delete in
|
||||
the list</para>
|
||||
|
||||
<para>The output of the command is as follows:</para>
|
||||
|
||||
<screen>[13:22] ModuleName Fish used EXCLUDE
|
||||
[13:22] -ModuleName- *.blah.com delete from exclusion list</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>BLAHBLAH Command</title>
|
||||
|
||||
<para>That command forces ModuleName to check the Dat File version at
|
||||
<link linkend="???">http://secure.irc-chat.net/</link> and download the
|
||||
latest version if required.</para>
|
||||
|
||||
<warning>
|
||||
<para>Repeated use of this command in a short period of time will
|
||||
result in your account at secure.irc-chat.net being suspended for
|
||||
abuse. Use with CARE</para>
|
||||
</warning>
|
||||
|
||||
<para>The format of the command is as follows:</para>
|
||||
|
||||
<screen>/msg ModuleName update</screen>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Optional Chapter</title>
|
||||
|
||||
<para>use this to write any optional information etc etc etc</para>
|
||||
|
||||
<sect2>
|
||||
<title>Optional Sub Heading</title>
|
||||
|
||||
<para>Subheading</para>
|
||||
|
||||
<sect3>
|
||||
<title>Minor heading</title>
|
||||
|
||||
<para>minor heading</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</article>
|
28
RELNOTES
Executable file
28
RELNOTES
Executable file
|
@ -0,0 +1,28 @@
|
|||
* OPSB * Version 3.0.a3
|
||||
==============================================================================
|
||||
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 and data files for previous 3.0 alpha versions may not be compatible
|
||||
with this version. You should delete all files with "gdbm" 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 at present
|
7366
aclocal.m4
vendored
7366
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
159
configure.in
159
configure.in
|
@ -1,90 +1,53 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(opsb.c)
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
AC_CONFIG_HEADER(modconfig.h)
|
||||
PACKAGE=OPSB
|
||||
MODULE_MAJOR=2
|
||||
MODULE_MINOR=3
|
||||
VERSION=$MODULE_MAJOR.$MODULE_MINOR
|
||||
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION", "Module Version")
|
||||
AC_DEFINE_UNQUOTED(MODULE_MAJOR, "$MODULE_MAJOR", "Major Version")
|
||||
AC_DEFINE_UNQUOTED(MODULE_MINOR, "$MODULE_MINOR", "Minor Version" )
|
||||
DIRINST=~/NeoStats/
|
||||
AC_PREFIX_DEFAULT(~/NeoStats/)
|
||||
CFLAGS="$CFLAGS -O2 -Wall"
|
||||
AM_MAINTAINER_MODE
|
||||
MODPACKAGE=OPSB
|
||||
MODULE_MAJOR=3
|
||||
MODULE_MINOR=0
|
||||
MODULE_REV=a4
|
||||
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 -g"
|
||||
LIBS="$LIBS -g"
|
||||
AM_INIT_AUTOMAKE($MODPACKAGE, $VERSION)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
ETR_SOCKET_NSL
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
|
||||
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
TYPE_SOCKLEN_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_FUNC_SNPRINTF
|
||||
|
||||
dnl if they want select() or they don't have poll() then we need to check
|
||||
dnl that we actually have select()
|
||||
if test "$have_sys_poll_h" = "no"; then
|
||||
AC_CHECK_FUNCS(select, have_select=yes, have_select=no)
|
||||
if test "$have_select" = "no"; then
|
||||
AC_MSG_ERROR([No select() implementation found])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(inet_aton inet_pton)
|
||||
|
||||
dnl Check if we can use gethostbyname2 for ipv6
|
||||
AC_CHECK_FUNCS(gethostbyname gethostbyname2)
|
||||
|
||||
dnl AIX fun
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Solaris has to be weird doesn't it...
|
||||
AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket]))
|
||||
AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl]))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AC_DISABLE_STATIC
|
||||
CARES_CLEAR_LIBTOOL_TAGS
|
||||
AC_PROG_LIBTOOL
|
||||
wi_ARG_DISABLE_CCDV
|
||||
wi_PROG_CCDV
|
||||
|
||||
AC_MSG_CHECKING(Location of NeoStats...)
|
||||
AC_ARG_WITH(neostats,
|
||||
[ --with-neostats=DIR Location of NeoStats installation],
|
||||
AC_ARG_WITH(neostats,
|
||||
[ --with-neostats=DIR Location of NeoStats installation],
|
||||
[DIRINST=$withval])
|
||||
AC_MSG_RESULT($DIRINST)
|
||||
|
||||
|
||||
AC_CHECK_FILE($DIRINST/include/dl.h,
|
||||
[INCLUDEDIR="$DIRINST/include/"],
|
||||
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 >= 2) {
|
||||
if (MINOR >= 5) {
|
||||
if (REV >= 17) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
if (MAJOR >= 3) {
|
||||
if (MINOR >= 0) {
|
||||
exit(0)
|
||||
; }
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
@ -92,23 +55,21 @@ int main(void) {
|
|||
ns_version_ok='no',
|
||||
ns_version_ok='no')
|
||||
if test "$ns_version_ok" = "yes"; then
|
||||
AC_MSG_RESULT(Compatible Version);
|
||||
AC_MSG_RESULT(Compatible version);
|
||||
prefix=$DIRINST
|
||||
else
|
||||
AC_MSG_ERROR(This Module requires NeoStats 2.5.8 or Higher)
|
||||
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 Debuging...)
|
||||
dnl check if we are running with debug....
|
||||
AC_MSG_CHECKING(Whether to enable debug...)
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug - Enable Debuging],
|
||||
[ --enable-debug - enable debug],
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
CFLAGS="$CFLAGS -ggdb"
|
||||
AC_DEFINE(DEBUG,1, Enable Debugging)
|
||||
AC_MSG_RESULT(yes - Watch your Log Files)
|
||||
CFLAGS="$CFLAGS -Wall -ggdb"
|
||||
AC_DEFINE(DEBUG,1)
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
|
@ -117,24 +78,32 @@ AC_ARG_ENABLE(debug,
|
|||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(To Enable AutoTools Debug Mode?)
|
||||
AC_ARG_ENABLE(autodebug, [ --enable-autodebug - Enable AutoTools Debug],
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
AX_MAINTAINER_MODE_AUTO_SILENT
|
||||
;;
|
||||
esac],
|
||||
AC_MSG_RESULT(no)
|
||||
AX_MAINTAINER_MODE_AUTO_SILENT
|
||||
)
|
||||
|
||||
AX_DISTVERSION
|
||||
|
||||
AC_SUBST(DIRINST)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(PACKAGE)
|
||||
AC_SUBST(VERSION)
|
||||
AC_OUTPUT(Makefile libopm/Makefile)
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| Important Instructions |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| Now that configure is complete, type 'make' to compile |)"
|
||||
echo "(| the module. When the compile has completed, type |)"
|
||||
echo "(| 'make install' to install the module. |)"
|
||||
echo "(| For BSD you might need to use 'gmake' and 'gmake install'|)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| For Support please visit: |)"
|
||||
echo "(| IRC: /server irc.irc-chat.org |)"
|
||||
echo "(| #neostats channel |)"
|
||||
echo "(| WWW: http://www.neostats.net/boards/ |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(|This Module was written by: |)"
|
||||
echo "(| fish (fish@dynam.ac) |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
AC_SUBST(CCDV)
|
||||
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."
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
*.sw[op]
|
||||
Makefile
|
||||
*.lo
|
||||
*.la
|
||||
setup.h
|
||||
stamp-h*
|
||||
.deps
|
||||
.libs
|
||||
test
|
||||
test_debug
|
339
libopm/LICENSE
339
libopm/LICENSE
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, 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
|
||||
|
||||
Appendix: 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., 675 Mass Ave, Cambridge, MA 02139, 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.
|
|
@ -1,45 +0,0 @@
|
|||
#Neostats Module Makefile!
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
DIRECTORY = @DIRINST@/dl/
|
||||
INCLUDES = -I. -I..
|
||||
|
||||
SRCS= compat.c config.c inet.c libopm.c list.c malloc.c proxy.c
|
||||
OBJS= ${SRCS:.c=.o}
|
||||
|
||||
TARGET= libopm.a
|
||||
DOCS=
|
||||
|
||||
all: libopm.a
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
|
||||
libopm.a: $(OBJS)
|
||||
ar cru $(TARGET) ${OBJS}
|
||||
ranlib $(TARGET)
|
||||
|
||||
clean:
|
||||
/bin/rm -rf $(TARGET) *.o Makefile
|
||||
|
||||
install:
|
||||
|
||||
dist:
|
||||
|
||||
$(OBJS): Makefile
|
||||
compat.o: compat.c ../modconfig.h compat.h opm.h opm_common.h
|
||||
config.o: config.c ../modconfig.h malloc.h config.h libopm.h inet.h \
|
||||
opm_common.h opm.h opm_error.h opm_types.h list.h
|
||||
inet.o: inet.c ../modconfig.h inet.h opm.h opm_common.h
|
||||
libopm.o: libopm.c ../modconfig.h config.h libopm.h inet.h opm_common.h \
|
||||
opm.h malloc.h opm_error.h opm_types.h list.h proxy.h
|
||||
list.o: list.c ../modconfig.h opm_common.h list.h malloc.h opm.h
|
||||
malloc.o: malloc.c ../modconfig.h malloc.h opm.h opm_common.h
|
||||
proxy.o: proxy.c ../modconfig.h inet.h compat.h config.h libopm.h \
|
||||
opm_common.h opm.h proxy.h opm_types.h opm_error.h
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
This is libopm, a open proxy detection library written by Erik Fears and the
|
||||
Blitzed team. (www.blitzed.org, strtok@blitzed.org)
|
||||
More information about this library can be found at www.blitzed.org (This
|
||||
library powers BOPM, blitzed version of the open proxy monitoring library.)
|
||||
|
||||
There are a few modifications to this library to enable it to plug in
|
||||
cleaning to OPSB, but the majority of credit must be given to them.
|
||||
|
||||
If your interested in using this library in your software, checked out the
|
||||
blitzed webpages for more informationa and documentation.
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Andy Smith
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#include "compat.h"
|
||||
#include "opm.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
/*
|
||||
* An implementation of inet_aton for those systems that don't have it
|
||||
* (Solaris, ...)
|
||||
*/
|
||||
int libopm_inet_aton(const char *cp, struct in_addr *inp)
|
||||
{
|
||||
unsigned int a1, a2, a3, a4;
|
||||
unsigned long ret;
|
||||
|
||||
if (strcmp(cp, "255.255.255.255") == 0) {
|
||||
inp->s_addr = (unsigned) -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sscanf(cp, "%u.%u.%u.%u", &a1, &a2, &a3, &a4) != 4 ||
|
||||
a1 > 255 || a2 > 255 || a3 > 255 || a4 > 255) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
|
||||
|
||||
inp->s_addr = htonl(ret);
|
||||
|
||||
if (inp->s_addr == (unsigned) -1) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef COMPAT_H
|
||||
#define COMPAT_H
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
#undef inet_aton
|
||||
#define inet_aton libopm_inet_aton
|
||||
extern int libopm_inet_aton(const char *cp, struct in_addr *inp);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#undef snprintf
|
||||
#define snprintf ircsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#undef vsnprintf
|
||||
#define vsnprintf ircvsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
#undef inet_pton
|
||||
#define inet_pton libopm_inet_pton
|
||||
#endif
|
||||
|
||||
#endif
|
264
libopm/config.c
264
libopm/config.c
|
@ -1,264 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#include "malloc.h"
|
||||
#include "config.h"
|
||||
#include "inet.h"
|
||||
#include "opm_error.h"
|
||||
#include "opm_types.h"
|
||||
#include "opm_common.h"
|
||||
#include "list.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static OPM_CONFIG_HASH_T HASH[] = {
|
||||
{OPM_CONFIG_FD_LIMIT, OPM_TYPE_INT},
|
||||
{OPM_CONFIG_BIND_IP , OPM_TYPE_ADDRESS},
|
||||
{OPM_CONFIG_DNSBL_HOST, OPM_TYPE_STRING},
|
||||
{OPM_CONFIG_TARGET_STRING, OPM_TYPE_STRINGLIST},
|
||||
{OPM_CONFIG_SCAN_IP, OPM_TYPE_STRING},
|
||||
{OPM_CONFIG_SCAN_PORT, OPM_TYPE_INT},
|
||||
{OPM_CONFIG_MAX_READ, OPM_TYPE_INT},
|
||||
{OPM_CONFIG_TIMEOUT, OPM_TYPE_INT},
|
||||
};
|
||||
|
||||
|
||||
/* config_create
|
||||
*
|
||||
* Create an OPM_CONFIG_T struct, set default values and return it
|
||||
*
|
||||
* Parameters:
|
||||
* None;
|
||||
*
|
||||
* Return:
|
||||
* Pointer to allocated OPM_CONFIG_T struct
|
||||
*/
|
||||
|
||||
OPM_CONFIG_T *libopm_config_create()
|
||||
{
|
||||
int num, i;
|
||||
OPM_CONFIG_T *ret;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
ret = MyMalloc(sizeof(OPM_CONFIG_T));
|
||||
ret->vars = MyMalloc(sizeof(void *) * num);
|
||||
|
||||
|
||||
/* Set default config items. This in the future would be much better
|
||||
if it could set realistic defaults for each individual config item.
|
||||
|
||||
OPM_TYPE_INT = 0
|
||||
OPM_TYPE_STRING = ""
|
||||
OPM_TYPE_ADDRESS = 0.0.0.0
|
||||
OPM_TYPE_STRINGLIST = empty list
|
||||
*/
|
||||
|
||||
for(i = 0; i < num; i++)
|
||||
{
|
||||
switch(libopm_config_gettype(i))
|
||||
{
|
||||
case OPM_TYPE_INT:
|
||||
ret->vars[i] = MyMalloc(sizeof(int));
|
||||
*(int *) ret->vars[i] = 0;
|
||||
break;
|
||||
|
||||
case OPM_TYPE_STRING:
|
||||
(char *) ret->vars[i] = strdup("");
|
||||
break;
|
||||
|
||||
case OPM_TYPE_ADDRESS:
|
||||
(opm_sockaddr *) ret->vars[i] = MyMalloc(sizeof(opm_sockaddr));
|
||||
memset((opm_sockaddr *) ret->vars[i], 0, sizeof(opm_sockaddr));
|
||||
break;
|
||||
|
||||
case OPM_TYPE_STRINGLIST:
|
||||
(OPM_LIST_T *) ret->vars[i] = libopm_list_create();
|
||||
break;
|
||||
default:
|
||||
ret->vars[i] = NULL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* config_free
|
||||
*
|
||||
* Free config structure and clean up
|
||||
*
|
||||
* Parameters:
|
||||
* config: Structure to free/cleanup
|
||||
*
|
||||
* Return:
|
||||
* None
|
||||
*/
|
||||
|
||||
void libopm_config_free(OPM_CONFIG_T *config)
|
||||
{
|
||||
int num, i;
|
||||
OPM_NODE_T *p, *next;
|
||||
OPM_LIST_T *list;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
for(i = 0; i < num; i++)
|
||||
{
|
||||
if(config->vars[i] == NULL)
|
||||
continue;
|
||||
|
||||
switch(libopm_config_gettype(i))
|
||||
{
|
||||
case OPM_TYPE_STRINGLIST:
|
||||
list = (OPM_LIST_T *) config->vars[i];
|
||||
LIST_FOREACH_SAFE(p, next, list->head)
|
||||
{
|
||||
MyFree(p->data);
|
||||
MyFree(p);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MyFree(config->vars[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MyFree(config->vars);
|
||||
MyFree(config);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* config_set
|
||||
*
|
||||
* Set configuration options on config struct.
|
||||
*
|
||||
* Parameters:
|
||||
* config: Config struct to set parameters on
|
||||
* key: Variable within the struct to set
|
||||
* value: Address of value to set
|
||||
*
|
||||
* Return:
|
||||
* 1: Variable was set
|
||||
* 0: Some error occured
|
||||
*/
|
||||
|
||||
OPM_ERR_T libopm_config_set(OPM_CONFIG_T *config, int key, void *value)
|
||||
{
|
||||
|
||||
int num;
|
||||
OPM_NODE_T *node;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
if(key < 0 || key >= num)
|
||||
return OPM_ERR_BADKEY; /* Return appropriate error code eventually */
|
||||
|
||||
switch(libopm_config_gettype(key))
|
||||
{
|
||||
case OPM_TYPE_STRING:
|
||||
if((char *) config->vars[key] != NULL)
|
||||
MyFree(config->vars[key]);
|
||||
(char *) config->vars[key] = strdup((char *) value);
|
||||
break;
|
||||
|
||||
case OPM_TYPE_INT:
|
||||
*(int *) config->vars[key] = *(int *) value;
|
||||
break;
|
||||
|
||||
case OPM_TYPE_ADDRESS:
|
||||
if( inet_pton(AF_INET, (char *) value, &( ((opm_sockaddr *)config->vars[key])->sa4.sin_addr))
|
||||
<= 0)
|
||||
return OPM_ERR_BADVALUE; /* return appropriate err code */
|
||||
break;
|
||||
|
||||
case OPM_TYPE_STRINGLIST:
|
||||
node = libopm_node_create(strdup((char *) value));
|
||||
libopm_list_add((OPM_LIST_T *) config->vars[key], node);
|
||||
break;
|
||||
|
||||
default:
|
||||
return OPM_ERR_BADKEY; /* return appropriate err code */
|
||||
|
||||
}
|
||||
|
||||
return OPM_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* config_gettype
|
||||
*
|
||||
* Get type of key.
|
||||
*
|
||||
* Parameters:
|
||||
* key: Key to get type of.
|
||||
*
|
||||
* Return:
|
||||
* TYPE_? of key
|
||||
*/
|
||||
|
||||
int libopm_config_gettype(int key)
|
||||
{
|
||||
int num, i;
|
||||
|
||||
num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
|
||||
|
||||
for(i = 0; i < num; i++)
|
||||
if(HASH[i].key == key)
|
||||
return HASH[i].type;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* config
|
||||
*
|
||||
* Retrieve a specific config variable from
|
||||
* an OPM_CONFIG_T struct. This is basically a
|
||||
* wrapper to extracting the variable from the
|
||||
* array.
|
||||
*
|
||||
* Parameters:
|
||||
* config: Config struct to extract from
|
||||
* key: Value to extract
|
||||
*
|
||||
* Return:
|
||||
* -ADDRESS- to extracted value in array. This address
|
||||
* will have to be cast on the return end to be any use.
|
||||
*/
|
||||
|
||||
void *libopm_config(OPM_CONFIG_T *config, int key)
|
||||
{
|
||||
return config->vars[key];
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "libopm.h"
|
||||
|
||||
typedef struct _opm_config_hash OPM_CONFIG_HASH_T;
|
||||
|
||||
struct _opm_config_hash {
|
||||
int key;
|
||||
int type;
|
||||
};
|
||||
|
||||
void libopm_config_free(OPM_CONFIG_T *);
|
||||
void *libopm_config(OPM_CONFIG_T *, int);
|
||||
int libopm_config_gettype(int);
|
||||
OPM_CONFIG_T *libopm_config_create(void);
|
||||
OPM_ERR_T libopm_config_set(OPM_CONFIG_T *, int , void *);
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
534
libopm/inet.c
534
libopm/inet.c
|
@ -1,534 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2002 by the past and present ircd coders, and others.
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is borrowed from ircd-hybrid version 7
|
||||
* -TimeMr14C
|
||||
*/
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#if STDC_HEADERS
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include "inet.h"
|
||||
#include "opm.h"
|
||||
|
||||
#ifndef INADDRSZ
|
||||
#define INADDRSZ 4
|
||||
#endif
|
||||
|
||||
#ifdef IPV6
|
||||
#ifndef IN6ADDRSZ
|
||||
#define IN6ADDRSZ 16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef INT16SZ
|
||||
#define INT16SZ 2
|
||||
#endif
|
||||
|
||||
#ifdef IPV6
|
||||
#define HOSTIPLEN 53
|
||||
#else
|
||||
#define HOSTIPLEN 15
|
||||
#endif
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
extern const unsigned char ToLowerTab[];
|
||||
#define ToLower(c) (ToLowerTab[(unsigned char)(c)])
|
||||
|
||||
/*
|
||||
* From: Thomas Helvey <tomh@inxpress.net>
|
||||
*/
|
||||
#if 0
|
||||
static const char *IpQuadTab[] = {
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
||||
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
|
||||
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29",
|
||||
"30", "31", "32", "33", "34", "35", "36", "37", "38", "39",
|
||||
"40", "41", "42", "43", "44", "45", "46", "47", "48", "49",
|
||||
"50", "51", "52", "53", "54", "55", "56", "57", "58", "59",
|
||||
"60", "61", "62", "63", "64", "65", "66", "67", "68", "69",
|
||||
"70", "71", "72", "73", "74", "75", "76", "77", "78", "79",
|
||||
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89",
|
||||
"90", "91", "92", "93", "94", "95", "96", "97", "98", "99",
|
||||
"100", "101", "102", "103", "104", "105", "106", "107", "108", "109",
|
||||
"110", "111", "112", "113", "114", "115", "116", "117", "118", "119",
|
||||
"120", "121", "122", "123", "124", "125", "126", "127", "128", "129",
|
||||
"130", "131", "132", "133", "134", "135", "136", "137", "138", "139",
|
||||
"140", "141", "142", "143", "144", "145", "146", "147", "148", "149",
|
||||
"150", "151", "152", "153", "154", "155", "156", "157", "158", "159",
|
||||
"160", "161", "162", "163", "164", "165", "166", "167", "168", "169",
|
||||
"170", "171", "172", "173", "174", "175", "176", "177", "178", "179",
|
||||
"180", "181", "182", "183", "184", "185", "186", "187", "188", "189",
|
||||
"190", "191", "192", "193", "194", "195", "196", "197", "198", "199",
|
||||
"200", "201", "202", "203", "204", "205", "206", "207", "208", "209",
|
||||
"210", "211", "212", "213", "214", "215", "216", "217", "218", "219",
|
||||
"220", "221", "222", "223", "224", "225", "226", "227", "228", "229",
|
||||
"230", "231", "232", "233", "234", "235", "236", "237", "238", "239",
|
||||
"240", "241", "242", "243", "244", "245", "246", "247", "248", "249",
|
||||
"250", "251", "252", "253", "254", "255"
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* inetntoa - in_addr to string
|
||||
* changed name to remove collision possibility and
|
||||
* so behaviour is guaranteed to take a pointer arg.
|
||||
* -avalon 23/11/92
|
||||
* inet_ntoa -- returned the dotted notation of a given
|
||||
* internet number
|
||||
* argv 11/90).
|
||||
* inet_ntoa -- its broken on some Ultrix/Dynix too. -avalon
|
||||
*
|
||||
* XXX - Again not used anywhere?
|
||||
* -grifferz
|
||||
*/
|
||||
|
||||
#if 0
|
||||
static char *inetntoa(char *in)
|
||||
{
|
||||
static char buf[16];
|
||||
register char *bufptr = buf;
|
||||
register const unsigned char *a = (const unsigned char *) in;
|
||||
register const char *n;
|
||||
|
||||
n = IpQuadTab[*a++];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr++ = '.';
|
||||
n = IpQuadTab[*a++];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr++ = '.';
|
||||
n = IpQuadTab[*a++];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr++ = '.';
|
||||
n = IpQuadTab[*a];
|
||||
while (*n)
|
||||
*bufptr++ = *n++;
|
||||
*bufptr = '\0';
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
*/
|
||||
|
||||
/*
|
||||
* XXX - this does not seem to be used anywhere currently.
|
||||
* -grifferz
|
||||
*/
|
||||
#if 0
|
||||
static const char *inet_ntop4(const u_char *src, char *dst, unsigned int size);
|
||||
#endif
|
||||
|
||||
#ifdef IPV6
|
||||
static const char *inet_ntop6(const u_char *src, char *dst, unsigned int size);
|
||||
#endif
|
||||
|
||||
/* const char *
|
||||
* inet_ntop4(src, dst, size)
|
||||
* format an IPv4 address
|
||||
* return:
|
||||
* `dst' (as a const)
|
||||
* notes:
|
||||
* (1) uses no statics
|
||||
* (2) takes a u_char* not an in_addr as input
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*
|
||||
* XXX - this does not seem to be used anywhere currently.
|
||||
* -grifferz
|
||||
*/
|
||||
#if 0
|
||||
static const char *inet_ntop4(const unsigned char *src, char *dst, unsigned int size)
|
||||
{
|
||||
if (size < 15)
|
||||
return NULL;
|
||||
return strcpy(dst, inetntoa((char *) src));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* const char *
|
||||
* inet_ntop6(src, dst, size)
|
||||
* convert IPv6 binary address into presentation (printable) format
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
#ifdef IPV6
|
||||
static const char *inet_ntop6(const unsigned char *src, char *dst, unsigned int size)
|
||||
{
|
||||
/*
|
||||
* Note that int32_t and int16_t need only be "at least" large enough
|
||||
* to contain a value of the specified size. On some systems, like
|
||||
* Crays, there is no such thing as an integer variable with 16 bits.
|
||||
* Keep this in mind if you think this function should have been coded
|
||||
* to use pointer overlays. All the world's not a VAX.
|
||||
*/
|
||||
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
|
||||
struct {
|
||||
int base, len;
|
||||
} best, cur;
|
||||
u_int words[IN6ADDRSZ / INT16SZ];
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Preprocess:
|
||||
* Copy the input (bytewise) array into a wordwise array.
|
||||
* Find the longest run of 0x00's in src[] for :: shorthanding.
|
||||
*/
|
||||
memset(words, '\0', sizeof words);
|
||||
for (i = 0; i < IN6ADDRSZ; i += 2)
|
||||
words[i / 2] = (src[i] << 8) | src[i + 1];
|
||||
best.base = -1;
|
||||
cur.base = -1;
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
if (words[i] == 0) {
|
||||
if (cur.base == -1)
|
||||
cur.base = i, cur.len = 1;
|
||||
else
|
||||
cur.len++;
|
||||
} else {
|
||||
if (cur.base != -1) {
|
||||
if (best.base == -1 || cur.len > best.len)
|
||||
best = cur;
|
||||
cur.base = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cur.base != -1) {
|
||||
if (best.base == -1 || cur.len > best.len)
|
||||
best = cur;
|
||||
}
|
||||
if (best.base != -1 && best.len < 2)
|
||||
best.base = -1;
|
||||
|
||||
/*
|
||||
* Format the result.
|
||||
*/
|
||||
tp = tmp;
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
/* Are we inside the best run of 0x00's? */
|
||||
if (best.base != -1 && i >= best.base && i < (best.base + best.len)) {
|
||||
if (i == best.base)
|
||||
*tp++ = ':';
|
||||
continue;
|
||||
}
|
||||
/* Are we following an initial run of 0x00s or any real hex? */
|
||||
if (i != 0)
|
||||
*tp++ = ':';
|
||||
/* Is this address an encapsulated IPv4? */
|
||||
if (i == 6 && best.base == 0 && (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
|
||||
if (!inet_ntop4(src + 12, tp, sizeof tmp - (tp - tmp)))
|
||||
return (NULL);
|
||||
tp += strlen(tp);
|
||||
break;
|
||||
}
|
||||
tp += sprintf(tp, "%x", words[i]);
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
|
||||
*tp++ = ':';
|
||||
|
||||
*tp++ = '\0';
|
||||
|
||||
/*
|
||||
* Check for overflow, copy, and we're done.
|
||||
*/
|
||||
|
||||
if ((tp - tmp) > size) {
|
||||
return (NULL);
|
||||
}
|
||||
return strcpy(dst, tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* This code doesn't seem to be used anywhere currently?
|
||||
* -grifferz
|
||||
*/
|
||||
|
||||
/* char *
|
||||
* inetntop(af, src, dst, size)
|
||||
* convert a network format address to presentation format.
|
||||
* return:
|
||||
* pointer to presentation format address (`dst'), or NULL (see errno).
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
const char *inetntop(int af, const void *src, char *dst, unsigned int size)
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_ntop4(src, dst, size));
|
||||
#ifdef IPV6
|
||||
case AF_INET6:
|
||||
if (IN6_IS_ADDR_V4MAPPED((const struct in6_addr *) src) ||
|
||||
IN6_IS_ADDR_V4COMPAT((const struct in6_addr *) src))
|
||||
return (inet_ntop4
|
||||
((unsigned char *) &((struct in6_addr *) src)->s6_addr[12], dst, size));
|
||||
else
|
||||
return (inet_ntop6(src, dst, size));
|
||||
|
||||
#endif
|
||||
default:
|
||||
return (NULL);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
*/
|
||||
|
||||
/* int
|
||||
* inet_pton(af, src, dst)
|
||||
* convert from presentation format (which usually means ASCII printable)
|
||||
* to network format (which is usually some kind of binary format).
|
||||
* return:
|
||||
* 1 if the address was valid for the specified address family
|
||||
* 0 if the address wasn't valid (`dst' is untouched in this case)
|
||||
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
|
||||
/* int
|
||||
* inet_pton4(src, dst)
|
||||
* like inet_aton() but without all the hexadecimal and shorthand.
|
||||
* return:
|
||||
* 1 if `src' is a valid dotted quad, else 0.
|
||||
* notice:
|
||||
* does not touch `dst' unless it's returning 1.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
|
||||
static int inet_pton4(src, dst)
|
||||
const char *src;
|
||||
unsigned char *dst;
|
||||
{
|
||||
int saw_digit, octets, ch;
|
||||
unsigned char tmp[INADDRSZ], *tp;
|
||||
|
||||
saw_digit = 0;
|
||||
octets = 0;
|
||||
*(tp = tmp) = 0;
|
||||
while ((ch = *src++) != '\0') {
|
||||
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
unsigned int new = *tp * 10 + (ch - '0');
|
||||
|
||||
if (new > 255)
|
||||
return (0);
|
||||
*tp = new;
|
||||
if (!saw_digit) {
|
||||
if (++octets > 4)
|
||||
return (0);
|
||||
saw_digit = 1;
|
||||
}
|
||||
} else if (ch == '.' && saw_digit) {
|
||||
if (octets == 4)
|
||||
return (0);
|
||||
*++tp = 0;
|
||||
saw_digit = 0;
|
||||
} else
|
||||
return (0);
|
||||
}
|
||||
if (octets < 4)
|
||||
return (0);
|
||||
memcpy(dst, tmp, INADDRSZ);
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifdef IPV6
|
||||
/* int
|
||||
* inet_pton6(src, dst)
|
||||
* convert presentation level address to network order binary form.
|
||||
* return:
|
||||
* 1 if `src' is a valid [RFC1884 2.2] address, else 0.
|
||||
* notice:
|
||||
* (1) does not touch `dst' unless it's returning 1.
|
||||
* (2) :: in a full address is silently ignored.
|
||||
* credit:
|
||||
* inspired by Mark Andrews.
|
||||
* author:
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
|
||||
static int inet_pton6(src, dst)
|
||||
const char *src;
|
||||
unsigned char *dst;
|
||||
{
|
||||
static const char xdigits[] = "0123456789abcdef";
|
||||
unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
|
||||
const char *curtok;
|
||||
int ch, saw_xdigit;
|
||||
unsigned int val;
|
||||
|
||||
tp = memset(tmp, '\0', IN6ADDRSZ);
|
||||
endp = tp + IN6ADDRSZ;
|
||||
colonp = NULL;
|
||||
/* Leading :: requires some special handling. */
|
||||
if (*src == ':')
|
||||
if (*++src != ':')
|
||||
return (0);
|
||||
curtok = src;
|
||||
saw_xdigit = 0;
|
||||
val = 0;
|
||||
while ((ch = ToLower(*src++)) != '\0') {
|
||||
const char *pch;
|
||||
|
||||
pch = strchr(xdigits, ch);
|
||||
if (pch != NULL) {
|
||||
val <<= 4;
|
||||
val |= (pch - xdigits);
|
||||
if (val > 0xffff)
|
||||
return (0);
|
||||
saw_xdigit = 1;
|
||||
continue;
|
||||
}
|
||||
if (ch == ':') {
|
||||
curtok = src;
|
||||
if (!saw_xdigit) {
|
||||
if (colonp)
|
||||
return (0);
|
||||
colonp = tp;
|
||||
continue;
|
||||
} else if (*src == '\0') {
|
||||
return (0);
|
||||
}
|
||||
if (tp + INT16SZ > endp)
|
||||
return (0);
|
||||
*tp++ = (unsigned char) (val >> 8) & 0xff;
|
||||
*tp++ = (unsigned char) val & 0xff;
|
||||
saw_xdigit = 0;
|
||||
val = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*src != '\0' && ch == '.') {
|
||||
if (((tp + INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0) {
|
||||
tp += INADDRSZ;
|
||||
saw_xdigit = 0;
|
||||
break; /* '\0' was seen by inet_pton4(). */
|
||||
}
|
||||
} else
|
||||
continue;
|
||||
return (0);
|
||||
}
|
||||
if (saw_xdigit) {
|
||||
if (tp + INT16SZ > endp)
|
||||
return (0);
|
||||
*tp++ = (unsigned char) (val >> 8) & 0xff;
|
||||
*tp++ = (unsigned char) val & 0xff;
|
||||
}
|
||||
if (colonp != NULL) {
|
||||
/*
|
||||
* Since some memmove()'s erroneously fail to handle
|
||||
* overlapping regions, we'll do the shift by hand.
|
||||
*/
|
||||
const int n = tp - colonp;
|
||||
int i;
|
||||
|
||||
if (tp == endp)
|
||||
return (0);
|
||||
for (i = 1; i <= n; i++) {
|
||||
endp[-i] = colonp[n - i];
|
||||
colonp[n - i] = 0;
|
||||
}
|
||||
tp = endp;
|
||||
}
|
||||
if (tp != endp)
|
||||
return (0);
|
||||
memcpy(dst, tmp, IN6ADDRSZ);
|
||||
return (1);
|
||||
}
|
||||
#endif /* IPv6 */
|
||||
|
||||
int inet_pton(af, src, dst)
|
||||
int af;
|
||||
const char *src;
|
||||
void *dst;
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_pton4(src, dst));
|
||||
#ifdef IPV6
|
||||
case AF_INET6:
|
||||
/* Somebody might have passed as an IPv4 address this is sick but it works */
|
||||
if (inet_pton4(src, dst)) {
|
||||
char tmp[HOSTIPLEN];
|
||||
sprintf(tmp, "::ffff:%s", src);
|
||||
return (inet_pton6(tmp, dst));
|
||||
} else
|
||||
return (inet_pton6(src, dst));
|
||||
#endif /* IPv6 */
|
||||
default:
|
||||
return (-1);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,40 +0,0 @@
|
|||
#ifndef INET_H
|
||||
#define INET_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET6
|
||||
# define AF_INET6 10
|
||||
#endif
|
||||
|
||||
typedef struct _opm_sockaddr opm_sockaddr;
|
||||
typedef struct _opm_inaddr opm_inaddr;
|
||||
|
||||
struct _opm_sockaddr {
|
||||
struct sockaddr_in sa4;
|
||||
};
|
||||
|
||||
struct _opm_inaddr {
|
||||
struct in_addr in4;
|
||||
};
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
extern int inet_pton(int, const char *, void *);
|
||||
#endif
|
||||
extern const char *inetntop(int, const void *, char *, unsigned int);
|
||||
extern struct hostent *opm_gethostbyname(const char *);
|
||||
|
||||
|
||||
#endif /* INET_H */
|
1542
libopm/libopm.c
1542
libopm/libopm.c
File diff suppressed because it is too large
Load diff
|
@ -1,58 +0,0 @@
|
|||
#ifndef LIBOPM_H
|
||||
#define LIBOPM_H
|
||||
|
||||
#include "config.h"
|
||||
#include "inet.h"
|
||||
#include "opm_common.h"
|
||||
#include "opm.h"
|
||||
|
||||
#define CBLEN 5 /* Number of callback functions */
|
||||
#define READBUFLEN 128 /* Size of conn->readbuf */
|
||||
#define SENDBUFLEN 512 /* Size of sendbuffer in proxy.c */
|
||||
|
||||
typedef struct _OPM_SCAN OPM_SCAN_T;
|
||||
typedef struct _OPM_CONNECTION OPM_CONNECTION_T;
|
||||
typedef struct _OPM_PROTOCOL_CONFIG OPM_PROTOCOL_CONFIG_T;
|
||||
typedef struct _OPM_PROTOCOL OPM_PROTOCOL_T;
|
||||
|
||||
/* Types of hard coded proxy READ/WRITE functions which are
|
||||
setup in a table in libopm.c */
|
||||
|
||||
typedef int OPM_PROXYWRITE_T (OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
typedef int OPM_PROXYREAD_T (OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
|
||||
struct _OPM_SCAN {
|
||||
opm_sockaddr addr; /* Address in byte order of remote client */
|
||||
OPM_REMOTE_T *remote; /* Pointed to the OPM_REMOTE_T for this scan, passed by client */
|
||||
OPM_LIST_T *connections; /* List of individual connections of this scan (1 for each protocol) */
|
||||
};
|
||||
|
||||
struct _OPM_CONNECTION {
|
||||
|
||||
OPM_PROTOCOL_T *protocol; /* Pointer to specific protocol this connection handles */
|
||||
unsigned short int port; /* Some protocols have multiple ports, eg. HTTP */
|
||||
|
||||
int fd; /* Allocated file descriptor, 0 if not yet allocated */
|
||||
unsigned short int bytes_read; /* Bytes read so far in this connection */
|
||||
char readbuf[READBUFLEN + 1]; /* 128 byte read buffer, anything over 128 is probably not of use */
|
||||
unsigned short int readlen; /* Length of readbuf */
|
||||
unsigned short int state; /* State of connection */
|
||||
time_t creation; /* When this connection was established */
|
||||
};
|
||||
|
||||
struct _OPM_PROTOCOL_CONFIG
|
||||
{
|
||||
OPM_PROTOCOL_T *type; /* Protocol type */
|
||||
unsigned short int port; /* Port to connect on */
|
||||
|
||||
};
|
||||
|
||||
struct _OPM_PROTOCOL
|
||||
{
|
||||
int type; /* Protocol type */
|
||||
|
||||
OPM_PROXYWRITE_T *write_function; /* Write function handler for this protocol */
|
||||
OPM_PROXYREAD_T *read_function; /* Read function handler for this protocol */
|
||||
};
|
||||
|
||||
#endif /* LIBOPM_H */
|
119
libopm/list.c
119
libopm/list.c
|
@ -1,119 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#include "opm_common.h"
|
||||
#include "list.h"
|
||||
#include "malloc.h"
|
||||
#include "opm.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
OPM_NODE_T *libopm_node_create(void *data)
|
||||
{
|
||||
OPM_NODE_T *node = MyMalloc(sizeof *node);
|
||||
node->next = NULL;
|
||||
node->prev = NULL;
|
||||
node->data = (void *) data;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
OPM_LIST_T *libopm_list_create()
|
||||
{
|
||||
OPM_LIST_T *list = MyMalloc(sizeof *list);
|
||||
|
||||
list->head = NULL;
|
||||
list->tail = NULL;
|
||||
|
||||
list->elements = 0;
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
OPM_NODE_T *libopm_list_add(OPM_LIST_T *list, OPM_NODE_T *node)
|
||||
{
|
||||
|
||||
if(list == NULL || node == NULL)
|
||||
return NULL;
|
||||
|
||||
if(list->tail == NULL)
|
||||
{
|
||||
list->head = node;
|
||||
list->tail = node;
|
||||
|
||||
node->next = NULL;
|
||||
node->prev = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
node->prev = list->tail;
|
||||
list->tail->next = node;
|
||||
list->tail = node;
|
||||
node->next = NULL;
|
||||
}
|
||||
|
||||
list->elements++;
|
||||
return node;
|
||||
}
|
||||
|
||||
OPM_NODE_T *libopm_list_remove(OPM_LIST_T *list, OPM_NODE_T *node)
|
||||
{
|
||||
|
||||
if(list == NULL || node == NULL)
|
||||
return NULL;
|
||||
|
||||
if(node == list->head)
|
||||
{
|
||||
list->head = node->next;
|
||||
|
||||
if(node->next)
|
||||
node->next->prev = NULL;
|
||||
else
|
||||
list->tail = NULL;
|
||||
}
|
||||
else if(node == list->tail)
|
||||
{
|
||||
list->tail = list->tail->prev;
|
||||
list->tail->next = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
node->prev->next = node->next;
|
||||
node->next->prev = node->prev;
|
||||
}
|
||||
|
||||
list->elements--;
|
||||
return node;
|
||||
}
|
||||
|
||||
void libopm_list_free(OPM_LIST_T *list)
|
||||
{
|
||||
MyFree(list);
|
||||
}
|
||||
|
||||
void libopm_node_free(OPM_NODE_T *node)
|
||||
{
|
||||
MyFree(node);
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef LIST_H
|
||||
#define LIST_H
|
||||
|
||||
|
||||
/* Copyright (C) 2002 by the past and present ircd coders, and others.
|
||||
* Adapted from Hybrid7 DLINK macros
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#define LIST_FOREACH(pos, head) for (pos = (head); pos != NULL; pos = pos->next)
|
||||
#define LIST_FOREACH_SAFE(pos, n, head) for (pos = (head), n = pos ? pos->next : NULL; pos != NULL; pos = n, n = pos ? pos->next : NULL)
|
||||
#define LIST_FOREACH_PREV(pos, head) for (pos = (head); pos != NULL; pos = pos->prev)
|
||||
#define LIST_SIZE(list) list->elements
|
||||
/* End Copyright */
|
||||
|
||||
OPM_NODE_T *libopm_node_create(void *);
|
||||
OPM_LIST_T *libopm_list_create(void);
|
||||
|
||||
OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *);
|
||||
OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *);
|
||||
|
||||
void libopm_list_free(OPM_LIST_T *);
|
||||
void libopm_node_free(OPM_NODE_T *);
|
||||
|
||||
#endif /* LIST_H */
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include "modconfig.h"
|
||||
|
||||
#include "malloc.h"
|
||||
#include "opm.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
|
||||
/* MyMalloc
|
||||
*
|
||||
* A wrapper function for malloc(), for catching memory issues
|
||||
* and error handling.
|
||||
*
|
||||
* Parameters
|
||||
* bytes: amount in bytes to allocate
|
||||
*
|
||||
* Return:
|
||||
* Pointer to allocated memory
|
||||
*/
|
||||
|
||||
void *libopm_MyMalloc(size_t bytes)
|
||||
{
|
||||
void *ret = calloc(1, bytes);
|
||||
|
||||
assert(ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* MyFree
|
||||
*
|
||||
* Free memory allocated with MyMalloc
|
||||
*
|
||||
* Parameters:
|
||||
* var: pointer to memory to free
|
||||
*
|
||||
* Return:
|
||||
* None
|
||||
*/
|
||||
|
||||
void libopm_MyFree(void **var)
|
||||
{
|
||||
if(*var != NULL)
|
||||
free(*var);
|
||||
*var = NULL;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#ifndef MALLOC_H
|
||||
#define MALLOC_H
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#define MyMalloc(SIZE) libopm_MyMalloc(SIZE)
|
||||
#define MyFree(X) libopm_MyFree((void **) &X)
|
||||
|
||||
void *libopm_MyMalloc(size_t bytes);
|
||||
void libopm_MyFree(void **var);
|
||||
|
||||
#endif /* MALLOC_H */
|
86
libopm/opm.h
86
libopm/opm.h
|
@ -1,86 +0,0 @@
|
|||
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
|
||||
|
||||
/** \file opm.h
|
||||
* \brief Main header for libopm.
|
||||
* \author Erik Fears
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
#ifndef OPM_H
|
||||
#define OPM_H
|
||||
|
||||
#include "opm_common.h"
|
||||
#include <sys/poll.h>
|
||||
|
||||
/* Stuff to shut up warnings about rcsid being unused. */
|
||||
#define USE_VAR(var) static char sizeof##var = sizeof(sizeof##var) + sizeof(var)
|
||||
/* RCS tag. */
|
||||
#define RCSID(x) static char rcsid[] = x; USE_VAR(rcsid);
|
||||
|
||||
|
||||
typedef struct _OPM_CONFIG OPM_CONFIG_T;
|
||||
typedef struct _OPM OPM_T;
|
||||
typedef struct _OPM_REMOTE OPM_REMOTE_T;
|
||||
typedef struct _OPM_CALLBACK OPM_CALLBACK_T;
|
||||
|
||||
typedef int OPM_ERR_T;
|
||||
|
||||
typedef void OPM_CALLBACK_FUNC (OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
|
||||
struct _OPM_CALLBACK {
|
||||
OPM_CALLBACK_FUNC *func;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct _OPM_CONFIG {
|
||||
void **vars;
|
||||
};
|
||||
|
||||
struct _OPM {
|
||||
OPM_CONFIG_T *config; /* Individual scanner configuration */
|
||||
OPM_LIST_T *queue; /* List of scans in the queue (not yet established) */
|
||||
OPM_LIST_T *scans; /* List of scans (each scan containing a list of connections) */
|
||||
OPM_LIST_T *protocols; /* List of protocols this scanner handles */
|
||||
unsigned int fd_use; /* Number of file descriptors in use */
|
||||
|
||||
OPM_CALLBACK_T *callbacks; /* Scanner wide callbacks */
|
||||
};
|
||||
|
||||
struct _OPM_REMOTE {
|
||||
|
||||
char *ip; /* Readable IP address */
|
||||
|
||||
unsigned short int port; /* Port passed back on certain callbacks */
|
||||
unsigned short int protocol; /* Protocol passed back on certain callbacks */
|
||||
unsigned short int bytes_read; /* Bytes read passed back on certain callbacks */
|
||||
|
||||
OPM_LIST_T *protocols; /* Remote specific protocols */
|
||||
|
||||
void *data; /* Arbitrary data that the client can point to for any purpose*/
|
||||
};
|
||||
|
||||
OPM_T *opm_create(void);
|
||||
void opm_free(OPM_T *);
|
||||
|
||||
OPM_REMOTE_T *opm_remote_create(const char *);
|
||||
void opm_remote_free(OPM_REMOTE_T *);
|
||||
|
||||
OPM_ERR_T opm_config(OPM_T *, int, void *);
|
||||
OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *);
|
||||
void opm_end(OPM_T *, OPM_REMOTE_T *);
|
||||
void opm_endscan(OPM_T *, OPM_REMOTE_T *);
|
||||
|
||||
OPM_ERR_T opm_addtype(OPM_T *, int, unsigned short int);
|
||||
OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, unsigned short int);
|
||||
OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_FUNC *, void *);
|
||||
|
||||
void opm_cycle(OPM_T *);
|
||||
typedef struct pollfd pollfd;
|
||||
|
||||
void libopm_after_poll(OPM_T *, pollfd *, unsigned int );
|
||||
int libopm_before_poll(OPM_T *, pollfd *);
|
||||
|
||||
|
||||
size_t opm_active(OPM_T *);
|
||||
|
||||
#endif /* OPM_H */
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef OPM_COMMON_H
|
||||
#define OPM_COMMON_H
|
||||
|
||||
typedef struct _libopm_node OPM_NODE_T;
|
||||
typedef struct _libopm_list OPM_LIST_T;
|
||||
|
||||
|
||||
struct _libopm_list {
|
||||
|
||||
struct _libopm_node *head;
|
||||
struct _libopm_node *tail;
|
||||
|
||||
int elements;
|
||||
};
|
||||
|
||||
struct _libopm_node {
|
||||
|
||||
struct _libopm_node *next;
|
||||
struct _libopm_node *prev;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
#endif /* OPM_COMMON_H */
|
|
@ -1,26 +0,0 @@
|
|||
#ifndef LIBOPM_ERROR_H
|
||||
#define LIBOPM_ERROR_H
|
||||
|
||||
/* Success */
|
||||
#define OPM_SUCCESS 1
|
||||
|
||||
/* Configuration Errors */
|
||||
#define OPM_ERR_BADKEY 2 /* Unknown or bad key value */
|
||||
#define OPM_ERR_BADVALUE 3 /* Bad value matching key */
|
||||
#define OPM_ERR_BADPROTOCOL 4 /* Unknown protocol in config */
|
||||
|
||||
/* Read Errors */
|
||||
#define OPM_ERR_MAX_READ 5 /* Socket reached MAX_READ */
|
||||
|
||||
/* Callback Registration Errors */
|
||||
#define OPM_ERR_CBNOTFOUND 6 /* Callback is out of range */
|
||||
|
||||
/* opm_scan errors */
|
||||
#define OPM_ERR_BADADDR 7 /* IP in remote struct is bad */
|
||||
#define OPM_ERR_NOPROTOCOLS 8 /* No protocols to scan! */
|
||||
|
||||
/* bind/connect errors */
|
||||
#define OPM_ERR_BIND 9 /* Error binding to BIND_IP */
|
||||
#define OPM_ERR_NOFD 10/* Unable to allocate file descriptor */
|
||||
|
||||
#endif /* LIBOPM_ERROR_H */
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef OPM_TYPES_H
|
||||
#define OPM_TYPES_H
|
||||
|
||||
/* Configuration Directives */
|
||||
#define OPM_CONFIG_FD_LIMIT 0
|
||||
#define OPM_CONFIG_BIND_IP 1
|
||||
#define OPM_CONFIG_DNSBL_HOST 2
|
||||
#define OPM_CONFIG_TARGET_STRING 3
|
||||
#define OPM_CONFIG_SCAN_IP 4
|
||||
#define OPM_CONFIG_SCAN_PORT 5
|
||||
#define OPM_CONFIG_MAX_READ 6
|
||||
#define OPM_CONFIG_TIMEOUT 7
|
||||
|
||||
/* Configuration Variable Types */
|
||||
#define OPM_TYPE_INT 1
|
||||
#define OPM_TYPE_STRING 2
|
||||
#define OPM_TYPE_ADDRESS 3
|
||||
#define OPM_TYPE_STRINGLIST 4
|
||||
|
||||
/* Protocols */
|
||||
#define OPM_TYPE_HTTP 1
|
||||
#define OPM_TYPE_SOCKS4 2
|
||||
#define OPM_TYPE_SOCKS5 3
|
||||
#define OPM_TYPE_WINGATE 4
|
||||
#define OPM_TYPE_ROUTER 5
|
||||
#define OPM_TYPE_HTTPPOST 6
|
||||
|
||||
/* States */
|
||||
#define OPM_STATE_UNESTABLISHED 1
|
||||
#define OPM_STATE_ESTABLISHED 2
|
||||
#define OPM_STATE_NEGSENT 3
|
||||
#define OPM_STATE_CLOSED 4
|
||||
|
||||
|
||||
/* Callbacks -- If more callback types are added,
|
||||
CBLEN will need to be changed in libopm.h accordingly */
|
||||
|
||||
#define OPM_CALLBACK_OPENPROXY 0 /* An open proxy has been found REMOTE/SCANNER */
|
||||
#define OPM_CALLBACK_NEGFAIL 1 /* Negotiation to a proxy has failed REMOTE/SCANNER */
|
||||
#define OPM_CALLBACK_END 2 /* A scan has ended REMOTE/SCANNER */
|
||||
#define OPM_CALLBACK_ERROR 3 /* An unrecoverable error has occured */
|
||||
#define OPM_CALLBACK_TIMEOUT 4 /* Specific scan (protocol) on host has timed out */
|
||||
|
||||
#endif /* OPM_TYPES_H */
|
246
libopm/proxy.c
246
libopm/proxy.c
|
@ -1,246 +0,0 @@
|
|||
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
|
||||
|
||||
/* Copyright (C) 2002 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#include "inet.h"
|
||||
#include "compat.h"
|
||||
#include "config.h"
|
||||
#include "proxy.h"
|
||||
#include "opm_common.h"
|
||||
#include "opm_types.h"
|
||||
#include "opm_error.h"
|
||||
#include "libopm.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static char SENDBUF[SENDBUFLEN + 1];
|
||||
|
||||
int libopm_proxy_http_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
USE_VAR(scan);
|
||||
|
||||
snprintf(SENDBUF, SENDBUFLEN, "CONNECT %s:%d HTTP/1.0\r\n\r\n",
|
||||
(char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP),
|
||||
*(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT));
|
||||
|
||||
if(send(conn->fd, SENDBUF, strlen(SENDBUF), 0) == -1)
|
||||
return 0; /* Return error code ? */
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CONNECT request byte order for socks4
|
||||
*
|
||||
* +----+----+----+----+----+----+----+----+----+----+....+----+
|
||||
* | VN | CD | DSTPORT | DSTIP | USERID |NULL|
|
||||
* +----+----+----+----+----+----+----+----+----+----+....+----+
|
||||
* # of bytes: 1 1 2 4 variable 1
|
||||
*
|
||||
* VN = Version, CD = Command Code (1 is connect request)
|
||||
*/
|
||||
|
||||
int libopm_proxy_socks4_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
struct in_addr addr;
|
||||
unsigned long laddr;
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
laddr = htonl(addr.s_addr);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%c%c%c%c%c%c%c%c%c", 4, 1,
|
||||
(((unsigned short) scan_port) >> 8) & 0xFF,
|
||||
(((unsigned short) scan_port) & 0xFF),
|
||||
(char) (laddr >> 24) & 0xFF, (char) (laddr >> 16) & 0xFF,
|
||||
(char) (laddr >> 8) & 0xFF, (char) laddr & 0xFF, 0);
|
||||
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Send version authentication selection message to socks5
|
||||
*
|
||||
* +----+----------+----------+
|
||||
* |VER | NMETHODS | METHODS |
|
||||
* +----+----------+----------+
|
||||
* | 1 | 1 | 1 to 255 |
|
||||
* +----+----------+----------+
|
||||
*
|
||||
* VER always contains 5, for socks version 5
|
||||
* Method 0 is 'No authentication required'
|
||||
*
|
||||
*
|
||||
*
|
||||
* The SOCKS request is formed as follows:
|
||||
*
|
||||
* +----+-----+-------+------+----------+----------+
|
||||
* |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
|
||||
* +----+-----+-------+------+----------+----------+
|
||||
* | 1 | 1 | X'00' | 1 | Variable | 2 |
|
||||
* +----+-----+-------+------+----------+----------+
|
||||
*
|
||||
*
|
||||
* o VER protocol version: X'05'
|
||||
* o CMD
|
||||
* o CONNECT X'01'
|
||||
* o BIND X'02'
|
||||
* o UDP ASSOCIATE X'03'
|
||||
* o RSV RESERVED
|
||||
* o ATYP address type of following address
|
||||
* o IP V4 address: X'01'
|
||||
* o DOMAINNAME: X'03'
|
||||
* o IP V6 address: X'04'
|
||||
* o DST.ADDR desired destination address
|
||||
* o DST.PORT desired destination port in network octet
|
||||
* order
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int libopm_proxy_socks5_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
struct in_addr addr;
|
||||
unsigned long laddr;
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
if (inet_aton(scan_ip, &addr) == 0)
|
||||
; /* handle error */
|
||||
|
||||
laddr = htonl(addr.s_addr);
|
||||
|
||||
/* Form authentication string */
|
||||
/* Version 5, 1 number of methods, 0 method (no auth). */
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%c%c%c", 5, 1, 0);
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
/* Form request string */
|
||||
|
||||
/* Will need to write ipv6 support here in future
|
||||
* as socks5 is ipv6 compatible
|
||||
*/
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%c%c%c%c%c%c%c%c%c%c", 5, 1, 0, 1,
|
||||
(char) (laddr >> 24) & 0xFF, (char) (laddr >> 16) & 0xFF,
|
||||
(char) (laddr >> 8) & 0xFF, (char) laddr & 0xFF,
|
||||
(((unsigned short) scan_port) >> 8) & 0xFF,
|
||||
(((unsigned short) scan_port) & 0xFF));
|
||||
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open wingates require no authentication, they will send a prompt when
|
||||
* connect.
|
||||
*/
|
||||
|
||||
int libopm_proxy_wingate_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
int scan_port, len;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "%s:%d\r\n", scan_ip, scan_port);
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Cisco scanning
|
||||
*
|
||||
* Some cisco routers have 'cisco' set as password which allow open telnet
|
||||
* relay. Attempt to connect using cisco as a password, then give command for
|
||||
* telnet to the scanip/scanport
|
||||
*/
|
||||
|
||||
int libopm_proxy_router_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "cisco\r\n");
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "telnet %s %d\r\n", scan_ip, scan_port);
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* HTTP POST Scanning
|
||||
*
|
||||
*/
|
||||
|
||||
int libopm_proxy_httppost_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
|
||||
{
|
||||
int len, scan_port;
|
||||
char *scan_ip;
|
||||
USE_VAR(scan);
|
||||
|
||||
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
|
||||
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
|
||||
|
||||
len = snprintf(SENDBUF, SENDBUFLEN, "POST http://%s:%d/ HTTP/1.0\r\n"
|
||||
"Content-type: text/plain\r\n"
|
||||
"Content-length: 5\r\n\r\n"
|
||||
"quit\r\n\r\n",
|
||||
scan_ip, scan_port);
|
||||
|
||||
send(conn->fd, SENDBUF, (unsigned int)len, 0);
|
||||
|
||||
return OPM_SUCCESS;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#ifndef PROXY_H
|
||||
#define PROXY_H
|
||||
|
||||
#include "libopm.h"
|
||||
|
||||
int libopm_proxy_http_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_socks4_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_socks5_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
|
||||
|
||||
|
||||
#endif /* PROXY_H */
|
244
libopm/test.c
244
libopm/test.c
|
@ -1,244 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "opm.h"
|
||||
#include "opm_error.h"
|
||||
#include "opm_types.h"
|
||||
#include "compat.h"
|
||||
#include <sys/poll.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
RCSID("$Id: test.c,v 1.36 2003/06/20 04:55:14 andy Exp $");
|
||||
|
||||
#define ARRAY_SIZEOF(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
void open_proxy(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void negotiation_failed(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void timeout(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void end(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
void handle_error(OPM_T *, OPM_REMOTE_T *, int, void *);
|
||||
|
||||
int complete = 0;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
OPM_ERR_T err;
|
||||
int fdlimit = 1024;
|
||||
int scan_port = 6667;
|
||||
int max_read = 4096;
|
||||
int scantimeout = 10;
|
||||
struct pollfd *ufds;
|
||||
unsigned int size;
|
||||
unsigned int i, s;
|
||||
|
||||
unsigned short http_ports[] = {
|
||||
8000, 8080, 3128, 80
|
||||
};
|
||||
|
||||
unsigned short wingate_ports[] = {
|
||||
23
|
||||
};
|
||||
|
||||
unsigned short router_ports[] = {
|
||||
23
|
||||
};
|
||||
|
||||
unsigned short socks4_ports[] = {
|
||||
1080
|
||||
};
|
||||
|
||||
unsigned short socks5_ports[] = {
|
||||
1080
|
||||
};
|
||||
|
||||
unsigned short httppost_ports[] = {
|
||||
80, 8090, 3128
|
||||
};
|
||||
|
||||
OPM_T *scanner;
|
||||
OPM_REMOTE_T *remote;
|
||||
|
||||
scanner = opm_create();
|
||||
|
||||
if(argc >= 2)
|
||||
remote = opm_remote_create(argv[1]);
|
||||
else
|
||||
remote = opm_remote_create("127.0.0.1");
|
||||
|
||||
/* Setup callbacks */
|
||||
opm_callback(scanner, OPM_CALLBACK_OPENPROXY, &open_proxy, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_NEGFAIL, &negotiation_failed, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_TIMEOUT, &timeout, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_END, &end, NULL);
|
||||
opm_callback(scanner, OPM_CALLBACK_ERROR, &handle_error, NULL);
|
||||
|
||||
|
||||
/* Setup the scanner configuration */
|
||||
opm_config(scanner, OPM_CONFIG_FD_LIMIT, &fdlimit);
|
||||
opm_config(scanner, OPM_CONFIG_SCAN_IP, "216.175.104.202");
|
||||
opm_config(scanner, OPM_CONFIG_SCAN_PORT, &scan_port);
|
||||
opm_config(scanner, OPM_CONFIG_TARGET_STRING, "*** Looking up your hostname...");
|
||||
opm_config(scanner, OPM_CONFIG_TARGET_STRING, "ERROR :Trying to reconnect too fast.");
|
||||
opm_config(scanner, OPM_CONFIG_TIMEOUT, &scantimeout);
|
||||
opm_config(scanner, OPM_CONFIG_MAX_READ, &max_read);
|
||||
|
||||
/* Setup the protocol configuration */
|
||||
for (s = ARRAY_SIZEOF(http_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_HTTP, http_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(wingate_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_WINGATE, wingate_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(router_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_ROUTER, router_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(socks4_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_SOCKS4, socks4_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(socks5_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_SOCKS5, socks5_ports[i]);
|
||||
}
|
||||
|
||||
for (s = ARRAY_SIZEOF(httppost_ports), i = 0; i < s; i++) {
|
||||
opm_addtype(scanner, OPM_TYPE_HTTPPOST, httppost_ports[i]);
|
||||
}
|
||||
|
||||
/* Remote structs can also have their own extended protocol configurations. For instance
|
||||
if the target hostname contains strings such as 'proxy' or 'www', extended ports could
|
||||
be scanned. */
|
||||
opm_remote_addtype(remote, OPM_TYPE_HTTP, 8001);
|
||||
opm_remote_addtype(remote, OPM_TYPE_HTTP, 8002);
|
||||
|
||||
switch(err = opm_scan(scanner, remote))
|
||||
{
|
||||
case OPM_SUCCESS:
|
||||
break;
|
||||
case OPM_ERR_BADADDR:
|
||||
printf("Bad address\n");
|
||||
opm_free(scanner);
|
||||
opm_remote_free(remote);
|
||||
return 0;
|
||||
default:
|
||||
printf("Unknown Error %d\n", err);
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (!complete) {
|
||||
ufds = malloc((sizeof *ufds) * (*(unsigned int *) libopm_config(scanner->config, OPM_CONFIG_FD_LIMIT)));
|
||||
size = libopm_before_poll(scanner, ufds);
|
||||
|
||||
err = poll(ufds, size, 0);
|
||||
switch (err)
|
||||
{
|
||||
case -1:
|
||||
/* error in select/poll */
|
||||
printf("poll barked\n");
|
||||
return;
|
||||
case 0:
|
||||
/* Nothing to do */
|
||||
continue;
|
||||
default:
|
||||
libopm_after_poll(scanner, ufds, size);
|
||||
continue;
|
||||
|
||||
/* Pass pointer to connection to handler. */
|
||||
}
|
||||
}
|
||||
opm_free(scanner);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void open_proxy(OPM_T *scanner, OPM_REMOTE_T *remote, int notused,
|
||||
void *data)
|
||||
{
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Open proxy on %s:%d [%d bytes read]\n", remote->ip,
|
||||
remote->port, remote->bytes_read);
|
||||
opm_end(scanner, remote);
|
||||
}
|
||||
|
||||
void negotiation_failed(OPM_T *scanner, OPM_REMOTE_T *remote, int notused,
|
||||
void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Negotiation on %s:%d failed [%d bytes read]\n", remote->ip,
|
||||
remote->port, remote->bytes_read);
|
||||
}
|
||||
|
||||
void timeout(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Negotiation timed out on %s:%d\n", remote->ip, remote->port);
|
||||
}
|
||||
|
||||
void end(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(notused);
|
||||
USE_VAR(data);
|
||||
|
||||
printf("Scan on %s has ended\n", remote->ip);
|
||||
opm_remote_free(remote);
|
||||
complete = 1;
|
||||
}
|
||||
|
||||
void handle_error(OPM_T *scanner, OPM_REMOTE_T *remote, int err, void *data)
|
||||
{
|
||||
USE_VAR(scanner);
|
||||
USE_VAR(data);
|
||||
|
||||
switch(err)
|
||||
{
|
||||
case OPM_ERR_MAX_READ:
|
||||
printf("Reached MAX READ on %s:%d\n", remote->ip, remote->port);
|
||||
break;
|
||||
case OPM_ERR_BIND:
|
||||
printf("Unable to bind for %s:%d\n", remote->ip, remote->port);
|
||||
break;
|
||||
case OPM_ERR_NOFD:
|
||||
printf("Unable to allocate file descriptor for %s:%d\n",
|
||||
remote->ip, remote->port);
|
||||
break;
|
||||
default:
|
||||
printf("Unknown error on %s:%d, err = %d\n", remote->ip,
|
||||
remote->port, err);
|
||||
}
|
||||
}
|
105
modconfig.h.in
105
modconfig.h.in
|
@ -3,105 +3,14 @@
|
|||
/* 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
|
||||
|
||||
/* "Major Version" */
|
||||
#undef MODULE_MAJOR
|
||||
|
||||
/* "Minor Version" */
|
||||
#undef MODULE_MINOR
|
||||
|
||||
/* "Module Version" */
|
||||
/* Version number of package */
|
||||
#undef MODULE_VERSION
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
/* Major Version */
|
||||
#undef MODULE_MAJOR
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
/* Minor Version */
|
||||
#undef MODULE_MINOR
|
||||
|
||||
/* 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
|
||||
/* Revision */
|
||||
#undef MODULE_REV
|
||||
|
|
20
modconfigwin32.h
Executable file
20
modconfigwin32.h
Executable file
|
@ -0,0 +1,20 @@
|
|||
#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.a3-dev"
|
||||
|
||||
/* Major Version */
|
||||
#define MODULE_MAJOR "3"
|
||||
|
||||
/* Minor Version */
|
||||
#define MODULE_MINOR "0"
|
||||
|
||||
/* Revision */
|
||||
#define MODULE_REV "a3-dev"
|
||||
|
||||
#endif /* _MODCONFIGWIN32_H_ */
|
204
opsb.h
204
opsb.h
|
@ -1,185 +1,127 @@
|
|||
/* NetStats - IRC Statistical Services Copyright (c) 1999 Adam Rutter,
|
||||
** Justin Hammond http://codeworks.kamserve.com
|
||||
*
|
||||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
/* NeoStats - IRC Statistical Services
|
||||
** Copyright (c) 1999-2006 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$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef OPSB_H
|
||||
#define OPSB_H
|
||||
|
||||
#include "modconfig.h"
|
||||
#include "opm_types.h"
|
||||
#include MODULECONFIG
|
||||
|
||||
/* these are some state flags */
|
||||
#define DOING_SCAN 0x0008
|
||||
#define GOTOPENPROXY 0x0010
|
||||
#define FIN_SCAN 0x0080
|
||||
/* max scans in the max concurrent scans at any one time */
|
||||
#define MAX_SCANS 100
|
||||
/* max queue is the max amount of scans that may be concurrent and queued. */
|
||||
#define MAX_QUEUE ( MAX_SCANS * 100 )
|
||||
/* max no of ports to scan */
|
||||
#define MAX_PORTS 500
|
||||
|
||||
#define SCAN_SOCKET_COUNT 7
|
||||
|
||||
typedef struct port_list {
|
||||
int type;
|
||||
int port;
|
||||
int nofound;
|
||||
int noopen;
|
||||
int numopen;
|
||||
} port_list;
|
||||
|
||||
|
||||
extern char s_opsb[MAXNICK];
|
||||
|
||||
|
||||
/* max scans in the max concurrent scans at any one time */
|
||||
#define MAX_SCANS 100
|
||||
/* max queue is the max amount of scans that may be concurrent and queued. */
|
||||
#define MAX_QUEUE MAX_SCANS * 100
|
||||
/* max no of exempt entries */
|
||||
#define MAX_EXEMPTS 20
|
||||
/* max no of ports to scan */
|
||||
#define MAX_PORTS 50
|
||||
|
||||
#define MAXREASON 128
|
||||
|
||||
struct scanq {
|
||||
typedef struct scaninfo{
|
||||
char who[MAXHOST];
|
||||
int state;
|
||||
int dnsstate;
|
||||
char lookup[MAXHOST];
|
||||
char server[MAXHOST];
|
||||
struct in_addr ipaddr;
|
||||
User *u;
|
||||
int doreport;
|
||||
struct in_addr ip;
|
||||
Client *reqclient;
|
||||
time_t started;
|
||||
int doneban;
|
||||
char connectstring[BUFSIZE];
|
||||
};
|
||||
list_t *connections;
|
||||
} scaninfo;
|
||||
|
||||
typedef struct scanq scaninfo;
|
||||
|
||||
struct opsb {
|
||||
char user[MAXUSER];
|
||||
char host[MAXHOST];
|
||||
char realname[MAXREALNAME];
|
||||
char opmdomain[MAXHOST];
|
||||
int init;
|
||||
char targethost[MAXHOST];
|
||||
char lookforstring[BUFSIZE];
|
||||
typedef struct opsbcfg {
|
||||
char targetip[MAXHOST];
|
||||
char openstring[BUFSIZE];
|
||||
int targetport;
|
||||
int maxbytes;
|
||||
int timeout;
|
||||
int socks;
|
||||
int timedif;
|
||||
unsigned int socks;
|
||||
int open;
|
||||
int scanned;
|
||||
char scanmsg[BUFSIZE];
|
||||
int bantime;
|
||||
int akilltime;
|
||||
int confed;
|
||||
int cachetime;
|
||||
int doscan;
|
||||
int cachesize;
|
||||
int cachehits;
|
||||
int opmhits;
|
||||
int doban;
|
||||
int doakill;
|
||||
int doreport;
|
||||
int verbose;
|
||||
int exclusions;
|
||||
list_t *ports;
|
||||
} opsb;
|
||||
|
||||
|
||||
typedef struct sockinfo socklist;
|
||||
|
||||
} opsbcfg;
|
||||
|
||||
extern Bot *opsb_bot;
|
||||
extern opsbcfg opsb;
|
||||
/* this is the list of items to be queued */
|
||||
list_t *opsbq;
|
||||
extern list_t *opsbq;
|
||||
/* this is the list of currently active scans */
|
||||
list_t *opsbl;
|
||||
|
||||
|
||||
struct cache_entry {
|
||||
unsigned long ip;
|
||||
time_t when;
|
||||
};
|
||||
|
||||
typedef struct cache_entry C_entry;
|
||||
|
||||
|
||||
extern list_t *opsbl;
|
||||
/* this is a list of cached scans */
|
||||
list_t *cache;
|
||||
|
||||
struct exempts {
|
||||
char host[MAXHOST];
|
||||
int server;
|
||||
char who[MAXNICK];
|
||||
char reason[MAXREASON];
|
||||
};
|
||||
|
||||
typedef struct exempts exemptinfo;
|
||||
|
||||
|
||||
typedef struct proxy_type {
|
||||
int type;
|
||||
char name[MAXNICK];
|
||||
} proxy_type;
|
||||
|
||||
|
||||
|
||||
|
||||
/* this is the list of exempted hosts/servers */
|
||||
|
||||
list_t *exempt;
|
||||
|
||||
/* these are some state flags */
|
||||
#define REPORT_DNS 0x0001
|
||||
#define DO_DNS_HOST_LOOKUP 0x0002
|
||||
#define DO_OPM_LOOKUP 0x0004
|
||||
#define DOING_SCAN 0x0008
|
||||
#define GOTOPENPROXY 0x0010
|
||||
#define OPMLIST 0x0020
|
||||
#define NOOPMLIST 0x0040
|
||||
#define FIN_SCAN 0x0080
|
||||
|
||||
extern list_t *cache;
|
||||
|
||||
/* opsb.c */
|
||||
int findscan(const void *key1, const void *key2);
|
||||
void do_ban(scaninfo *scandata);
|
||||
void checkqueue();
|
||||
void addtocache(unsigned long ipaddr);
|
||||
|
||||
int findscan( const void *key1, const void *key2 );
|
||||
void checkqueue( void );
|
||||
void addtocache( unsigned long ip );
|
||||
|
||||
/* proxy.c */
|
||||
void start_proxy_scan(lnode_t *scannode);
|
||||
int do_status(User *u, char **av, int ac);
|
||||
void check_scan_free(scaninfo *scandata);
|
||||
int init_libopm();
|
||||
char *type_of_proxy(int type);
|
||||
int get_proxy_by_name(const char *name);
|
||||
void add_port(int type, int port);
|
||||
int load_ports();
|
||||
void start_proxy_scan( scaninfo *scandata );
|
||||
int opsb_cmd_status( const CmdParams *cmdparams );
|
||||
int init_scanengine( void );
|
||||
char *type_of_proxy( int type );
|
||||
int get_proxy_by_name( const char *name );
|
||||
int load_ports( void );
|
||||
void save_ports( void );
|
||||
|
||||
/* help text */
|
||||
extern const char *opsb_help_lookup[];
|
||||
extern const char *opsb_help_info[];
|
||||
extern const char *opsb_about[];
|
||||
extern const char *opsb_help_check[];
|
||||
extern const char *opsb_help_status[];
|
||||
extern const char *opsb_help_exclude[];
|
||||
extern const char *opsb_help_remove[];
|
||||
extern const char *opsb_help_ports[];
|
||||
extern const char *opsb_help_add[];
|
||||
extern const char *opsb_help_del[];
|
||||
extern const char *opsb_help_list[];
|
||||
|
||||
extern const char opsb_help_info_oneline[];
|
||||
extern const char opsb_help_status_oneline[];
|
||||
extern const char opsb_help_lookup_oneline[];
|
||||
extern const char opsb_help_remove_oneline[];
|
||||
extern const char opsb_help_check_oneline[];
|
||||
extern const char opsb_help_exclude_oneline[];
|
||||
extern const char opsb_help_ports_oneline[];
|
||||
extern const char opsb_help_set_oneline[];
|
||||
|
||||
extern const char *opsb_help_set_disablescan [];
|
||||
extern const char *opsb_help_set_doban [];
|
||||
extern const char *opsb_help_set_akill [];
|
||||
extern const char *opsb_help_set_targetip [];
|
||||
extern const char *opsb_help_set_targetport [];
|
||||
extern const char *opsb_help_set_opmdomain [];
|
||||
extern const char *opsb_help_set_maxbytes [];
|
||||
extern const char *opsb_help_set_timeout [];
|
||||
extern const char *opsb_help_set_openstring [];
|
||||
extern const char *opsb_help_set_splittime [];
|
||||
extern const char *opsb_help_set_scanmsg [];
|
||||
extern const char *opsb_help_set_bantime [];
|
||||
extern const char *opsb_help_set_akilltime [];
|
||||
extern const char *opsb_help_set_cachetime [];
|
||||
extern const char *opsb_help_set_verbose [];
|
||||
|
||||
extern const char *opsb_help_set_exclusions[];
|
||||
extern const char *opsb_help_set_cachesize[];
|
||||
extern const char *opsb_help_set_doreport[];
|
||||
#endif /* OPSB_H */
|
||||
|
|
244
opsb.vcproj
Executable file
244
opsb.vcproj
Executable file
|
@ -0,0 +1,244 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="opsb"
|
||||
ProjectGUID="{98607F07-D740-4D26-804A-A12A7E162A4C}"
|
||||
RootNamespace="opsb"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\dev\include;..\dev\lib\curl;..\dev\lib\pcre;..\dev\lib\event"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;opsb_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib neostats.lib"
|
||||
OutputFile="../dev/modules/opsbd.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\dev\src\Debug"
|
||||
IgnoreDefaultLibraryNames="LIBCD"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/opsb.pdb"
|
||||
SubSystem="2"
|
||||
ResourceOnlyDLL="false"
|
||||
ImportLibrary="$(OutDir)/opsb.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\dev\include;..\dev\lib\curl;..\dev\lib\pcre;..\dev\lib\event"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;opsb_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib neostats.lib"
|
||||
OutputFile="../dev/modules/opsb.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\dev\src\Release"
|
||||
IgnoreDefaultLibraryNames="LIBC"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/opsb.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\opsb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\opsb_help.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\proxy.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\modconfigwin32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\opsb.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ChangeLog"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\License"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\README.opsb"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Relnotes"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
224
opsb_help.c
224
opsb_help.c
|
@ -1,5 +1,5 @@
|
|||
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2004 NeoStats Group Inc.
|
||||
** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond
|
||||
/* NeoStats - IRC Statistical Services
|
||||
** Copyright (c) 1999-2006 Adam Rutter, Justin Hammond, Mark Hetherington
|
||||
** http://www.neostats.net/
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
|
@ -23,50 +23,23 @@
|
|||
|
||||
#include "neostats.h"
|
||||
|
||||
const char opsb_help_info_oneline[] = "Information about opsb";
|
||||
const char opsb_help_status_oneline[] = "View opsb state information";
|
||||
const char opsb_help_lookup_oneline[] = "Lookup DNS record";
|
||||
const char opsb_help_remove_oneline[] = "Remove an akill set by opsb";
|
||||
const char opsb_help_check_oneline[] = "Scan a selected user";
|
||||
const char opsb_help_exclude_oneline[] = "Exclude a host from scanning";
|
||||
const char opsb_help_ports_oneline[] = "Allows you to customize the ports scanned";
|
||||
const char opsb_help_set_oneline[] = "Change opsb configuration options";
|
||||
|
||||
const char *opsb_help_lookup[] = {
|
||||
"Syntax: \2LOOKUP <ip|hostname> <flag>\2",
|
||||
"",
|
||||
"This command allows you to lookup DNS records on the",
|
||||
"Internet. Different types of records can be looked up",
|
||||
"by specifying different flags",
|
||||
"",
|
||||
"The Flags are:",
|
||||
" 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 you do not specify a flag, it defaults to looking up",
|
||||
"either the IP address for Hostnames, or the Hostname for",
|
||||
"IP addresses",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_info[] = {
|
||||
const char *opsb_about[] = {
|
||||
"\2Open Proxy Scanning Bot Information\2",
|
||||
"",
|
||||
"This bot is intended to scan 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",
|
||||
"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 staff",
|
||||
"administration.",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_check[] = {
|
||||
"Syntax: \2CHECK <nickname/IP/hostname>\2",
|
||||
"Scan a user, ip address or host",
|
||||
"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,",
|
||||
|
@ -76,50 +49,73 @@ const char *opsb_help_check[] = {
|
|||
};
|
||||
|
||||
const char *opsb_help_status[] = {
|
||||
"Display opsb status",
|
||||
"Syntax: \2STATUS\2",
|
||||
"",
|
||||
"View detailed information about the state of the Open",
|
||||
"Proxy Scanning Bot",
|
||||
"Display status of the open proxy scanning bot",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_disablescan [] = {
|
||||
"\2DISABLESCAN\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",
|
||||
const char *opsb_help_add[] = {
|
||||
"Add a port to scanning",
|
||||
"Syntax: \2ADD <type> <port>\2",
|
||||
"",
|
||||
"Add an entry to the port scan list.",
|
||||
"<type> must be one of:",
|
||||
" HTTP, HTTPPOST, SOCKS4, SOCKS5, WINGATE, ROUTER",
|
||||
"<port> must be a valid port number.",
|
||||
"The new port is scanned straight away",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_doban [] = {
|
||||
"\2DOBAN\2",
|
||||
" ",
|
||||
const char *opsb_help_del[] = {
|
||||
"Delete a port from scanning",
|
||||
"Syntax: \2DEL <index>\2",
|
||||
"",
|
||||
"Delete entry <index> from the list of ports. ",
|
||||
"Requires a restart of OPSB to become effective.",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_list[] = {
|
||||
"List protocols and ports scanned",
|
||||
"Syntax: \2LIST\2",
|
||||
"",
|
||||
"List the current ports and protocols scanned",
|
||||
"and a ID number for use in removing entries.",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_remove[] = {
|
||||
"Remove an akill set by opsb",
|
||||
"Syntax: \2REMOVE <ip|hostname>\2",
|
||||
"",
|
||||
"Remove akills that have been set by opsb.",
|
||||
"<ip|hostname> is the hostname listed in your akill list",
|
||||
"(usually found with /stats a)",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_akill [] = {
|
||||
"\2AKILL <ON|OFF>\2",
|
||||
"Whether to issue an akill for positive lookups",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_targetip [] = {
|
||||
"\2TARGETIP\2",
|
||||
"Change the IP address we try to make the proxies connect to",
|
||||
"This should be set to an IP address of one of your IRC Servers.",
|
||||
"\2TARGETIP <ip>\2",
|
||||
"IP address of server we try to make the proxies connect to",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_targetport [] = {
|
||||
"\2TARGETPORT\2",
|
||||
"Change the Port number we try to make proxies connect to.",
|
||||
"This must be a port that runs on your IRCD",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_opmdomain [] = {
|
||||
"\2OPMDOMAIN\2",
|
||||
"Change the Domain we use to lookup for Blacklists.",
|
||||
"This setting should not be changed unless you know the",
|
||||
"effects in full",
|
||||
"\2TARGETPORT <port>\2",
|
||||
"IRCd port number we try to make proxies connect to.",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_maxbytes [] = {
|
||||
"\2MAXBYTES\2",
|
||||
"\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",
|
||||
|
@ -127,7 +123,7 @@ const char *opsb_help_set_maxbytes [] = {
|
|||
};
|
||||
|
||||
const char *opsb_help_set_timeout [] = {
|
||||
"\2TIMEOUT\2",
|
||||
"\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",
|
||||
|
@ -136,114 +132,52 @@ const char *opsb_help_set_timeout [] = {
|
|||
};
|
||||
|
||||
const char *opsb_help_set_openstring [] = {
|
||||
"\2OPENSTRING\2",
|
||||
"\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 *opsb_help_set_splittime [] = {
|
||||
"\2SPLITTIME\2",
|
||||
"This is used to determine if users connecting to the network",
|
||||
"are part of a net join (when two servers link together)",
|
||||
"This setting should not be changed unless you know the",
|
||||
"effects in full",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_scanmsg [] = {
|
||||
"\2SCANMSG\2",
|
||||
"\2SCANMSG <msg>\2",
|
||||
"Message sent to a user when we scan their hosts",
|
||||
"This setting should not be changed unless you know the",
|
||||
"effects in full",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_bantime [] = {
|
||||
"\2BANTIME\2",
|
||||
const char *opsb_help_set_akilltime [] = {
|
||||
"\2AKILLTIME <time>\2",
|
||||
"How long the user will be banned from the network for",
|
||||
"This setting should not be changed unless you know the",
|
||||
"effects in full",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_cachetime [] = {
|
||||
"\2CACHETIME\2",
|
||||
"\2CACHETIME <time>\2",
|
||||
"Time (in seconds) that an entry will be cached",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_cachesize [] = {
|
||||
"\2CACHESIZE <size>\2",
|
||||
"The total number of clean hosts that OPSB will cache",
|
||||
"Setting this too large may cause NeoStats to Lag",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_set_verbose [] = {
|
||||
"\2VERBOSE\2",
|
||||
"\2VERBOSE <ON|OFF>\2",
|
||||
"Whether OPSB is verbose in operation or not",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_exclude[] = {
|
||||
"Syntax: \2EXCLUDE <LIST>\2",
|
||||
" \2EXCLUDE <ADD> <hostname> <type> <reason>\2",
|
||||
" \2EXCLUDE <DEL> <index>\2",
|
||||
"",
|
||||
"This command lets you view or manipulate the exception",
|
||||
"list. Exception lists are used to exclude users, or",
|
||||
"servers from scanning. You should at least add a server",
|
||||
"entry for your services IRC name, to stop OPSB from",
|
||||
"scanning Nickserv, Chanserv etc",
|
||||
"",
|
||||
"\2LIST\2 will list the current exceptions together with an",
|
||||
"ID number for use in removing entries.",
|
||||
"",
|
||||
"\2ADD\2 will add an entry of <hostname> to the exception"
|
||||
"list. Flag should be 1 to indicate a server name",
|
||||
"(eg, services.irc-chat.net) or 0 to indicate a hostname",
|
||||
"(eg, *.adsl.home.com). Reason allows you to set a"
|
||||
"reason for the exclusion for future reference",
|
||||
"Wildcards such as * and ? may be used in the hostname.",
|
||||
"",
|
||||
"\2DEL\2 will delete entry <index> from the list of",
|
||||
"exclusions. Use the LIST command to find the index.",
|
||||
const char *opsb_help_set_exclusions[] = {
|
||||
"\2EXCLUSIONS <ON|OFF>\2",
|
||||
"Use global exclusion list in addition to local exclusion list",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_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, OPSB 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 OPSB to become effective. Alternatively",
|
||||
"Reloading the OPSB module will make this effective",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *opsb_help_remove[] = {
|
||||
"Syntax: \2REMOVE <ip|hostname>\2",
|
||||
"",
|
||||
"Remove akills that have been set by opsb.",
|
||||
"",
|
||||
"<ip|hostname> is the hostname listed in your akill list",
|
||||
"(usually found with /stats a)",
|
||||
const char *opsb_help_set_doreport[] = {
|
||||
"Enable Open Proxy Reporting",
|
||||
"\2DOREPORT <ON|OFF>\2",
|
||||
"Enable OPSB reporting of Open Proxies back to Secure.irc-chat.net",
|
||||
NULL
|
||||
};
|
||||
|
|
62
pulse.xml
Normal file
62
pulse.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project default-recipe="default">
|
||||
<recipe name="Configure">
|
||||
<post-processor name="checkbuild.pp">
|
||||
<gcc.pp name="gcc.pp"/>
|
||||
<make.pp name="make.pp"/>
|
||||
</post-processor>
|
||||
<executable name="ShutUp Configure" exe="touch" args="${base.dir}/.hush"> </executable>
|
||||
<executable name="run configure" exe="${base.dir}/configure" args="--enable-debug --disable-ccdv --enable-autodebug"> </executable>
|
||||
<make name="build">
|
||||
<process processor="${checkbuild.pp}"/>
|
||||
</make>
|
||||
</recipe>
|
||||
<recipe name="SnapShowCheck">
|
||||
<post-processor name="checkbuild.pp">
|
||||
<gcc.pp name="gcc.pp"/>
|
||||
<make.pp name="make.pp"/>
|
||||
</post-processor>
|
||||
<executable name="ShutUp Configure" exe="touch" args="${base.dir}/.hush"> </executable>
|
||||
<executable name="run configure" exe="${base.dir}/configure" args="--enable-debug --disable-ccdv --enable-autodebug --with-distversion=${build.revision}"> </executable>
|
||||
<command name="Build">
|
||||
<make name="build" targets="distcheck">
|
||||
<process processor="${checkbuild.pp}"/>
|
||||
</make>
|
||||
<artifact name="SnapShot" file="OPSB-*.tar.gz"/>
|
||||
</command>
|
||||
</recipe>
|
||||
<recipe name="Win32-Build">
|
||||
<post-processor name="checkbuild.pp">
|
||||
<regex.pp name="compile.pp">
|
||||
<pattern category="error" expression="\\.[chl]\\([0-9]+\\): error"/>
|
||||
<pattern category="warning" expression="\\.[chl]\\([0-9]+\\): warning"/>
|
||||
</regex.pp>
|
||||
</post-processor>
|
||||
<resource name="Win32" required="true" version="1"/>
|
||||
<command name="Build-Core">
|
||||
<executable name="MSBuild core" exe="${MSBuildPath}\MSBuild.exe" args="OPSB.sln /p:Configuration=Release">
|
||||
<environment name="VCBUILD_DEFAULT_OPTIONS" value="/u"/>
|
||||
<process processor="${checkbuild.pp}"/>
|
||||
</executable>
|
||||
</command>
|
||||
</recipe>
|
||||
<recipe name="Win32-Snapshow">
|
||||
<post-processor name="checkbuild.pp">
|
||||
<regex.pp name="compile.pp">
|
||||
<pattern category="error" expression="\\.[chl]\\([0-9]+\\): error"/>
|
||||
<pattern category="warning" expression="\\.[chl]\\([0-9]+\\): warning"/>
|
||||
</regex.pp>
|
||||
</post-processor>
|
||||
<resource name="Win32" required="true" version="1"/>
|
||||
<command name="Build-Core">
|
||||
<executable name="MSBuild core" exe="${MSBuildPath}\MSBuild.exe" args="OPSB.sln /p:Configuration=Release">
|
||||
<environment name="VCBUILD_DEFAULT_OPTIONS" value="/u"/>
|
||||
<process processor="${checkbuild.pp}"/>
|
||||
</executable>
|
||||
</command>
|
||||
<command name="MakeDist">
|
||||
<executable name="MakeSnap" exe="${base.dir}\\tools\\buildwin32snap.bat" args="${build.revision}"/>
|
||||
<artifact name="OPSB Setup File" file="${base.dir}\\tools\\OPSB-Setup-*.exe"/>
|
||||
</command>
|
||||
</recipe>
|
||||
</project>
|
Reference in a new issue