Skip to content

Instantly share code, notes, and snippets.

@standaloneSA
Created July 17, 2014 22:31
Show Gist options
  • Save standaloneSA/3f02f223d0c7e866f0d9 to your computer and use it in GitHub Desktop.
Save standaloneSA/3f02f223d0c7e866f0d9 to your computer and use it in GitHub Desktop.
all_hosts = [ ]
import redis as _redis
_remHost = "IPADDRESS"
_r = _redis.Redis(host=_remHost, port=6379, db=0, password="PASSWORD")
_setname = "known-hosts"
for _hostname in _r.smembers(_setname):
all_hosts.append(_hostname)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment