Página 1 de 1

KeyStroke Emulator

Publicado: 27 Feb 2011, 19:04
por m4rtyr

Código: Seleccionar todo

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

char mensage[]="http://indetectables.net/foro - m4rtyr \r\n";

void DynamicDelay()
{
srand(GetTickCount());
Sleep(rand()%300);
}

BOOL CALLBACK notepad(HWND hwnd, LPARAM lpParam)
{
	char szClassName[50] = {0}; //buffer (memoria) para el classname
	GetClassName(hwnd, szClassName, sizeof(szClassName)); //obtener el classname en szClassName
	if(strstr(szClassName, "Notepad")!=NULL) // busca el nombre en el szClassName
	{

		BringWindowToTop(hwnd);
		SetForegroundWindow(hwnd);
		SetFocus(hwnd);

		hwnd=GetDlgItem(hwnd, 15); // poner el window handle de control de escrituria
			if(hwnd!=NULL)
			{
				for(int i=0;i<strlen(mensage);i++)
				{	
					SendMessage(hwnd,WM_CHAR,mensage[i],0); //manda los virtual keys (chars) a la ventana de notepad
					DynamicDelay();

				}
				return false;
			}
	}
		return true;
}


void main()
{
	WinExec("notepad.exe",1);
	while(EnumWindows(notepad,0))Sleep(500);
}
lista de virtual keys [Enlace externo eliminado para invitados]
Saludos ;)

Re: KeyStroke Emulator

Publicado: 27 Feb 2011, 22:36
por ØnLy
Este code si que me gusto , se parece a uno mio....
Muy Ordenado , limpio y util