[Tutor] Fwd: Re: Hii

Antonio Arizpe aarizpe448 at gmail.com
Fri Jun 21 18:18:02 EDT 2019


if it cannot escape the simplicity of logging the keyboard as a individual
mechanical entity i can understand that better now because you are right it
all comes down to the OS or the driver handling to even be able to begin
the register of a device.

but i am more than willing to be as basic implementation as i need to be

i only need this to function on windows 7 and 10, 32 and 64 bits
i dont need any specificity to the counter other than the numeric sum of
clicks pressed on the local machine.
as far as this idea goes its very fair to make it as simple as possible.
no VMs, single user, no key logging other than just a number at the end of
the day.

i would just really appreciate it if before shutting down i can open a text
file and it says

2552




On Fri, Jun 21, 2019 at 5:09 PM Alan Gauld via Tutor <tutor at python.org>
wrote:

> On 21/06/2019 14:59, Antonio Arizpe wrote:
>
> > i just need help with a script thats registers keystrikes and adds up all
> > the times you've struck a key and gives a number of the total amount of
> > times the keyboard was struck. nothing specific about characters. just
> how
> > many times it was struck in a real number.
>
> If you only wanted to do this for your own application it would be
> relatively simple but since it seems you want to do it for the
> computer as a whole that raises a whole extra level of complexity.
>
> Some issues to consider:
>
> 1) If this is not just installed on your own personal computer it could
> be illegal - breach of personal privacy legislation in many countries
> prohibits key logging.
>
> 2) Do you care about users logging in remotely? Do you need to just log
> the current user logged in for the current GUI session or do you also
> want to record activity by other remote hosts logging in?
>
> 3) What about virtual machines running on the computer? Do you want to
> capture keystrokes within those VMs? That might be tricky as it may not
> show up in the native OS. It may even depend on the VM the user is running.
>
> 4) Do you care about which user is logged in or do you want to record
> keystrokes for every user of the computer?
>
> 5) Is it only counting for a single session or  for multiple sessions?
> This is more of an application design question that keylogging per se...
>
> Leaving those issues aside and looking only at the keylogging aspects.
> Your best bet is to find a third party module that does it for you.
> Failing that you will need to use the OS facilities which is never a
> trivial exercise. It is also the kind of low level feature that can
> change between OS versions (especially between 32bit and 64bit versions)
>
> If you plan to use it on multiple OS then the technique will likely
> differ between OS - MacOS and Linux may be similar but windows will
> be different.
>
> Let's assume the simplest case where you only want this for personal use
> on a computer where you are the only user and don't run any other OS
> either dual boot or in a VM. in that case you could write a Python
> application that does keylogging and put it in your startup group.
> How you notify it to stop recording before the computer shuts down is
> another issue and how it records/displays its results needs thought too.
>
> On Windows you might need to use ctypes to access the raw Win32 API or
> the PyWwin32 Python package may include functions that will do the job
> for you.
>
> HTH
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list