[Openvas-commits] r1125 - in trunk/openvas-client: . nessus
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sun Aug 10 22:37:33 CEST 2008
Author: jan
Date: 2008-08-10 22:37:32 +0200 (Sun, 10 Aug 2008)
New Revision: 1125
Modified:
trunk/openvas-client/ChangeLog
trunk/openvas-client/nessus/cli.c
trunk/openvas-client/nessus/cli.h
trunk/openvas-client/nessus/parser.c
trunk/openvas-client/nessus/parser.h
Log:
Removing handling of "PLUGINS_ORDER" command which
is not implemented in the server at all.
It is not used in a senseful way anyway here in the client.
* nessus/parser.h: Remove definition of MSG_PLUGINS_ORDER
* nessus/parser.c (parse_message_type, parse_server_message):
Removed handling of MSG_PLUGINS_ORDER.
* nessus/cli.h (struct cli_args): Removed element plugins_order_table.
* nessus/cli.c (build_plugins_order_table): Removed.
(cli_test_monitor): Removed code element that did not do any useful
things about plugins order.
Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog 2008-08-09 22:35:10 UTC (rev 1124)
+++ trunk/openvas-client/ChangeLog 2008-08-10 20:37:32 UTC (rev 1125)
@@ -1,3 +1,20 @@
+2008-08-10 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+ Removing handling of "PLUGINS_ORDER" command which
+ is not implemented in the server at all.
+ It is not used in a senseful way anyway here in the client.
+
+ * nessus/parser.h: Remove definition of MSG_PLUGINS_ORDER
+
+ * nessus/parser.c (parse_message_type, parse_server_message):
+ Removed handling of MSG_PLUGINS_ORDER.
+
+ * nessus/cli.h (struct cli_args): Removed element plugins_order_table.
+
+ * nessus/cli.c (build_plugins_order_table): Removed.
+ (cli_test_monitor): Removed code element that did not do any useful
+ things about plugins order.
+
2008-08-08 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
* nessus/nmake.w32, nessus/nmake.bat: Removed. These are
Modified: trunk/openvas-client/nessus/cli.c
===================================================================
--- trunk/openvas-client/nessus/cli.c 2008-08-09 22:35:10 UTC (rev 1124)
+++ trunk/openvas-client/nessus/cli.c 2008-08-10 20:37:32 UTC (rev 1125)
@@ -85,70 +85,6 @@
return 1;
}
-
-
-static harglst* build_plugins_order_table(order)
- char * order;
-{
- int num = 0;
- char * t;
- int i = 0;
- int * plugins_order_table_int;
- harglst * plugins_order_table = harg_create(4000);
-
-
- t = order;
-
-
- while((t = strchr(t+1, ';')))num++;
- plugins_order_table_int = emalloc((num+1)*sizeof(int));
- t = order;
- if(num)
- while(t)
- {
- char * next = strchr(t, ';');
- if(next)next[0]=0;
- plugins_order_table_int[i++] = atoi(t);
- if(next)next[0]=';';
- t = next+1;
- next = strchr(next+1, ';');
- if(!next)t = NULL;
- }
-
- /*
- * Now, create the names table
- */
- plugins_order_table = harg_create(num*3 + 1);
-
- for(i=0;i<num;i++)
- {
- struct nessus_plugin * plugs = Context->plugins;
-
- while(plugs != NULL &&
- plugs->id != plugins_order_table_int[i])
- plugs = plugs->next;
-
-
- if( plugs == NULL )
- {
- plugs = Context->scanners;
- while(plugs &&
- plugs->id != plugins_order_table_int[i] )
- plugs = plugs->next;
- }
- if(plugs != NULL ){
- char id[32];
- snprintf(id, sizeof(id), "%d", i+1);
- harg_add_string(plugins_order_table, id, plugs->name);
- efree(&id);
- }
- }
- efree(&plugins_order_table_int);
- return plugins_order_table;
-}
-
-
-
void
cli_sigterm(s)
int s;
@@ -201,11 +137,6 @@
char * plug = NULL;
parse_nessusd_short_status(&(buf[2]), &hostname, &action, ¤t, &max);
- if(cli->plugins_order_table)
- {
- plug = harg_get_string(cli->plugins_order_table, current);
- }
-
if(!strcmp(action, "portscan"))plug="";
printf("%s|%s|%s|%d\n", action,hostname,current,max);
efree(&hostname);
@@ -227,9 +158,6 @@
efree(¤t);
}
break;
- case MSG_PLUGINS_ORDER:
- cli->plugins_order_table = build_plugins_order_table(msg);
- break;
case MSG_FINISHED:
printf("finished|%s||||\n", msg);
break;
Modified: trunk/openvas-client/nessus/cli.h
===================================================================
--- trunk/openvas-client/nessus/cli.h 2008-08-09 22:35:10 UTC (rev 1124)
+++ trunk/openvas-client/nessus/cli.h 2008-08-10 20:37:32 UTC (rev 1125)
@@ -20,7 +20,6 @@
int backend;
int verbose;
int backend_output_func;
- harglst * plugins_order_table;
};
struct cli_args * cli_args_new();
Modified: trunk/openvas-client/nessus/parser.c
===================================================================
--- trunk/openvas-client/nessus/parser.c 2008-08-09 22:35:10 UTC (rev 1124)
+++ trunk/openvas-client/nessus/parser.c 2008-08-10 20:37:32 UTC (rev 1125)
@@ -148,7 +148,6 @@
if(!strcmp(MSG_PORT_STR, type))return(MSG_PORT);
if(!strcmp(MSG_ERROR_STR, type))return(MSG_ERROR);
if(!strcmp(MSG_PING_STR, type))return(MSG_PING);
- if(!strcmp(MSG_PLUGINS_ORDER_STR, type))return(MSG_PLUGINS_ORDER);
if(!strcmp(MSG_FINISHED_STR, type))return(MSG_FINISHED);
if(!strcmp(MSG_BYE_STR, type))return(MSG_BYE);
return(-1);
@@ -375,17 +374,6 @@
network_printf(context->socket, "CLIENT <|> PONG <|> PING <|> CLIENT\n\n");
return MSG_PING;
break;
- case MSG_PLUGINS_ORDER :
- {
- char * t = strstr(buf, " <|> SERVER");
- int tl = strlen(message_type);
- int l = strlen(buf + tl);
- if(t)t[0]=0;
- strncpy(humanmsg, buf+tl+5, l);
- humanmsg[l] = '\0';
- return(MSG_PLUGINS_ORDER);
- }
- break;
case MSG_BYE :
humanmsg[0]=0;
return(MSG_BYE);
Modified: trunk/openvas-client/nessus/parser.h
===================================================================
--- trunk/openvas-client/nessus/parser.h 2008-08-09 22:35:10 UTC (rev 1124)
+++ trunk/openvas-client/nessus/parser.h 2008-08-10 20:37:32 UTC (rev 1125)
@@ -36,7 +36,6 @@
#define MSG_INFO 5
#define MSG_STAT 6
#define MSG_PING 7
-#define MSG_PLUGINS_ORDER 8
#define MSG_FINISHED 9
#define MSG_STAT2 10
#define MSG_NOTE 11
More information about the Openvas-commits
mailing list