118 |
|
/* Cycle each scanner object */ |
119 |
|
LIST_FOREACH(p, SCANNERS->head) |
120 |
|
{ |
121 |
< |
scs = (struct scanner_struct *) p->data; |
121 |
> |
scs = p->data; |
122 |
|
opm_cycle(scs->scanner); |
123 |
|
} |
124 |
|
} |
257 |
|
/* Setup the protocols */ |
258 |
|
LIST_FOREACH(p2, sc->protocols->head) |
259 |
|
{ |
260 |
< |
pc = (struct ProtocolConf *) p2->data; |
260 |
> |
pc = p2->data; |
261 |
|
|
262 |
|
if(OPT_DEBUG >= 2) |
263 |
|
{ |
280 |
|
/* Give scanners a list of masks they scan */ |
281 |
|
LIST_FOREACH(p, SCANNERS->head) |
282 |
|
{ |
283 |
< |
scs = (struct scanner_struct *) p->data; |
283 |
> |
scs = p->data; |
284 |
|
|
285 |
|
LIST_FOREACH(p2, UserItemList->head) |
286 |
|
{ |
287 |
< |
uc = (struct UserConf *) p2->data; |
287 |
> |
uc = p2->data; |
288 |
|
LIST_FOREACH(p3, uc->scanners->head) |
289 |
|
{ |
290 |
< |
scannername = (char *) p3->data; |
290 |
> |
scannername = p3->data; |
291 |
|
/* Add all these masks to scanner */ |
292 |
|
if(strcasecmp(scannername, scs->name) == 0) |
293 |
|
{ |
294 |
|
LIST_FOREACH(p4, uc->masks->head) |
295 |
|
{ |
296 |
< |
mask = (char *) p4->data; |
296 |
> |
mask = p4->data; |
297 |
|
|
298 |
|
if(OPT_DEBUG) |
299 |
|
{ |
403 |
|
/* Add ss->remote to all matching scanners */ |
404 |
|
LIST_FOREACH(p, SCANNERS->head) |
405 |
|
{ |
406 |
< |
scs = (struct scanner_struct *) p->data; |
406 |
> |
scs = p->data; |
407 |
|
LIST_FOREACH(p2, scs->masks->head) |
408 |
|
{ |
409 |
< |
scsmask = (char *) p2->data; |
409 |
> |
scsmask = p2->data; |
410 |
|
if(!match(scsmask, mask)) |
411 |
|
{ |
412 |
|
if(OPT_DEBUG) |
588 |
|
/* Close all scans prematurely */ |
589 |
|
LIST_FOREACH(node, SCANNERS->head) |
590 |
|
{ |
591 |
< |
scanner = (OPM_T *) ((struct scanner_struct *) node->data)->scanner; |
591 |
> |
scanner = ((struct scanner_struct *)node->data)->scanner; |
592 |
|
opm_end(scanner, ss->remote); |
593 |
|
} |
594 |
|
|
619 |
|
/* Record that a scan happened */ |
620 |
|
scan_log(remote); |
621 |
|
|
622 |
< |
scs = (struct scanner_struct *) data; |
623 |
< |
ss = (struct scan_struct *) remote->data; |
622 |
> |
scs = data; |
623 |
> |
ss = remote->data; |
624 |
|
|
625 |
|
if(ss->manual_target == NULL) |
626 |
|
{ |
677 |
|
/* Record that a scan happened */ |
678 |
|
scan_log(remote); |
679 |
|
|
680 |
< |
scs = (struct scanner_struct *) data; |
681 |
< |
// ss = (struct scan_struct *) remote->data; |
680 |
> |
scs = data; |
681 |
> |
// ss = remote->data; |
682 |
|
|
683 |
|
if(OPT_DEBUG) |
684 |
|
{ |
720 |
|
/* Record that a scan happened */ |
721 |
|
scan_log(remote); |
722 |
|
|
723 |
< |
scs = (struct scanner_struct *) data; |
724 |
< |
// ss = (struct scan_struct *) remote->data; |
723 |
> |
scs = data; |
724 |
> |
// ss = remote->data; |
725 |
|
|
726 |
|
if(OPT_DEBUG) |
727 |
|
{ |
762 |
|
struct scan_struct *ss; |
763 |
|
struct scanner_struct *scs; |
764 |
|
|
765 |
< |
scs = (struct scanner_struct *) data; |
766 |
< |
ss = (struct scan_struct *) remote->data; |
765 |
> |
scs = data; |
766 |
> |
ss = remote->data; |
767 |
|
|
768 |
|
if(OPT_DEBUG) |
769 |
|
log_printf("SCAN -> Scan %s [%s] completed", remote->ip, scs->name); |
796 |
|
struct scan_struct *ss; |
797 |
|
struct scanner_struct *scs; |
798 |
|
|
799 |
< |
scs = (struct scanner_struct *) data; |
800 |
< |
ss = (struct scan_struct *) remote->data; |
799 |
> |
scs = data; |
800 |
> |
ss = remote->data; |
801 |
|
|
802 |
|
switch(err) |
803 |
|
{ |
1055 |
|
/* Add ss->remote to all scanners */ |
1056 |
|
LIST_FOREACH(p, SCANNERS->head) |
1057 |
|
{ |
1058 |
< |
scs = (struct scanner_struct *) p->data; |
1058 |
> |
scs = p->data; |
1059 |
|
|
1060 |
|
/* If we have a scannername, only allow that scanner |
1061 |
|
to be used */ |
1150 |
|
char buf_present[25]; |
1151 |
|
time_t present; |
1152 |
|
struct tm *tm_present; |
1153 |
< |
struct scan_struct *ss = (struct scan_struct *) remote->data; |
1153 |
> |
struct scan_struct *ss = remote->data; |
1154 |
|
|
1155 |
|
if(!(OptionsItem->scanlog && scanlogfile)) |
1156 |
|
return; |