fix variable scope
This commit is contained in:
parent
52b35bd232
commit
3e37001a0e
2 changed files with 29 additions and 28 deletions
4
opsb.c
4
opsb.c
|
@ -49,6 +49,10 @@ static int opsb_set_target_cb( const CmdParams *cmdparams, SET_REASON reason );
|
|||
static int opsb_set_exclusions_cb( const CmdParams *cmdparams, SET_REASON reason );
|
||||
|
||||
Bot *opsb_bot;
|
||||
opsbcfg opsb;
|
||||
list_t *opsbq;
|
||||
list_t *opsbl;
|
||||
list_t *cache;
|
||||
|
||||
/** Copyright info */
|
||||
const char *opsb_copyright[] = {
|
||||
|
|
53
opsb.h
53
opsb.h
|
@ -26,15 +26,14 @@
|
|||
|
||||
#include MODULECONFIG
|
||||
|
||||
typedef struct port_list {
|
||||
int type;
|
||||
int port;
|
||||
int numfound;
|
||||
int numopen;
|
||||
} port_list;
|
||||
|
||||
extern Bot *opsb_bot;
|
||||
|
||||
/* these are some state flags */
|
||||
#define REPORT_DNS 0x0001
|
||||
#define DO_DNS_HOST_LOOKUP 0x0002
|
||||
#define DOING_SCAN 0x0008
|
||||
#define GOTOPENPROXY 0x0010
|
||||
#define OPMLIST 0x0020
|
||||
#define NOOPMLIST 0x0040
|
||||
#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. */
|
||||
|
@ -42,6 +41,13 @@ extern Bot *opsb_bot;
|
|||
/* max no of ports to scan */
|
||||
#define MAX_PORTS 50
|
||||
|
||||
typedef struct port_list {
|
||||
int type;
|
||||
int port;
|
||||
int numfound;
|
||||
int numopen;
|
||||
} port_list;
|
||||
|
||||
typedef struct scaninfo{
|
||||
char who[MAXHOST];
|
||||
int state;
|
||||
|
@ -55,7 +61,7 @@ typedef struct scaninfo{
|
|||
list_t *connections;
|
||||
} scaninfo;
|
||||
|
||||
struct opsb {
|
||||
typedef struct opsbcfg {
|
||||
char targetip[MAXHOST];
|
||||
char openstring[BUFSIZE];
|
||||
int targetport;
|
||||
|
@ -75,22 +81,13 @@ struct opsb {
|
|||
int verbose;
|
||||
int exclusions;
|
||||
list_t *ports;
|
||||
} opsb;
|
||||
|
||||
/* this is the list of items to be queued */
|
||||
list_t *opsbq;
|
||||
/* this is the list of currently active scans */
|
||||
list_t *opsbl;
|
||||
} opsbcfg;
|
||||
|
||||
typedef struct cache_entry {
|
||||
unsigned long ip;
|
||||
time_t when;
|
||||
} cache_entry;
|
||||
|
||||
/* this is a list of cached scans */
|
||||
list_t *cache;
|
||||
|
||||
|
||||
typedef struct proxy_type {
|
||||
int type;
|
||||
char name[MAXNICK];
|
||||
|
@ -99,14 +96,14 @@ typedef struct proxy_type {
|
|||
int numopen;
|
||||
} proxy_type;
|
||||
|
||||
/* these are some state flags */
|
||||
#define REPORT_DNS 0x0001
|
||||
#define DO_DNS_HOST_LOOKUP 0x0002
|
||||
#define DOING_SCAN 0x0008
|
||||
#define GOTOPENPROXY 0x0010
|
||||
#define OPMLIST 0x0020
|
||||
#define NOOPMLIST 0x0040
|
||||
#define FIN_SCAN 0x0080
|
||||
extern Bot *opsb_bot;
|
||||
extern opsbcfg opsb;
|
||||
/* this is the list of items to be queued */
|
||||
extern list_t *opsbq;
|
||||
/* this is the list of currently active scans */
|
||||
extern list_t *opsbl;
|
||||
/* this is a list of cached scans */
|
||||
extern list_t *cache;
|
||||
|
||||
/* opsb.c */
|
||||
int findscan(const void *key1, const void *key2);
|
||||
|
|
Reference in a new issue