Compare commits

...
This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.

5 commits
3.0 ... master

6 changed files with 31 additions and 9 deletions

View file

@ -1,5 +1,14 @@
Open Proxy Scanning Bot Module for NeoStats Changelog.
==============================================================================
* Version 2.6 * 13/2/2007 * Fish (F)
- Fix compile error with newer compilers (F)
* Version 2.5 * 27/02/2005 * Fish (F)
- Fix compile issue with newer compilers (F)
* Version 2.4 * 19/10/2004 * Fish (F)
- Fix OPSB so it will bind to a Local IP address (F)
* 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

4
configure vendored
View file

@ -1299,7 +1299,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
PACKAGE=OPSB
MODULE_MAJOR=2
MODULE_MINOR=3
MODULE_MINOR=5
VERSION=$MODULE_MAJOR.$MODULE_MINOR
cat >>confdefs.h <<_ACEOF
@ -1318,7 +1318,7 @@ _ACEOF
DIRINST=~/NeoStats/
CFLAGS="$CFLAGS -O2 -Wall"
CFLAGS="$CFLAGS -O2 -Wall -fPIC -DPIC"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'

View file

@ -3,14 +3,14 @@ AC_INIT(opsb.c)
AC_CONFIG_HEADER(modconfig.h)
PACKAGE=OPSB
MODULE_MAJOR=2
MODULE_MINOR=3
MODULE_MINOR=5
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"
CFLAGS="$CFLAGS -O2 -Wall -fPIC -DPIC"
dnl Checks for programs.
AC_PROG_CC

View file

@ -90,16 +90,16 @@ OPM_CONFIG_T *libopm_config_create()
break;
case OPM_TYPE_STRING:
(char *) ret->vars[i] = strdup("");
ret->vars[i] = strdup("");
break;
case OPM_TYPE_ADDRESS:
(opm_sockaddr *) ret->vars[i] = MyMalloc(sizeof(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();
ret->vars[i] = libopm_list_create();
break;
default:
ret->vars[i] = NULL;
@ -188,7 +188,7 @@ OPM_ERR_T libopm_config_set(OPM_CONFIG_T *config, int key, void *value)
case OPM_TYPE_STRING:
if((char *) config->vars[key] != NULL)
MyFree(config->vars[key]);
(char *) config->vars[key] = strdup((char *) value);
config->vars[key] = strdup((char *) value);
break;
case OPM_TYPE_INT:

2
opsb.h
View file

@ -32,7 +32,7 @@ extern char s_opsb[MAXNICK];
/* max no of exempt entries */
#define MAX_EXEMPTS 20
/* max no of ports to scan */
#define MAX_PORTS 50
#define MAX_PORTS 250
#define MAXREASON 128

13
proxy.c
View file

@ -116,6 +116,7 @@ int load_ports() {
int init_libopm() {
lnode_t *pn;
port_list *pl;
struct hostent *hp;
scanner = opm_create();
/* setup the callbacks to our code */
@ -125,6 +126,18 @@ int init_libopm() {
opm_callback(scanner, OPM_CALLBACK_END, &scan_end, NULL);
opm_callback(scanner, OPM_CALLBACK_ERROR, &scan_error, NULL);
/* configure opm to bind to a IP address */
if (me.local[0] != 0) {
if ((hp = gethostbyname(me.local)) == NULL) {
nlog(LOG_WARNING, LOG_MOD, "Warning, Couldn't bind OPSB ports to IP address: %s", me.local);
} else {
if (opm_config(scanner, OPM_CONFIG_BIND_IP, &me.local) != OPM_SUCCESS) {
nlog(LOG_WARNING, LOG_MOD, "LIBOPM couldn't bind to a IP address");
}
}
}
/* max number of socks we allow */
opm_config(scanner, OPM_CONFIG_FD_LIMIT, &opsb.socks);
/* host to try to connect to */