attempt to find the cleanlist bug. Also fixed the dnsbl(): Ehhh, something is wrong here bug

This commit is contained in:
fishwaldo 2002-11-05 13:31:59 +00:00
parent 8ef745b4eb
commit f6de66b1ff
7 changed files with 756 additions and 2572 deletions

View file

@ -1,5 +1,9 @@
Open Proxy Scanning Bot Module for NeoStats Changelog.
==============================================================================
* Version 1.0RC3 * 5/11/2002 * Fish
- Fixed a problem when we delete a scanned user out of the active list when the tcp connect had finished, but not the dns bl lookup...
- Attempting to find the cleanlist segv bug
* Version 1.0RC2 * 27/10/2002 * Fish
- Fixed a serious bug with not banning some proxies... ALL USERS SHOULD UPDATE

3298
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -30,6 +30,7 @@ AC_ARG_ENABLE(debug,
[ case "$enableval" in
yes)
CFLAGS="$CFLAGS -ggdb"
AC_DEFINE(DEBUG,1)
AC_MSG_RESULT(yes - Watch your Log Files)
;;
*)

View file

@ -0,0 +1,2 @@
/* define this to enable debug code for this module */
#undef DEBUG

6
opsb.c
View file

@ -18,7 +18,7 @@
** USA
**
** NeoStats CVS Identification
** $Id: opsb.c,v 1.7 2002/10/27 14:38:45 fishwaldo Exp $
** $Id: opsb.c,v 1.8 2002/11/05 13:31:59 fishwaldo Exp $
*/
@ -62,7 +62,7 @@ int online;
Module_Info my_info[] = { {
"OPSB",
"A Open Proxy Scanning Bot",
"1.0RC2"
"1.0RC3"
} };
@ -937,7 +937,7 @@ void dnsblscan(char *data, adns_answer *a) {
scannode = list_find(opsbl, data, findscan);
if (!scannode) {
log("dnsblscan(): Ehhh, Something is wrong here");
log("dnsblscan(): Ehhh, Something is wrong here - Can't find %s", data);
return;
}
scandata = lnode_get(scannode);

4
opsb.h
View file

@ -4,13 +4,15 @@
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
*
** NetStats CVS Identification
** $Id: opsb.h,v 1.5 2002/10/24 09:27:58 fishwaldo Exp $
** $Id: opsb.h,v 1.6 2002/11/05 13:31:59 fishwaldo Exp $
*/
#ifndef OPSB_H
#define OPSB_H
#include "modconfig.h"
typedef struct proxy_types {
char *type;
int port;

13
proxy.c
View file

@ -20,7 +20,7 @@
** USA
**
** NeoStats CVS Identification
** $Id: proxy.c,v 1.8 2002/10/27 14:24:51 fishwaldo Exp $
** $Id: proxy.c,v 1.9 2002/11/05 13:31:59 fishwaldo Exp $
*/
@ -80,7 +80,6 @@ void do_ban(scaninfo *scandata) {
socknode = list_first(scandata->socks);
while (socknode) {
sockdata = lnode_get(socknode);
chanalert(s_opsb, "check %d - %d ", sockdata->flags, OPENPROXY);
if (sockdata->flags != OPENPROXY) {
socknode = list_next(scandata->socks, socknode);
continue;
@ -146,9 +145,17 @@ void cleanlist() {
/* savescan is a flag if we should save this entry into the cache file */
savescan = 1;
/* don't delete if the opm lookup hasn't completed yet */
if ((scandata->dnsstate == DO_OPM_LOOKUP) || (scandata->dnsstate == GET_NICK_IP))
break;
if (scandata->dnsstate == OPMLIST) savescan = 0;
/* if this is not valid, exit (ie, the scan hasn't started yet) */
if (scandata->socks == NULL) break;
if (scandata->socks == NULL) {
log("Ehhh, socks for %s is NULL? WTF?", scandata->who);
break;
}
/* check for open sockets */
socknode = list_first(scandata->socks);
finished = 1;