import honeyd import time import support from htmltmpl import TemplateManager, TemplateProcessor global counter self.send_response(200) self.send_header("Content-Type", "text/html") self.send_nocache() self.end_headers() # Compile or load already precompiled template. template = TemplateManager().prepare(self.root+"/templates/index.tmpl") tproc = TemplateProcessor(0) # Process commands given to us message = support.parse_query(self.query) # Set the title. tproc.set("title", "Honeyd Administration Interface") # Test try: counter += 1 except: counter = 1 greeting = ("Welcome to the Honeyd Administration Interface." "You are visitor %d.
") % counter content = support.interface_table() content += "
" + support.stats_table(self.root) + "
\n" content += "" + support.status_connections(self.root, "tcp") + "
\n" content += "" + support.status_connections(self.root, "udp") + "
\n" side_content = ("
"
"