python check if ip is up or down April 12, 2023 by wordlinkanswers python check if ip is up or down Comment 1 import nmap, socket<br /> ip_addr = input(‘Enter ip or url to check if it is up or down: ‘)<br /> scanner = nmap.PortScanner()<br /> host = socket.gethostbyname(ip_addr)<br /> scanner.scan(host, ‘1’, ‘-v’)<br /> print(“IP Status: “, scanner[host].state()) Popularity 6/10 Helpfulness 3/10 Language python Source: WorldLinkAnswers Tags: ip python Share Link to this answer Share Contributed on Feb 22 2020 Weeke 0 Answers Avg Quality 2/10