17 lines
354 B
Python
17 lines
354 B
Python
# -*- mode: python; coding: utf-8 -*-
|
|
#
|
|
# Recuperation des addresses ip des serveurs
|
|
|
|
import socket
|
|
|
|
def pubipof(hostname):
|
|
return socket.gethostbyname(hostname + ".crans.org")
|
|
|
|
def admipof(hostname):
|
|
return socket.gethostbyname(hostname + ".adm.crans.org")
|
|
|
|
def pubip():
|
|
return pubip(pubhostname)
|
|
|
|
def admip():
|
|
return admip(admhostname)
|