import nmap
nm = nmap.PortScanner()
nm.scan('162.241.2.243', '21-3389')
nm.command_line()
for host in nm.all_hosts():
print('NMAP scan report for:', host)
print('Host is', nm[host]['status']['state'])
for proto in nm[host].all_protocols():
print('PORT\tSTATE\tSERVICE')
for porta in nm[host][proto]:
aim = nm[host][proto][porta]
print(str(porta) + '/' + proto + '\t' + \
aim['state'] + '\t' + aim['name'])
endereco_mac = nm[host]['addresses']['mac']
print('MAC Address:' + endereco_mac + '(' + \
nm[host]['vendor'][endereco_mac] + ')' + '\n')
print Error: