Menu

#7 Does not log keystrokes when win titles contain '»' or '›'

closed-fixed
nanotube
None
5
2007-08-21
2007-08-11
Anonymous
No

When windows titles contain '»' or '›' the following error is logged:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xbb in position 31: ordinal not in range(128)
Traceback (most recent call last):
File "pyHook\HookManager.pyc", line 351, in KeyboardSwitch
File "keylogger.pyw", line 45, in OnKeyboardEvent
File "logwriter.pyc", line 126, in WriteToLogFile
File "logwriter.pyc", line 395, in OpenLogFile
File "ntpath.pyc", line 102, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9b in position 31: ordinal not in range(128)
Traceback (most recent call last):
File "pyHook\HookManager.pyc", line 351, in KeyboardSwitch
File "keylogger.pyw", line 45, in OnKeyboardEvent
File "logwriter.pyc", line 126, in WriteToLogFile
File "logwriter.pyc", line 395, in OpenLogFile
File "ntpath.pyc", line 102, in join
==============
and no output file is created:
A workaround to this problem is specifiying a sigle log file:
One File = Sample_Keys.log
then no error appears.
---
I do not know Python but I believe you must somehow filter those characters maybe in
pykeylogger-0.8.1\logwriter.py Line 61 ?
self.filter = re.compile(r"[\\\/\:\*\?\"\<\>\|]+") #regexp filter for the non-allowed characters in windows filenames.
---
Thanks for providing this useful piece of software and keep up the good work!

Discussion

  • Nobody/Anonymous

    Logged In: NO

    You can reproduce this bug (this is how I firstly spotted it) by visiting
    http://www.ngtech.gr/blog/en/net_www/looking-inside-the-wordpress-db-2007-08-09.html
    using Firefox which will display the window title:
    [www.ngtech.gr » Looking inside the WordPress DB]
    and try to capture anything entered in the comments box :-(

     
  • nanotube

    nanotube - 2007-08-12

    Logged In: YES
    user_id=1173666
    Originator: NO

    thanks for your bugreport.
    it seems that the problem is in the os.path.join, which attempts to coerce its argument strings into ascii.
    i'll play around with it. :)

     
  • nanotube

    nanotube - 2007-08-21
    • assigned_to: nobody --> nanotube
    • status: open --> closed-fixed
     
  • nanotube

    nanotube - 2007-08-21

    Logged In: YES
    user_id=1173666
    Originator: NO

    This bug should be fixed in release 0.8.2.
    Please test and report if that is not the case.
    Thank you for your bug report!

     

Log in to post a comment.