I'm trying to make some kind of a scanner with python (just for fun)
it will send a get request to an random ip and see if there is any answer the problem is that every time that the connection fails the program will stop running . this is the code
import time import requests ips = open("ip.txt", "r") for ip in ips: r = requests.get(url="http://"+ip+"/",verify=False) print(r.status_code) time.sleep(0.5) this is what i get by trying just a random ip :
requests.exceptions.ConnectionError: HTTPConnectionPool(host='177.0.0.0', port=80): Max retries exceeded with url: