Código
#!usr/bin/perl #Manager 0.3 #Written By Doddy H use Color::Output; Color::Output::Init; use Win32::Process; &clean; &options; sub clean { cprint "\x0313"; "\nManager 0.3\nCopyright 2012 Doddy Hackman\nMail:lepuke[at]hotmail[com]\n\n"; cprint "\x0x30\n\n"; my %process = getprocess(); $limit = ""; if ( $pid ne "" ) { $limit++ } } $limit--; for my $n ( 1 .. $limit ) { cprint "\x037"; "Process Number: [$n]\tProcess name : $procer[$n]\tPID : $pids[$n]\n"; cprint "\x037"; } } sub options { cprint "\0035"; "\n\nOptions :\n\n[a] : Close a process\n[b] Clean Console\n[c] Exit\n\n\n[+] Write you options : "; $t = <STDIN>; if ( $t eq "a" ) { &close; } elsif ( $t eq "b" ) { reload(); } elsif ( $t eq "c" ) { <stdin>; } else { reload(); } } $numb = <STDIN>; Win32::Process::KillProcess( @procer[$numb], "" ); <stdin>; reload(); } sub reload { &clean; &options; } sub getprocess { my %procesos; my $uno = Win32::OLE->new("WbemScripting.SWbemLocator"); my $dos = $uno->ConnectServer( "", "root\\cimv2" ); foreach my $pro ( in $dos->InstancesOf("Win32_Process") ) { $procesos{ $pro->{Caption} } = $pro->{ProcessId}; } } # The End ?