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

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] DestroyerShells 0.3
« en: 1 Diciembre 2011, 22:09 pm »

Un programa para buscar phpshells en nuestra computadora y poder borrarlas si nos molesta

Código
  1. #!usr/bin/perl
  2. #DestroyerShells 0.3
  3. #Writtten By Doddy H
  4.  
  5. use File::Find;
  6.  
  7. my @nombres = ("C99Shell","r57shell","DxShell","HiddenShell","~ Andr3a92 ~ Sh3ll ~","CShell","Dark Shell","GsC SheLL","N3fa5t1cA Sh3ll","ONBOOMSHELL",
  8. "StAkeR ~ Shell","MoDDeD By KinG-InFeT","31337 Shel");
  9. my @founds;
  10.  
  11. print "\n-- == DestroyerShells 0.3 == --\n";
  12. unless($ARGV[0]) {
  13. print "\n[+] sintax : $0 <dir>\n";
  14. } else {
  15. start($ARGV[0]);
  16. }
  17. print "\n\n[+] Written By Doddy H\n\n";
  18.  
  19. sub start {
  20. my $dir = shift;
  21. print "\n\n[+] Searching in directory $dir\n\n";
  22.  
  23.  
  24. find(\&finder,$dir);
  25.  
  26. sub finder {
  27. my $file = $_;
  28. if(-f $file) {
  29. if ($file =~ /\.txt$/ or $file =~ /\.php$/){
  30. my $abrir = $File::Find::name;
  31.  
  32. open(FILE,$abrir);
  33. my $words = join q(),<FILE>;
  34. close(FILE);
  35.  
  36. for my $rastro(@nombres) {
  37. chomp $rastro;
  38. if ($words=~/$rastro/ig) {
  39. push(@founds,$abrir);
  40. }}}}}
  41.  
  42. my @founda = repes(@founds);
  43.  
  44. print "[+] Number of files found : ".int(@founda)."\n\n";
  45.  
  46. if (int(@founda) ne "0") {
  47. for(@founda) {
  48. print "[+] File Found : $_\n";
  49. }
  50.  
  51. print "\n[+] Delete files y/n : ";
  52. chomp(my $op=<stdin>);
  53.  
  54. if ($op=~/y/ig) {
  55. for(@founda) { unlink($_);}
  56. print "\n[+] Files Deleted\n";
  57. }
  58. elsif ($op=~/n/ig) {
  59. print "\n[+] Good Bye\n";
  60. } else {
  61. print "\n[+] Write good stupid\n";
  62. }
  63. }
  64. }
  65.  
  66. sub repes {
  67. foreach $test(@_) {
  68. push @limpio,$test unless $repe{$test}++;
  69. }
  70. return @limpio;
  71. }
  72.  
  73. # The End ?
  74.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
perl
Scripting
nobo 0 3,203 Último mensaje 22 Febrero 2005, 07:49 am
por nobo
Perl
Scripting
zhynar_X 2 2,231 Último mensaje 12 Enero 2008, 04:36 am
por GroK
-=PERL=-
Scripting
D4RIO 1 5,722 Último mensaje 25 Febrero 2008, 17:27 pm
por D4RIO
MSN Perl y PHP
Scripting
isseu 0 2,677 Último mensaje 30 Diciembre 2008, 14:36 pm
por isseu
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 3,839 Último mensaje 18 Mayo 2011, 21:49 pm
por madpitbull_99
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines