def nexport_xml(xml, index, eshost, esport): ms = Nmap('x', 'xml/' + xml, 'y') ms.import_es(index, eshost, esport)
def nscanlst(hostfile, ports, xml, index, eshost, esport, noin): ms = Nmap(hostfile, 'xml/' + xml, ports) ms.runfile() if noin == False: ms.import_es(index, eshost, esport) print ms.output