After your scan:
If that is what you want.
n.scan() returns a dictionary with all info within. If you pprint.pprint() it, you will see how to get all you need.
Sorry for the delay but I am not aware with this module.
for host in np.all_hosts(): for port in np[host].all_tcp(): print("{} => {:<5} {}".format(host, port, np[host]['tcp'][port]['state']))
Output:127.0.0.1 => 4433 open
127.0.0.1 => 4434 open
Here I am scaning ports 22 to 5000If that is what you want.
n.scan() returns a dictionary with all info within. If you pprint.pprint() it, you will see how to get all you need.
Sorry for the delay but I am not aware with this module.