Index: output.cc =================================================================== --- output.cc (revision 9278) +++ output.cc (working copy) @@ -1228,10 +1228,35 @@ log_flush_all(); } +//A simple helper function for doscaninfo handles the c14n of o.scanflags +static void doscanflags(){ + int vals[]={0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; + char *flags[]={ + "FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECE", "CWR" + }; + if(o.scanflags!=-1){ + log_write(LOG_XML, "scanflags=\""); + if(o.scanflags==0){ + log_write(LOG_XML, "NONE"); + }else if(o.scanflags==255){ + log_write(LOG_XML, "ALL"); + }else if(o.scanflags>0){ + for(int i=0;i<8;i++){ + if(vals[i]==(1<\n"); } @@ -1261,7 +1286,7 @@ if (o.udpscan) doscaninfo("udp", "udp", scanlist->udp_ports, scanlist->udp_count); if (o.ipprotscan) - doscaninfo("ipproto", "ip", scanlist->prots, scanlist->prot_count); + doscaninfo("ipproto", "ip", scanlist->prots, scanlist->prot_count); log_flush_all(); }