Programming

Simple Keylogger

Posted on April 23, 2009. Filed under: Programming | Tags: , |

I was searching the net for free keyloggers. Then it struck me, why don’t i make one for myself? The real hardcore coders out there use complex stuff like window hooks, interrupts, WM messages, etc.

What I’ve made is a simple keylogger. And, as the name suggests, logs keystrokes. How it records key strokes? Simple. Using the VC++ GetAsyncKeyState() function. Most antivirus and malware detection softwares detect programs that uses hooks, interrupts and stuff. While, they don’t seem to detect the quick and dirty GetAsyncKeyState(). Isn’t it cool?

No, this software was not developed with bad intentions in mind. No one should use such things for personal gains, and password thefts. I developed the program just to be familiar with the area of stealth coding, and to monitor things that happen on my own computer. Security reasons. 

Read Full Post | Make a Comment ( 1 so far )

Neural Network Engine

Posted on April 10, 2009. Filed under: Programming | Tags: , , , , , |

I was bored. And decided to do something about it. It was long time i did something creative. I thought i should brush up on my programming. So, i took my mini-project(Character Recognition Software using Neural Networks), and decided to expand it, generalize it. I’m talking about neural networks. Neural Networks are amazing things. They mimic biological intelligence. And try to identify patterns and process signals the way living beings do.

The neural network that i used is a simple backpropagation neural network, with a single hidden layer. I created a neural network generating, training, and testing engine. It is graphical, and very easy to understand. Its made in VC++ 2008 Express Edition. My software is in it’s initial stage. So, obviously, there will be a lot of bugs in it. You can teach it to identify and/or classify input patterns. Right now, it’s V1.0.

In this version(V1.0), input patterns are Boolean. That is either 1, or 0. Outputs are real numbers. Graphical output is also used. I will try to allow real valued inputs in the open interval [0,1], in future versions.

And since it is demo version, there will not be any file opens/saves involved. All inputs are entered manually on all program loads.

As a simple example, i have included a screenshot of the software below. In this run, i taught the neural network to act as a virtual 2 to 4 binary decoder. In the figure, the engine has completed reading inputs, training of network, testing for one pattern, and has generated the output for that pattern. And the output you see here is for the input pattern = 1,0

0,0 — decodes to -> 1,0,0,0

0,1 — decodes to -> 0,1,0,0

1,0 — decodes to -> 0,0,1,0

1,1 — decodes to -> 0,0,0,1

Neural Network Engine

Neural Network Engine

 

Neural Network Info(Current version)

Type : Simple 3-layer back-propagation network

Threshold function used : Sigmoid function f(x)=1/(1+e^(-x)) 

Number of layers : Input+Hidden+Output = 3

Current Version’s Maximum Capacity : 300 nodes/layer

Compiler : VC++ 2008 Express Edition

Memory Allocation : Static

Default network values are of the one used in my character recognition software. You can change the values to suit your requirements, and press the ‘create’ , and ‘initialize’ button to create new network.

Read Full Post | Make a Comment ( 2 so far )

Mouse in TC++

Posted on April 24, 2008. Filed under: Programming | Tags: , , , , , , |

Want to use mouse in C/C++ in DOS ? This section gives the basics to use a mouse in the 16-bit DOS world using C. The graphics mode used here is 640x480x16 color.

We use the int86() function to handle interrupts. Lets start. Put the declarations below first in your mouse header file.

REGS I,O;

SREGS s;

int visible,state;

1. To initialize the mouse, the function reset is defined as follows.

int reset()
{
I.x.ax=0;visible=0;
int86(0x33,&I,&O);
return 1;
}

2. To show the mouse pointer

void show()
{
if(!visible)
{
visible=1;
I.x.ax=1;
int86(0x33,&I,&O);
}
}

3. To hide…

void hide()
{
if(visible)
{
visible=0;
I.x.ax=2;
int86(0x33,&I,&O);
}
}

4. Get status. Returns 0 for no event, 1 for left click, and 2 for right click

int status()
{
I.x.ax=3;
int86(0x33,&I,&O);
return O.x.bx;
}

5. Get X and Y coordinates

int x()
{
I.x.ax=3;
int86(0x33,&I,&O);
return O.x.cx;
}

int y()
{
I.x.ax=3;
int86(0x33,&I,&O);
return O.x.dx;
}

6. Restricting pointer to (x1,y1) – (x2,y2)

void restrict(int x1,int y1,int x2,int y2)
{
I.x.ax=7;
I.x.cx=x1;
I.x.dx=x2;
int86(0x33,&I,&O);
I.x.ax=8;
I.x.cx=y1;
I.x.dx=y2;
int86(0x33,&I,&O);
}

7. Placing pointer at a coordinate (x,y)

void place(int x,int y)
{
I.x.ax=4;
I.x.cx=x;
I.x.dx=y;
int86(0x33,&I,&O);
}

Now the mouse can be initialised by the following calls…

mouse.reset();
mouse.show();

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...