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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


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


Desconectado Desconectado

Mensajes: 545



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

Bueno , aca les traigo un programa que los ayudara a listar todos los
procesos y cerrar el que quieran
En esta version podran tener una interfaz grafica

Código
  1. #!usr/bin/perl
  2. #Manager (C) Doddy Hackman 2010
  3. #Module neccesary
  4. #ppm install http://trouchelle.com/ppm/Win32-Process-List.ppd
  5.  
  6. use Win32::Process::List;
  7. use Win32::Process;
  8. use Tk;
  9.  
  10. if ($^O eq 'MSWin32') {
  11. use Win32::Console;
  12. Win32::Console::Free();
  13. }
  14.  
  15. $new = MainWindow->new(-background=>"black");
  16. $new->geometry("250x300+20+20");
  17. $new->resizable(0,0);
  18. $new->title("Manager 0.1");
  19. $new->Label(-background=>"black",-foreground=>"green",-font=>"Impact",-text=>"Process")->pack();
  20. my $lists = $new->Listbox(-background=>"black",-foreground=>"green")->place(-y=>"50",-x=>"60");
  21. $new->Button(-background=>"black",-foreground=>"green",-text=>"Close",-activebackground=>"green",-width=>"40",-command=>\&close)->place(-y=>"218");
  22. $new->Button(-background=>"black",-foreground=>"green",-text=>"Refresh",-width=>"40",-activebackground=>"green",-command=>\&refresh)->place(-y=>"240");
  23. $new->Button(-background=>"black",-foreground=>"green",-text=>"About",-width=>"40",-activebackground=>"green",-command=>\&about)->place(-y=>"263");
  24.  
  25. &refresh;
  26.  
  27. MainLoop;
  28.  
  29.  
  30. sub refresh {
  31.  
  32. my @pids;
  33. my @procer;
  34. my $limit;
  35.  
  36. $lists->delete(0.0,"end");
  37.  
  38. my $new = Win32::Process::List->new();  
  39. my %process = $new->GetProcesses();
  40. my $limit = -1;
  41. for my $pid (keys %process) {
  42. $limit++;
  43. push (@procer,$process{$pid});
  44. push (@pids,$pid);
  45. }
  46. print "\n\n[+] ".int(@procer)."\n\n";
  47. for my $n(0..$limit) {
  48. print $procer[$n]."\n";
  49. $lists->insert("end",$procer[$n]);
  50. }
  51.  
  52.  
  53. }
  54.  
  55. sub close {
  56.  
  57. $d = $lists->curselection();
  58.  
  59. for my $id (@$d) {
  60.  
  61. my $proceso = $lists->get($id);
  62.  
  63. my $pida = Win32::Process::List->new();
  64. my @pid = $pida->GetProcessPid($proceso);
  65.  
  66. Win32::Process::KillProcess(@pid[1],$proceso);
  67. &refresh();
  68. }
  69. }
  70.  
  71.  
  72.  
  73. sub about {
  74. $about = MainWindow->new(-background=>"black");
  75. $about->title("About");
  76. $about->geometry("150x100+20+20");
  77. $about->resizable(0,0);
  78. $about->Label(-background=>"black",-foreground=>"green",-font=>"Impact",-text=>"Coded By Doddy H")->pack();
  79. $about->Label(-background=>"black",-foreground=>"green")->pack();
  80. $about->Label(-background=>"black",-foreground=>"green",-font=>"Impact",-text=>"2011")->pack();
  81. }
  82.  
  83.  
  84.  
  85. # ¿ The End ?
  86.  
  87.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Facebook Manager [ Perl ]
Scripting
leogtz 0 2,435 Último mensaje 31 Diciembre 2010, 00:45 am
por leogtz
[Perl] FSD Exploit Manager
Scripting
BigBear 0 1,854 Último mensaje 7 Octubre 2011, 01:14 am
por BigBear
[Perl] Mysql Manager
Scripting
BigBear 0 1,585 Último mensaje 7 Octubre 2011, 01:14 am
por BigBear
[Perl] FTP Manager
Scripting
BigBear 0 1,541 Último mensaje 14 Octubre 2011, 15:25 pm
por BigBear
[Perl] USB Manager 0.2
Scripting
BigBear 0 1,539 Último mensaje 3 Diciembre 2011, 16:34 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines