diff --git a/etc/python/ip.py b/etc/python/ip.py new file mode 100644 index 0000000..5683d46 --- /dev/null +++ b/etc/python/ip.py @@ -0,0 +1,17 @@ +# -*- mode: python; coding: utf-8 -*- +# +# Recuperation des addresses ip des serveurs + +import socket + +def pubipof(hostname): + socket.gethostbyname(hostname + ".crans.org") + +def admipof(hostname): + socket.gethostbyname(hostname + ".adm.crans.org") + +def pubip(): + pubip(pubhostname) + +def admip(): + admip(admhostname)