Click here to Skip to main content
15,881,700 members
Articles / Programming Languages / C++
Article

Spying on computer usage via keyboard hooks

Rate me:
Please Sign up or sign in to vote.
4.22/5 (8 votes)
22 Sep 20012 min read 103.2K   2.6K   49   12
This program can be used to find out how your computer is being used while you are away.

Introduction

This program can be used to find out how your computer is being used while you are away. After installing, this program stores all the keystrokes and uploads a text file containing these strokes to an FTP site daily.

There are 4 sections to this program as described below. One is the keyboard hook. Second is the text file FTP uploader. The third section deals with looking for a connection to the internet. The last one is the installation program. The four sections are discussed below.

I. The keyboard hook DLL.

The first section of the program is a keyboard hook DLL. There is nothing new in this DLL. The DLL stores all the keystrokes in a text file in the System Folder. This DLL is described in detail in the Keyboard hook DLL article in CodeProject.

II. Uploading a text file to a FTP site

This program simply uploads the text file in the system folder to a FTP site.

III. Looking for connection to the Internet

This program looks for a connection to the 'net. If the connection is found, it calls the program to upload the text file created in section II. This is the main program that executes every time the system starts up. This program installs the keyboard hook and checks the registry to find if a text file has been uploaded today. If not, it sets a timer that checks for a network connection.

IV. Installing the programs in your system

This program installs the 3 sections to your computer. The executables of sections I to III are stored as binary resources. After the first execution of this program, the 3 resource files are stored in the System folder as Servv22.dll, Serv22.exe and Servpost.exe.

I know the description is not as good as it could be, so please check the source files. These really help to show how this program works. I know that there are many faults in this program structure, so please excuse me, as I am still learning VC++.

I welcome your valuable comments about this article.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralCharacters come in different order sometimes Pin
navinkaus19-Jan-06 4:31
navinkaus19-Jan-06 4:31 
GeneralWM_KEYDOWN & WM_KEYUP Pin
Gaiza29-Jan-04 9:47
Gaiza29-Jan-04 9:47 
GeneralKeyboard Hook Pin
percyvimal4-Sep-03 21:13
percyvimal4-Sep-03 21:13 
Generalto hirosh! Pin
Sage_Archer16-Feb-03 2:49
Sage_Archer16-Feb-03 2:49 
hi hirosh
i got a problem here.i own a win xp professional based PC.
it happens i downloaded your program 'computer spy' and ran it on my comp
it got installed but the problem occured when my anti virus s/w detected it and the file spool*.exe(the asterisk is for i dun rememebr wat was the full name for it).
anyways my other programs were running along with it
and yahoo messenger developed a problem. and it shut down with illegal operation. anyways, when i started to reopen it the windows gave me an error that it dint find the file on the given path. i looked and found the file to be at the path. so i restarted the comp, but then when i checked for any executand yahoo messenger developed a problem. and it shut down with illegal operation. anyways, when i started to reopen it the windows gave me an error that it dint find the file on the given path. i looked and found the file to be at the path. so i restarted the comp, but then when i checked for any executable file it doesnt open and i get the same message. the path you given doesnt exist. now the funda is although i can open any applications or program files directly if i open a file of that type than the program runs.
ie. for eg.: if i open ms word direclty it wont open. but if i open a document called for eg. abc.doc it will open ms-word and i can work on it. the same problem is there with evey applications.
one more thing since i am running on win xp, if i do rightclik on any apllication of program and slecet the option 'run as' then it askes me whether to run it underwhich user. when i press ok under the only user id (i got only one user )the program runs. also the antivirus s/w i got is mcafee. but it doesnt detect your other dll files now. i mean when it detected the virus it had detected it in winfile*.dll(again i dun know whtehter it was 64 or 32)
anyways if you htink u know how to solve the problem so mail me back at saggi_sage@yahoo.com
i mean its really pathetic to see my comp runninglike this.
yours truly
Sage. able file it doesnt open and i get the same message. the path you given doesnt exist. now the funda is although i can open any applications or program files directly if i open a file of that type than the program runs.
ie. for eg.: if i open ms word direclty it wont open. but if i open a document called for eg. abc.doc it will open ms-word and i can work on it. the same problem is there with evey applications.
one more thing since i am running on win xp, if i do rightclik on any apllication of program and slecet the option 'run as' then it askes me whether to run it underwhich user. when i press ok under the only user id (i got only one user )the program runs. also the antivirus s/w i got is mcafee. but it doesnt detect your other dll files now. i mean when it detected the virus it had detected it in winfile*.dll(again i dun know whtehter it was 64 or 32)
anyways if you htink u know how to solve the problem so mail me back at saggi_sage@yahoo.com
yours truly
Sage.

QuestionHow to get the Window Title Pin
Anonymous5-Sep-02 10:12
Anonymous5-Sep-02 10:12 
AnswerRe: How to get the Window Title Pin
Carlos Antollini5-Sep-02 10:30
Carlos Antollini5-Sep-02 10:30 
GeneralRe: How to get the Window Title Pin
Anonymous6-Sep-02 3:07
Anonymous6-Sep-02 3:07 
GeneralRe: How to get the Window Title Pin
blongtq7-Aug-03 23:02
blongtq7-Aug-03 23:02 
QuestionI am unable to see the process in task bar ? Pin
5-Jun-02 6:42
suss5-Jun-02 6:42 
QuestionUnHooked when keypressed and window not in focus ? Pin
19-Feb-02 0:27
suss19-Feb-02 0:27 
AnswerRe: UnHooked when keypressed and window not in focus ? Pin
Fordy11-Mar-02 9:42
Fordy11-Mar-02 9:42 
AnswerRe: UnHooked when keypressed and window not in focus ? Pin
Anonymous22-Jul-02 6:45
Anonymous22-Jul-02 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.