mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-12-25 14:38:54 +00:00
commit
9686afcf6f
@ -62,7 +62,7 @@ class HandlerClass(SimpleHTTPRequestHandler):
|
||||
del request[addr_pair]
|
||||
request[addr_pair]=[num,ts]
|
||||
file=open("index.html", "w")
|
||||
file.write("<!DOCTYPE html> <html> <body><center><h1><font color=\"blue\" face=\"Georgia, Arial\" size=8><em>HA</em></font> Webpage Visit Results</h1></center>");
|
||||
file.write("<!DOCTYPE html> <html> <body><center><h1><font color=\"blue\" face=\"Georgia, Arial\" size=8><em>HA</em></font> Webpage Visit Results</h1></center>")
|
||||
for pair in request:
|
||||
if pair[0] == host:
|
||||
guest = "LOCAL: "+pair[0]
|
||||
@ -72,7 +72,7 @@ class HandlerClass(SimpleHTTPRequestHandler):
|
||||
file.write("<p style=\"font-size:150%\" >#"+ str(request[pair][1]) +": <font color=\"red\">"+str(request[pair][0])+ "</font> requests " + "from <<font color=\"blue\">"+guest+"</font>> to WebServer <<font color=\"blue\">"+pair[1]+"</font>></p>")
|
||||
else:
|
||||
file.write("<p style=\"font-size:150%\" >#"+ str(request[pair][1]) +": <font color=\"maroon\">"+str(request[pair][0])+ "</font> requests " + "from <<font color=\"navy\">"+guest+"</font>> to WebServer <<font color=\"navy\">"+pair[1]+"</font>></p>")
|
||||
file.write("</body> </html>");
|
||||
file.write("</body> </html>")
|
||||
file.close()
|
||||
pickle.dump(request,open("pickle_data.txt","w"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user