SHARE
TWEET

Untitled

a guest Jan 11th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def ip_addresses():
  2.     for interface in netifaces.interfaces():
  3.         addrs = netifaces.ifaddress(interface)
  4.         for x in (netifaces.AF_INET, netifaces.AF_INET6):
  5.             if x in addrs:
  6.                 ip_list.append(addrs[x][0]['addr'])
  7.     return ip_list
  8.  
  9. ALLOWED_HOSTS = ip_addresses()
  10.    
  11. ALLOWED_HOSTS = ip_addresses()
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top