def printme(self):
     site=self.clientheader.connectHost
     result=""
     result+="Site: "+site+"<br>"
     result+="Port: "+str(self.clientheader.connectPort)+"<br>"
     result+="SSL: "
     if self.clientheader.clientisSSL:
         result+="Yes"
     else:
         result+="No"
         
     result+="<br><br>"
     #constructRequest stolen out of spkproxy
     result+=cgi.escape(daveutil.constructRequest(self.clientheader,self.clientbody))
     result=result.replace("\n","<br>")
     return result
    def printme(self):
        site = self.clientheader.connectHost
        result = ""
        result += "Site: " + site + "<br>"
        result += "Port: " + str(self.clientheader.connectPort) + "<br>"
        result += "SSL: "
        if self.clientheader.clientisSSL:
            result += "Yes"
        else:
            result += "No"

        result += "<br><br>"
        #constructRequest stolen out of spkproxy
        result += cgi.escape(
            daveutil.constructRequest(self.clientheader, self.clientbody))
        result = result.replace("\n", "<br>")
        return result
예제 #3
0
doresponse = 0
target = ""
for o, a in opts:
    if o in ["-f"]:
        target = a
    if o in ["-r"]:
        dorequest = 1
    if o in ["-R"]:
        doresponse = 1

if target == "":
    usage()
clientheader = header()
clientbody = body()
serverheader = header()
serverbody = body()
filename = target
fd = open(filename)
if fd == None:
    print "Bad Filename: %s" % filename
    sys.exit(1)

obj = cPickle.load(fd)
fd.close()
if dorequest:
    print daveutil.constructRequest(obj.clientheader, obj.clientbody)
if doresponse:
    print daveutil.constructResponse(obj.serverheader, obj.serverbody)

#DONE
예제 #4
0
target=""
for o,a in opts:
        if o in ["-f"]:
                target=a
        if o in ["-r"]:
                dorequest=1
        if o in ["-R"]:
                doresponse=1

if target=="":
        usage()
clientheader=header()
clientbody=body()
serverheader=header()
serverbody=body()
filename=target
fd=open(filename)
if fd==None:
        print "Bad Filename: %s"%filename
        sys.exit(1)
        
obj=cPickle.load(fd)
fd.close()
if dorequest:
        print daveutil.constructRequest(obj.clientheader,obj.clientbody)
if doresponse:
        print daveutil.constructResponse(obj.serverheader,obj.serverbody)
        
#DONE