Converts Nmap XML output to csv file, and other useful functions
216
stars
98
forks
source link
I am trying to add port state in your script so that I can list all the ports and able to get the state as well in the final CSV format but somehow getting the error. #2
I have removed the part where you are ignoring the filtered ports and added the below in teh hosts loop after the
service = port.findall('service')[0].attrib['name']
state = port.findall('state')[0].attrib['state']
I have also added the state parameter in the port_data_extend function so that it stored the value of port state and in the csv function as well. But because of some reason I am getting the error .
File "nmap_xml_parser.py", line 60
state = port.findall('state')[0].attrib['state']
^
TabError: inconsistent use of tabs and spaces in indentation.
I have removed the part where you are ignoring the filtered ports and added the below in teh hosts loop after the service = port.findall('service')[0].attrib['name'] state = port.findall('state')[0].attrib['state']
I have also added the state parameter in the port_data_extend function so that it stored the value of port state and in the csv function as well. But because of some reason I am getting the error .
File "nmap_xml_parser.py", line 60 state = port.findall('state')[0].attrib['state'] ^ TabError: inconsistent use of tabs and spaces in indentation.
Any suggestions?