config.py
来自「honeyd1.0的源代码 希望对大家有用」· Python 代码 · 共 32 行
PY
32 行
import timeimport supportfrom htmltmpl import TemplateManager, TemplateProcessorself.send_response(200)self.send_header("Content-Type", "text/html")self.send_nocache()self.end_headers()# Process commands given to usmessage = support.parse_query(self.query)# Compile or load already precompiled template.template = TemplateManager().prepare(self.root+"/templates/index.tmpl")tproc = TemplateProcessor(0)# Set the title.tproc.set("title", "Honeyd Configuration Interface")content = "Welcome to the Honeyd Configuration Interface.<p>"content += support.config_table()content += "<p>"content += support.config_ips(self.root)if message: tproc.set("message", message)tproc.set("content", content)tproc.set("uptime", support.uptime())# Print the processed template.self.wfile.write(tproc.process(template))
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?