def displayContents(contents, isBase64=False):
'''my hacky way to not display duplicate contents.
for some reason xml sends back to back requests
and i only want to show the first one'''
global LAST_CONTENTS
newContents = sha1(contents).hexdigest()
if LAST_CONTENTS != newContents:
print "[+] Received response, displaying\n"
if not isBase64:
print urllib.unquote(contents)
else:
print urllib.unquote(contents).decode('base64')
LAST_CONTENTS = newContents
print "------\n"
return
评论列表
文章目录