Ok guys, i recently got a keylogger program for my computer its very simple but its only a trial version. The reason i got it was because i wanted to see if anyone else was messing with my computer when i was not around, luckily no one was :D. Naturally i wanted to try to make my own to save me money and just for the fun of it.
So my 2 questions are:
(1) Can i get a console app to run in the background and/or hidden?
(2) How do i get it to log keystrokes?
Thanks for all the help guys!
That is seriously not cool, how could anyone know whether or not you have some nefarious purpose for that keylogger program you're trying to write?
Neway, I'll answer your first question:
(1) That would, to my knowledge be way easier to make with a .bat file, put @Echo off above all comands. ( Note: Thats not C or C++, thats just a batch file, and will only work if you have a Computer running windows, I think )
There is a function that destroys the console, but there is, to the best of my knowledge, no way of preventing the console from flashing up.
write an NT Service program -- if you are using Visual Studio you can write ATL/COM Service. That will install on 2000/XP (maybe 95/98/ME also) and run hidden in the background.
How to write keylogger program -- I don't know. But check out win32 hooks
Ok thanks Ancient Dragon, ill look into that. I think i saw another question around the threads using those hook things. Thanks again.
To Krageon, my intent is to protect my computer. I dont see that as Nefarious at all. Im not asking how to write a virus, im not even asking how to get the keylogger to email the logged keys to me. Im making a program to see who (if anyone) was accessing my computer and what they were doing. I dont see that as bad at all, in fact i see it as a good thing.