#!/usr/bin/python3.5 # -*- coding: utf-8 -*- import cgi import cgitb cgitb.enable() import re import configparser from functions.headfoot import printheader,printfooter from functions.htmlsyntaxfc import htmlsyntax # IMPORT DE LA CONFIGURATION config = configparser.ConfigParser() config.read('config.conf') DOMAIN = config.get('general','domain') PROTO = config.get('general','proto') # TRAITEMENT DES DATA fs = cgi.FieldStorage() VHOSTNAME = cgi.escape(fs.getvalue('file')) VHOSTPATH = "/etc/apache2/sites-available/" + VHOSTNAME VHOSTFILE = open(VHOSTPATH, "r") VHOST = VHOSTFILE.read() VHOST = htmlsyntax(VHOST) #VHOST = re.sub('<', '<', VHOST) #VHOST = re.sub('>', '>', VHOST) # AFFICHAGE DES ENTETES printheader() # BODY print('', VHOSTNAME , '') print("
")
print('

', VHOST, '

' ) print('
') print('Retour', sep='') # AFFICHAGE DU FOOTER printfooter()