Example #1
0
compare = "none"
if "compare" in form:
    compare = form["compare"]


class SocketSource(socket.socket):
    def read(self, what):
        return self.recv(what, 0)


sock = SocketSource()
sock.connect((profilehost, profileport))

cache = {}
fullprofile = ExtractProfile().extract(sock)
try:
    events = fullprofile[db]["-"].items()
except KeyError:
    for dbname in fullprofile.keys():
        print " [<a href='report.py?db=%s'>%s</a>] " % (dbname, dbname)
        sys.exit(0)

cache[db] = events
cache["_dbs"] = fullprofile.keys()
dbs = cache["_dbs"]

total = fullprofile[db]["-"]["-total"]

#cache.close()
if sort == "name":
Example #2
0
if "limit" in form: limit = int(form["limit"])

compare = "none"
if "compare" in form: compare = form["compare"]


class SocketSource(socket.socket):
    def read(self, what):
        return self.recv(what, 0)


sock = SocketSource()
sock.connect((profilehost, profileport))

cache = {}
fullprofile = ExtractProfile().extract(sock)
events = fullprofile[db]["-"].items()
cache[db] = events
cache["_dbs"] = fullprofile.keys()
dbs = cache["_dbs"]

total = fullprofile[db]["-"]["-total"]

#cache.close()
if sort == "name":
    events.sort(lambda x, y: cmp(x[0], y[0]))
else:
    events.sort(lambda y, x: cmp(x[1][sort], y[1][sort]))


def surl(stype, stext=None, limit=50):
Example #3
0
if "limit" in form: limit=int(form["limit"])

compare="none"
if "compare" in form: compare=form["compare"]

class SocketSource (socket.socket):
    def read(self,what):
        enc = self.recv(what,0)
        return enc.decode('latin-1').encode('utf-8')

sock=SocketSource()
sock.connect((profilehost,profileport))

cache={}
fullprofile=ExtractProfile().extract(sock)
try:
	events=fullprofile[db]["-"].items()
except KeyError:
	"OMG DATABASE DOESNT EXIST OR YOU DIDNT SELECT ONE<br />"
	for dbname in fullprofile.keys():
       		print " [<a href='report.py?db=%s'>%s</a>] "%(dbname,dbname)


cache[db]=events
cache["_dbs"]=fullprofile.keys()
dbs=cache["_dbs"]

total=fullprofile[db]["-"]["-total"]

#cache.close()
Example #4
0
if "prefix" in form:
	prefix=form["prefix"]

if "limit" in form: limit=int(form["limit"])

compare="none"
if "compare" in form: compare=form["compare"]

class SocketSource (socket.socket):
    def read(self,what):
        return self.recv(what,0)
sock=SocketSource()
sock.connect((profilehost,profileport))

cache={}
fullprofile=ExtractProfile().extract(sock)
events=fullprofile[db]["-"].items()
cache[db]=events
cache["_dbs"]=fullprofile.keys()
dbs=cache["_dbs"]

total=fullprofile[db]["-"]["-total"]

#cache.close()
if sort=="name":
    events.sort(lambda x,y: cmp(x[0],y[0]))
else:
    events.sort(lambda y,x: cmp(x[1][sort],y[1][sort]))

def surl(stype,stext=None,limit=50):
	if(stext==None): stext=stype