Keylogging Program - Retreving opened windows title problem

Posted by Rajujrk under C# on 2/25/2010 | Views : 1723 | Status : [Member] | Replies : 4
Hai All,

Currently i am creating a keylogging program using C# in 2005,

I retrieved the Keys typed and Mouse clicks (left and right click) with the x and y coordinates..

But, my problem is to retrieve the opened window titles (Application Title)...

Can any one pls say any way to implement this...

Note: I am not a hacker and this project i am doing is under the cyber security topic...

Pls help me to retreive the window title...

Thanks & Regards

Rajkumar J



Responses

Posted by: Nishithraj on: 2/25/2010 [Member] Bronze

Up
0
Down
youl need APIs for this....take a look at these websites, they should help
you out

http://allapi.net/apilist/GetActiveWindow.shtml
http://allapi.net/apilist/SetWindowText.shtml


Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/25/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
You need to use KeyBoard / Mouse hooks using SetWindowsHookEx API.

See this article :
http://www.codeproject.com/KB/cs/globalhook.aspx

Cheers.

www.abhisheksur.com

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajujrk on: 2/25/2010 [Member] Starter

Up
0
Down
Ya i know this(Global Hook), thru this only i get the Key and Mouse Strokes..

But i need to get the windows title messages.. that means which s currently opened or an active window..

Thanks & Regards

Rajkumar J

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/27/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
I guess in that case you need to get all the processes that have been opened explicitely by the current user.

I think
System.Diagonistics.Process will give you the name of all the processes that is running currently.
I have never tried this before, but getting title messages must not be very normal and easy to do, as it leads to security breaches.



www.abhisheksur.com

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response