add option to use global exclude list
This commit is contained in:
parent
7dfa0231f3
commit
bf6b2ba1fc
4 changed files with 19 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
Open Proxy Scanning Bot Module for NeoStats Changelog.
|
||||
==============================================================================
|
||||
3.0.a2-dev - 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)
|
||||
|
|
10
opsb.c
10
opsb.c
|
@ -312,6 +312,15 @@ int do_set_cb (CmdParams* cmdparams, SET_REASON reason)
|
|||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
static int opsb_set_exclusions_cb( CmdParams *cmdparams, SET_REASON reason )
|
||||
{
|
||||
if( reason == SET_LOAD || reason == SET_CHANGE )
|
||||
{
|
||||
SetAllEventFlags( EVENT_FLAG_USE_EXCLUDE, opsb.exclusions );
|
||||
}
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
static bot_cmd opsb_commands[]=
|
||||
{
|
||||
{"STATUS", opsb_cmd_status, 0, NS_ULEVEL_OPER, opsb_help_status, opsb_help_status_oneline},
|
||||
|
@ -336,6 +345,7 @@ static bot_setting opsb_settings[]=
|
|||
{"SCANMSG", &opsb.scanmsg, SET_TYPE_MSG, 0, BUFSIZE, NS_ULEVEL_ADMIN, NULL, opsb_help_set_scanmsg, do_set_cb, (void*)"Your Host is being Scanned for Open Proxies" },
|
||||
{"CACHETIME", &opsb.cachetime, SET_TYPE_INT, 0, 86400, NS_ULEVEL_ADMIN, NULL, opsb_help_set_cachetime, do_set_cb, (void*)3600 },
|
||||
{"VERBOSE", &opsb.verbose, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, NULL, opsb_help_set_verbose, do_set_cb, (void*)1 },
|
||||
{"EXCLUSIONS", &opsb.exclusions, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN,NULL, opsb_help_set_exclusions, opsb_set_exclusions_cb, (void *)0 },
|
||||
{NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
|
|
2
opsb.h
2
opsb.h
|
@ -82,6 +82,7 @@ struct opsb {
|
|||
int opmhits;
|
||||
int doakill;
|
||||
int verbose;
|
||||
int exclusions;
|
||||
list_t *ports;
|
||||
} opsb;
|
||||
|
||||
|
@ -159,5 +160,6 @@ extern const char *opsb_help_set_scanmsg [];
|
|||
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[];
|
||||
|
||||
#endif /* OPSB_H */
|
||||
|
|
|
@ -159,6 +159,12 @@ const char *opsb_help_set_verbose [] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
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",
|
||||
|
|
Reference in a new issue