more small bug fixes

1.6
Harmj0y 2016-03-22 14:37:10 -04:00
parent 2a13328c5b
commit d67bbcce15
3 changed files with 2 additions and 10 deletions

View File

@ -380,7 +380,7 @@ class Agents:
if ps_version and ps_version != None:
if type(ps_version) is str:
return sessionKey
return ps_version
else:
return ps_version[0]

View File

@ -613,14 +613,6 @@ def uniquify_tuples(tuples):
return [item for item in tuples if "%s%s%s%s"%(item[0],item[1],item[2],item[3]) not in seen and not seen.add("%s%s%s%s"%(item[0],item[1],item[2],item[3]))]
def urldecode(url):
"""
URL decode a string.
"""
rex=re.compile('%([0-9a-hA-H][0-9a-hA-H])',re.M)
return rex.sub(htc,url)
def decode_base64(data):
"""
Try to decode a base64 string.

View File

@ -411,7 +411,7 @@ class Listeners:
if(listenerId):
cur = self.conn.cursor()
cur.execute('SELECT host,port,cert_path,staging_key,default_delay,default_jitter,default_profile,kill_date,working_hours,listener_type,redirect_target,default_lost_limit FROM listeners WHERE id=? or name=? limit 1', [listenerID, listenerID])
cur.execute('SELECT host,port,cert_path,staging_key,default_delay,default_jitter,default_profile,kill_date,working_hours,listener_type,redirect_target,default_lost_limit FROM listeners WHERE id=? or name=? limit 1', [listenerId, listenerId])
stagingInformation = cur.fetchone()
cur.close()