def run_nmap(net): try: out = subprocess.check_output(["nmap", "-oX", "-" , "-R", "-p", "22-443", "-sV" , net]) except CalledProcessError: print("Error in caller\n") exit(1) return out