Skip to content

Instantly share code, notes, and snippets.

@shanehull
Last active September 12, 2017 00:56
Show Gist options
  • Save shanehull/d38c7284ee972db0a883f01b2f7544f5 to your computer and use it in GitHub Desktop.
Save shanehull/d38c7284ee972db0a883f01b2f7544f5 to your computer and use it in GitHub Desktop.
import requests
payload = {"settings":{"control_notifications":2}}
while True:
for ip in range (1, 255):
try:
print("working on 172.16.31.{}".format(ip))
response = requests.post("http://172.16.31.{}:8008/setup/set_eureka_info".format(ip), json=payload, timeout=1.0)
if response.ok:
print("ok")
else:
print("failed")
print(response.status)
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment