a few fixes etc
This commit is contained in:
parent
1e81157328
commit
e56df1f497
4 changed files with 16 additions and 6 deletions
|
@ -4,6 +4,8 @@ Open Proxy Scanning Bot Module for NeoStats Changelog.
|
|||
- Fix a coredump when not enough paramaters supplied to the set command
|
||||
- OPSB checks the excluded server list when a nick joins on straight away, instead of waiting for the DNS lookups to finish :)
|
||||
- Changed some of the levels to 40 (localoper) so localops can use opsb to check sites/users
|
||||
- Bah, really fixed set to not work at all!
|
||||
- Added some stats on cachehits and opm hits
|
||||
|
||||
* 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...
|
||||
|
|
10
opsb.c
10
opsb.c
|
@ -18,7 +18,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: opsb.c,v 1.12 2003/01/18 04:19:12 fishwaldo Exp $
|
||||
** $Id: opsb.c,v 1.13 2003/01/30 11:29:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -322,7 +322,7 @@ int __Bot_Message(char *origin, char **argv, int argc)
|
|||
return 0;
|
||||
}
|
||||
} else if (!strcasecmp(argv[1], "SET")) {
|
||||
if (argc <= 4) {
|
||||
if (argc < 3) {
|
||||
prefmsg(u->nick, s_opsb, "Syntax Error. /msg %s help set", s_opsb);
|
||||
return 0;
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ int do_set(User *u, char **av, int ac) {
|
|||
prefmsg(u->nick, s_opsb, "Configured: %s", (opsb.confed ? "Yes" : "No"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Online(char **av, int ac) {
|
||||
|
@ -615,6 +615,7 @@ int checkcache(scaninfo *scandata) {
|
|||
#ifdef DEBUG
|
||||
log("OPSB: user %s is already in Cache", scandata->who);
|
||||
#endif
|
||||
opsb.cachehits++;
|
||||
if (scandata->u) prefmsg(scandata->u->nick, s_opsb, "User %s is already in Cache", scandata->who);
|
||||
return 3;
|
||||
}
|
||||
|
@ -1013,6 +1014,7 @@ void dnsblscan(char *data, adns_answer *a) {
|
|||
log("Got Positive OPM lookup for %s (%s)", scandata->who, scandata->lookup);
|
||||
#endif
|
||||
scandata->dnsstate = OPMLIST;
|
||||
opsb.opmhits++;
|
||||
do_ban(scandata);
|
||||
checkqueue();
|
||||
} else
|
||||
|
@ -1121,6 +1123,8 @@ void _init() {
|
|||
opsb.cachetime = 3600;
|
||||
opsb.bantime = 86400;
|
||||
opsb.doscan = 1;
|
||||
opsb.cachehits = 1;
|
||||
opsb.opmhits = 1;
|
||||
snprintf(opsb.lookforstring, 512, "*** Looking up your hostname...");
|
||||
snprintf(opsb.scanmsg, 512, "Your Host is being Scanned for Open Proxies");
|
||||
}
|
||||
|
|
4
opsb.h
4
opsb.h
|
@ -4,7 +4,7 @@
|
|||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NetStats CVS Identification
|
||||
** $Id: opsb.h,v 1.7 2002/11/18 13:45:32 fishwaldo Exp $
|
||||
** $Id: opsb.h,v 1.8 2003/01/30 11:29:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -68,6 +68,8 @@ struct opsb {
|
|||
int confed;
|
||||
int cachetime;
|
||||
int doscan;
|
||||
int cachehits;
|
||||
int opmhits;
|
||||
} opsb;
|
||||
|
||||
struct sockinfo {
|
||||
|
|
6
proxy.c
6
proxy.c
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: proxy.c,v 1.11 2002/11/18 13:45:32 fishwaldo Exp $
|
||||
** $Id: proxy.c,v 1.12 2003/01/30 11:29:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -231,6 +231,8 @@ void send_status(User *u) {
|
|||
prefmsg(u->nick, s_opsb, "Proxy Results:");
|
||||
prefmsg(u->nick, s_opsb, "Hosts Scanned: %d Hosts found Open: %d Exceptions %d", opsb.scanned, opsb.open, list_count(exempt));
|
||||
prefmsg(u->nick, s_opsb, "Cache Entries: %d", list_count(cache));
|
||||
prefmsg(u->nick, s_opsb, "Cache Hits: %d", opsb.cachehits);
|
||||
prefmsg(u->nick, s_opsb, "Blacklist Hits: %d", opsb.opmhits);
|
||||
for (i = 0; i < NUM_PROXIES; i++) {
|
||||
prefmsg(u->nick, s_opsb, "Proxy %s (%d) Found %d Open %d", proxy_list[i].type, proxy_list[i].port, proxy_list[i].nofound, proxy_list[i].noopen);
|
||||
}
|
||||
|
@ -241,7 +243,7 @@ void send_status(User *u) {
|
|||
if (scandata->u)
|
||||
prefmsg(u->nick, s_opsb, "Scanning %s by request of %s", scandata->lookup, scandata->u->nick);
|
||||
else
|
||||
prefmsg(u->nick, s_opsb, "Scanning %s (%s)", scandata->lookup, inet_ntoa(scandata->ipaddr));
|
||||
prefmsg(u->nick, s_opsb, "Scanning %s (%s) - %s", scandata->lookup, inet_ntoa(scandata->ipaddr), scandata->who);
|
||||
|
||||
switch(scandata->dnsstate) {
|
||||
case REPORT_DNS:
|
||||
|
|
Reference in a new issue