Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Nessus: commits

nessus-core/nessus attack.c, 1.14, 1.14.12.1 comm.c, 1.65.2.4, 1.65.2.5 monitor_dialog.c, 1.68.2.3, 1.68.2.4 preferences.c, 1.53.2.2, 1.53.2.3

 

 

Nessus commits RSS feed   Index | Next | Previous | View Threaded


renaud at nessus

Sep 28, 2006, 6:55 AM

Post #1 of 1 (620 views)
Permalink
nessus-core/nessus attack.c, 1.14, 1.14.12.1 comm.c, 1.65.2.4, 1.65.2.5 monitor_dialog.c, 1.68.2.3, 1.68.2.4 preferences.c, 1.53.2.2, 1.53.2.3

Update of /usr/local/cvs/nessus-core/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv80796

Modified Files:
Tag: NESSUS_2_2
attack.c comm.c monitor_dialog.c preferences.c
Log Message:
various bug fixes

Index: attack.c
===================================================================
RCS file: /usr/local/cvs/nessus-core/nessus/attack.c,v
retrieving revision 1.14
retrieving revision 1.14.12.1
diff -u -d -r1.14 -r1.14.12.1
--- attack.c 26 Aug 2002 18:58:03 -0000 1.14
+++ attack.c 28 Sep 2006 13:55:51 -0000 1.14.12.1
@@ -80,9 +80,9 @@
* Set up the plugin list, according to the
* Nessus Transfer Protocol version 1.1
*/
- plug_list = emalloc(num_plug*50+1+num_scanners*50+1);
+ plug_list = emalloc(num_plug*20+1+num_scanners*20+1);
setup_plug_list(Plugins, Scanners, plug_list);
- if(!strlen(plug_list))sprintf(plug_list, "0");
+ if(plug_list[0] == '\0' ) sprintf(plug_list, "0");

serv_prefs = arg_get_value(preferences, "SERVER_PREFS");
if(arg_get_value(serv_prefs, "plugin_set"))
@@ -147,9 +147,9 @@
* Set up the plugin list, according to the
* Nessus Transfer Protocol version 1.1
*/
- plug_list = emalloc(num_plug*50+1+num_scanners*50+1);
+ plug_list = emalloc(num_plug*20+1+num_scanners*20+1);
setup_plug_list(Plugins, Scanners, plug_list);
- if(!strlen(plug_list))sprintf(plug_list, "0");
+ if(plug_list[0] == '\0')sprintf(plug_list, "0");

serv_prefs = arg_get_value(preferences, "SERVER_PREFS");
if(arg_get_value(serv_prefs, "plugin_set"))
@@ -210,25 +210,23 @@
{
struct arglist * w = NULL;
int i = 0;
+ char * s = plug_list;

for(i=0;i<2;i++)
{
- if(!w)w = plugs;
- else {
- w = scanners;
- }
+ if( w == NULL )w = plugs;
+ else w = scanners;
+

while(w && w->next)
{
- char * sp;
+ char sp[16];

if(plug_get_launch(w->value))
{
- sp = emalloc(9);
- sprintf(sp, "%d", (int)arg_get_value(w->value, "ID"));
- strcat(plug_list, sp);
- efree(&sp);
- strcat(plug_list, ";");
+ snprintf(sp, sizeof(sp), "%d;", (int)arg_get_value(w->value, "ID"));
+ memcpy(plug_list, sp, strlen(sp) + 1);
+ plug_list += strlen(sp);
}
w = w->next;
}

Index: comm.c
===================================================================
RCS file: /usr/local/cvs/nessus-core/nessus/comm.c,v
retrieving revision 1.65.2.4
retrieving revision 1.65.2.5
diff -u -d -r1.65.2.4 -r1.65.2.5
--- comm.c 22 Sep 2006 20:28:30 -0000 1.65.2.4
+++ comm.c 28 Sep 2006 13:55:52 -0000 1.65.2.5
@@ -47,6 +47,7 @@
extern int F_quiet_mode;

int comm_send_file(char*);
+static int cli_send_prefs_arglist(struct arglist*, harglst **, int );

/*
* Parses a plugin description message, and returns an arglist with the
@@ -422,7 +423,7 @@
if(arg_get_type(plugs_prefs, pref) < 0)
{
char * x = strchr(v, ';');
- if(!ListOnly && x )x[0] = '\0';
+ if(!ListOnly && strstr(v, "[radio]") != NULL && x != NULL )x[0] = '\0';
arg_add_value(plugs_prefs, pref, ARG_STRING, strlen(v), v);
}
}

Index: monitor_dialog.c
===================================================================
RCS file: /usr/local/cvs/nessus-core/nessus/monitor_dialog.c,v
retrieving revision 1.68.2.3
retrieving revision 1.68.2.4
diff -u -d -r1.68.2.3 -r1.68.2.4
--- monitor_dialog.c 7 Sep 2005 09:50:22 -0000 1.68.2.3
+++ monitor_dialog.c 28 Sep 2006 13:55:52 -0000 1.68.2.4
@@ -105,7 +105,7 @@
{
fd_set rd;
struct timeval tv = {0,100};
- int n, soc;
+ int n, soc = -1;
if(GlobalSocket < 0)
{
fprintf(stderr, "idle_socket: GlobalSocket=%d\n", GlobalSocket);

Index: preferences.c
===================================================================
RCS file: /usr/local/cvs/nessus-core/nessus/preferences.c,v
retrieving revision 1.53.2.2
retrieving revision 1.53.2.3
diff -u -d -r1.53.2.2 -r1.53.2.3
--- preferences.c 21 Jan 2005 15:13:52 -0000 1.53.2.2
+++ preferences.c 28 Sep 2006 13:55:52 -0000 1.53.2.3
@@ -306,7 +306,10 @@
while(t[0]==' ' && t[0])t+=sizeof(char);
if(!t[0])return(1);
/* remove the spaces after the pref name */
- while(opt[strlen(opt)-1]==' ')opt[strlen(opt)-1]=0;
+ if ( strchr(buffer, '[') == NULL && strchr(buffer, ']') == NULL )
+ while(opt[strlen(opt)-1]==' ')opt[strlen(opt)-1]=0;
+ else
+ if ( opt[strlen(opt)-1]==' ') opt[strlen(opt)-1]=0;

/* char to int conversion if necessary */
if(!strcmp(t, "yes"))val = 1;

_______________________________________________
Nessus-cvs mailing list
Nessus-cvs [at] list
http://mail.nessus.org/mailman/listinfo/nessus-cvs

Nessus commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.