Index: nmap_wrapper.c =================================================================== RCS file: /usr/local/cvs/nessus-plugins/plugins/nmap_wrapper/nmap_wrapper.c,v retrieving revision 1.22 retrieving revision 1.24 diff -c -r1.22 -r1.24 *** nmap_wrapper.c 2000/03/28 12:26:54 1.22 --- nmap_wrapper.c 2000/03/31 13:48:59 1.24 *************** *** 383,393 **** --- 383,411 ---- Open port --------------------------------------------------------------------*/ + if(!strstr(line, "open"))return; t = strchr(line, ' '); if(!t)return; t[0] = 0; num = atoi(line); if(!num)return; + if(strchr(line, '/')) + { + char * f = strchr(line, '/'); + printf("%s\n", line); + protocol = f+sizeof(char); + t = t+sizeof(char); + /* + * t now points on " open " + */ + printf("t : %s\n", t); + while((t[0]==' ')||(t[0]=='\t'))t+=sizeof(char); + t = strchr(t, ' '); + while((t[0]==' ')||(t[0]=='\t'))t+=sizeof(char); + printf("t : %s\n", t); + } + else + { line = t+sizeof(char); while(line[0]==' ' && line[0])line+=sizeof(char); if(!line[0])return; *************** *** 400,409 **** t[0] = 0; t+=sizeof(char); protocol = line; if(strcmp(protocol, "tcp")&&strcmp(protocol, "udp"))return; scanner_add_port(env, num, protocol); ! while(t[0] && t[0]==' ')t+=sizeof(char); /* * t now points on the service --- 418,429 ---- t[0] = 0; t+=sizeof(char); protocol = line; + while((t[0]==' ')||(t[0]=='\t'))t+=sizeof(char); + } if(strcmp(protocol, "tcp")&&strcmp(protocol, "udp"))return; scanner_add_port(env, num, protocol); ! /* * t now points on the service