Read keyboard in console application: a special case !

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2006
Posts: 49
Reputation: sivaslieko++ is an unknown quantity at this point 
Solved Threads: 0
sivaslieko++ sivaslieko++ is offline Offline
Light Poster

Read keyboard in console application: a special case !

 
0
  #1
Sep 10th, 2008
Hi everybody,

I have been writing a windows console application in c#. I want it to read all keys pressed and write them all into a text file when a specific window is active in windows xp environment. Now, I can find the active window, but I failed to read keys entered when the intended window is active. ConsoleKey does not work..

Any recommendation?

Thanks..
You see things; and you say 'Why?' But I dream things that never were; and I say 'Why not'
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Read keyboard in console application: a special case !

 
0
  #2
Sep 10th, 2008
No it wouldnt, however, this sounds distinctly like a keylogger which is unfair and illegal and bad practice in many ways, there are ways to do it, but, Id be interested in the business justification of it before parting with anything like how to start doing it
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 49
Reputation: sivaslieko++ is an unknown quantity at this point 
Solved Threads: 0
sivaslieko++ sivaslieko++ is offline Offline
Light Poster

Re: Read keyboard in console application: a special case !

 
0
  #3
Sep 10th, 2008
I understand LizR. However, this is must for my master-thesis

I need to store all messages during the chat sessions among users. And my solution is to store keyboard entries when the chat window of the intended program is active. I could not think of any other solution...

I appreciate any help..
Best Regards
You see things; and you say 'Why?' But I dream things that never were; and I say 'Why not'
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,728
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 737
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Read keyboard in console application: a special case !

 
1
  #4
Sep 10th, 2008
>I need to store all messages during the chat sessions among users.
Is this some ad hoc chat program that doesn't support logging?
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Read keyboard in console application: a special case !

 
0
  #5
Sep 10th, 2008
I can, but to be honest, your thesis doesnt make it a legal thing.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 49
Reputation: sivaslieko++ is an unknown quantity at this point 
Solved Threads: 0
sivaslieko++ sivaslieko++ is offline Offline
Light Poster

Re: Read keyboard in console application: a special case !

 
0
  #6
Sep 10th, 2008
I'm trying to improve the intended tool with some complementary features. Currently and unfortunately, it does not support logging of chat sessions. And also its API does not provide such a capability.

If I could program what I want then I will do what is required for legacy.. Also I appreciate any help about legacy..

Thanks for your time..
So, what should I do?
You see things; and you say 'Why?' But I dream things that never were; and I say 'Why not'
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Read keyboard in console application: a special case !

 
0
  #7
Sep 10th, 2008
As a side comment, Im not sure how logging an IM is going to ever form part of a thesis, however, surely writing a new IM that takes the current one and improves on it by adding the functionality you want is a far better use of all as users can then log, should they want, in a legal and healthy manner.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 49
Reputation: sivaslieko++ is an unknown quantity at this point 
Solved Threads: 0
sivaslieko++ sivaslieko++ is offline Offline
Light Poster

Re: Read keyboard in console application: a special case !

 
0
  #8
Sep 10th, 2008
Actually, I like that idea, coding a new IM for the existing software tool, but I am not sure that my thesis-advisor will love it
And also, I am not sure I could write a new IM in a integration with the existing software... this is the other question in my mind.

LizR, as far as I understand, you absolutely did not suggest to save chat-session by reading keyboard, even if I find a way to obey legal issues.

Thaks a lot..
Best Regards..
You see things; and you say 'Why?' But I dream things that never were; and I say 'Why not'
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 49
Reputation: sivaslieko++ is an unknown quantity at this point 
Solved Threads: 0
sivaslieko++ sivaslieko++ is offline Offline
Light Poster

Re: Read keyboard in console application: a special case !

 
0
  #9
Sep 10th, 2008
Meanwhile,
When I searched through the internet with "c# keylogger" keyword, then it returns lots of results in official sites and forums.
I think its legal issues is related to your purposes. Once you've defined your problem statement and purpose for using keylogger application officially, then it is ok..

What is yours oppinion about that issue?
Best Regards.
You see things; and you say 'Why?' But I dream things that never were; and I say 'Why not'
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,728
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 737
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Read keyboard in console application: a special case !

 
1
  #10
Sep 10th, 2008
>What is yours oppinion about that issue?
I think this is identical to discussion of writing a virus for instructional purposes. The direct intention may be benign, but ultimately it's so prone to being used illegally that Daniweb's rules come into play. Thus, discussion of keylogger implementation is prohibited.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC