Recuperation des ips.

darcs-hash:20071220231137-af139-2453c8df5dc851d0f763b54551a958ae581e62cd.gz
This commit is contained in:
Jeremie Dimino 2007-12-21 00:11:37 +01:00
parent bc497640a9
commit ec6b3c8c23

17
etc/python/ip.py Normal file
View file

@ -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)