I have a great idea about cheating on exams. My school uses very old IDE's ( think Turbo Pascal, Turbo C++ , and other 80's ones ), and the thing I'd like to do is this :
start my program in the background
intercept the keypresses, and instead of sending them directly to the screen, I'd like to read a character from a pre-configured text-file, and send that as the pressed key. This way, no matter what you'll write, the text from that file will get written on the screen.
I found Stephen Toub's article about logging keys, and I think it will serve as a good start on building this "tool
". Is there a better alternative to intercepting all the keys pressed in the system than SetWindowsHookEx
? Will the code be flagged by the antivirus as a suspicious program? If so, is there anything else I can use to accomplish this without being flagged by the antivirus? Will administrator priviledges be required ?
I know some of you guys will say that If I'd put as much interest in learning as I do in avoiding learning, I'd do great, but I'd like to try this out.
EDIT: I've added a bounty, I'm interested in some techniques for capturing keystrokes ( I'm not interested in low-level hooking or advanced stuff - basic ones are fine ), mainly method names and some links to documentation. I'd also like to know if they would appear as malware to an antivirus.