send
Grupo de Telegram
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

Listar los procesos de windows

  • 0 Respuestas
  • 2941 Vistas

0 Usuarios y 2 Visitantes están viendo este tema.

Desconectado ProcessKill

  • *
  • Underc0der
  • Mensajes: 154
  • Actividad:
    0%
  • Reputación 0
  • Arriba los hackers de Argentina!
    • Ver Perfil
    • Email
« en: Febrero 24, 2010, 04:14:06 pm »


Código: Java
  1. import javax.swing.JFrame;
  2. /*
  3. * Listar los procesos de Windows y mostrarlos  en un JList
  4. * _______________________________
  5. * @author L-EYER
  6. * @see GlassFish Tools Bundle For Eclipse Version: 0.9.9
  7. * _______________________________________________________
  8. *
  9. */
  10. public class ProcessList
  11. {
  12.         public static void main(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login[] args) {
  13.                 final You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login init = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  14.                 init.setLayout(new java.awt.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(1,1));
  15.                 init.setDefaultCloseOperation(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.EXIT_ON_CLOSE);
  16.                 final  java.awt.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login list = new java.awt.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  17.                 java.awt.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login container = init.getContentPane();
  18.                                 container.add(list);
  19.                 final You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login command = "CMD /C tasklist /nh";
  20.                 java.util.Vector< You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login > listProcess=new java.util.Vector< You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login >();
  21.                 try {
  22.                        
  23.                         final You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login process = You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.getRuntime().exec(command);
  24.                         java.io.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login reader = new java.io.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(
  25.                                         new java.io.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(
  26.                                                         process.getInputStream()));
  27.                                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login pross=null;
  28.                                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login processName="";
  29.                         while((pross=reader.readLine()) != null){
  30.                                 char[]array=pross.toCharArray();
  31.                                 for(int i=0;
  32.                                 i<array.length;
  33.                                 i++){
  34.                                         processName += You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.valueOf(array[i]);
  35.                                                 if(array[i]==' ')break;else continue;
  36.                                 }
  37.                                 listProcess.addElement(
  38.                                                 processName.trim().toUpperCase());
  39.                                 processName="";
  40.                         }
  41.                         for(int j = 0;
  42.                         j< listProcess.size();
  43.                         j++)
  44.                                 list.add(listProcess.get(j));
  45.                         } catch (java.io.You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {e.printStackTrace();You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.exit(0);
  46.                        
  47.                 }catch (You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  48.                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.err.println(e);You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.exit(0);
  49.                      }
  50.                 init.setSize(300,700);
  51.                 init.setLocationRelativeTo(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login());
  52.                 init.setVisible(true);
  53.         }
  54. }
« Última modificación: Abril 18, 2013, 12:43:31 pm por Expermicid »

 

¿Te gustó el post? COMPARTILO!



Como compilar programas Java en la consola de comandos de Windows

Iniciado por tar3kw0rm3d

Respuestas: 2
Vistas: 2096
Último mensaje Junio 04, 2013, 02:55:07 pm
por tar3kw0rm3d