Flash Drive Keylogger help

Pages: 12
homi wasn't giving you functional code there, the variables 'n' and 'l' aren't even declared. He was demonstrating how you would setup a counter to determine when to flush the buffer. The only change I would make is at Line 13, IMHO it should be if(count >= 10000) since "count" will undoubtedly be tied to the input stream somehow and you have no way of guaranteeing that you will land exactly on 10,000.

None of that matters though since "SetWindowsHookEx()": http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx is the proper way to do this and you should write a DLL for what you are trying to do.
i dont know exactly how to make a dll and i like my code. i just need a way it can pick up all keystrokes in a usb. plus i dont like using other peoples programs.

so i should replace fprintf with setwindowshookEx?
so i should replace fprintf with setwindowshookEx?
... You could do that, it will accomplish absolutely nothing though since neither function is in anyway related. If you're not going to learn how to write a DLL then you can forget about "SetWindowhookEx()" since it won't help you. You do realize though that your program as it stands pins the CPU it's on at 50-100% and one look at task manager will tell them exactly what process to kill right?
unless i rename it to something that may seem important
Unimportant process should seem unimportant, not like they are occupying an entire CPU core and vomiting errors when a thumb drive is removed. I'm just pointing out a flaw that you may want to address later down the line, that's all.
so what should i do to make the keylogger pick up all the keystrokes in a flash drive?

and how can you make it send you the log my e-mail?

thanks for the responses.
Why would you want the file both on the thumb drive and in your Email? Doesn't that seem redundant? Anyway don't bother with Email, FTP is the way to go. When the application exits, i.e. when the user is logging off\shutting down, have it upload to the FTP site using one of the libs the other users mentioned. Until then write your log file to the local disk in order to eliminate the lag from having to write to a thumb drive.

You should realize that an application is not a script, once it's loaded into memory you could take the thumb drive out with no detriment to it's performance as long as it isn't still talking to the thumb drive.
can you give me a sample code with the lib?
It was already suggested to you to use libcurl to send email via SMTP protocol, there is a working example on curl website. What you want more ? Somebody to write the code for you ? Possible, if you pay for it .....
Last edited on
i was just asking for a random example.
like i said before, i dont like using other people's software
Topic archived. No new replies allowed.
Pages: 12