Su utilidad es obtener información acerca de los registros de un servidor (auditoria web).
sirve para obtener información sobre un dominio basandose en estas tecnicas:
- ping
- averiguar ips de dominios
- averiguar servidores de correos del dominio
- averiguar los nombres de dominio de los servidores NS
- descubrir registro de dominios TXT
- descubrir registro de dominios CNAME
- descubrir registro de dominios SOA
- Mostrar toda la información sobre los registros de dominio y de la zona
- Use IPv6 Query Transport (me da algun problema :S)
- Reverse IP Lookup
- obtener información TTL
Funciona del siguiente modo:
la splitea dejando solo el dominio y luego ya utilizas las otras tecnicas
aqui el code:
import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JTextArea; import javax.swing.JScrollPane; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class iGetSource { public static void main (String [ ] args){ iGetSource p = new iGetSource(); } static JFrame frmMain = new JFrame("Michb iGetSource (Desarrollado por RicardoMR)"); static JButton cmdAdd = new JButton("Split"); static JButton cmdAdd1 = new JButton("Ping"); static JButton cmdAdd2 = new JButton("Traceroute"); static JButton cmdAdd3 = new JButton("averiguar ips de dominios"); static JButton cmdAdd4 = new JButton("averiguar servidores de correos del dominio"); static JButton cmdAdd5 = new JButton("averiguar los nombres de dominio de los servidores (NS)"); static JButton cmdAdd6 = new JButton("descubrir registro TXT"); static JButton cmdAdd7 = new JButton("descubrir registro CNAME"); static JButton cmdAdd8 = new JButton("descubrir registro SOA"); static JButton cmdAdd9 = new JButton("Mostrar toda la información sobre los registros de dominio y de la zona"); static JButton cmdAdd10 = new JButton("Use IPv6 Query Transport"); static JButton cmdAdd11 = new JButton("Reverse IP Lookup"); static JButton cmdAdd12 = new JButton("obtener información TTL"); //static JButton cmdAdd12 = new JButton("f"); static JLabel lblResult = new JLabel(""); static Container cntMain = frmMain.getContentPane(); static JTextField txtNumA = new JTextField("http://google.com"); static JTextArea txtNumB = new JTextArea( "", 10, 15 ); static JScrollPane pp = new JScrollPane(txtNumB); iGetSource() { lblResult.setText("Sistema Operativo: " + EjecutarComando.osName + ", Arquitectura " + EjecutarComando.Arch + ", Version " + EjecutarComando.Version); //(horizontal,vertical,anchura,altura) frmMain.setBounds(100, 300, 510, 540); frmMain.setVisible(true); frmMain.setResizable(false); frmMain.setLayout(null); cmdAdd.setBounds(240, 10, 70, 20); cmdAdd1.setBounds(320, 10, 70, 20); cmdAdd2.setBounds(400, 10, 100, 20); cmdAdd3.setBounds(10, 40, 190, 20); cmdAdd4.setBounds(210, 40, 290, 20); cmdAdd5.setBounds(10, 70, 490, 20); cmdAdd6.setBounds(10, 100, 240, 20); cmdAdd7.setBounds(260, 100, 240, 20); cmdAdd8.setBounds(10, 130, 490, 20); cmdAdd9.setBounds(10, 160, 490, 20); cmdAdd10.setBounds(10, 190, 172, 20); cmdAdd11.setBounds(184, 190, 140, 20); cmdAdd12.setBounds(325, 190, 175, 20); lblResult.setBounds(10, 220, 470, 20); txtNumA.setBounds(10, 10, 210, 20); txtNumB.setBounds(10,250,490,250); pp.setBounds(10,250,490,250); cntMain.add(cmdAdd); cntMain.add(cmdAdd1); cntMain.add(cmdAdd2); cntMain.add(cmdAdd3); cntMain.add(cmdAdd4); cntMain.add(cmdAdd5); cntMain.add(cmdAdd6); cntMain.add(cmdAdd7); cntMain.add(cmdAdd8); cntMain.add(cmdAdd9); cntMain.add(cmdAdd10); cntMain.add(cmdAdd11); cntMain.add(cmdAdd12); cntMain.add(lblResult); cntMain.add(pp); cntMain.add(txtNumA); cmdAdd.addActionListener(new Start_Add()); cmdAdd1.addActionListener(new Start_Add1()); cmdAdd2.addActionListener(new Start_Add2()); cmdAdd3.addActionListener(new Start_Add3()); cmdAdd4.addActionListener(new Start_Add4()); cmdAdd5.addActionListener(new Start_Add5()); cmdAdd6.addActionListener(new Start_Add6()); cmdAdd7.addActionListener(new Start_Add7()); cmdAdd8.addActionListener(new Start_Add8()); cmdAdd9.addActionListener(new Start_Add9()); cmdAdd10.addActionListener(new Start_Add10()); cmdAdd11.addActionListener(new Start_Add11()); cmdAdd12.addActionListener(new Start_Add12()); } } /**********************************************************/ class Start_Add implements ActionListener { public void actionPerformed(ActionEvent arg0) { String url = iGetSource.txtNumA.getText(); String[] items = url.split("/"); iGetSource.lblResult.setText(items[2]); } } class Start_Add1 implements ActionListener { public void actionPerformed(ActionEvent arg1) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"ping"); } } class Start_Add2 implements ActionListener { public void actionPerformed(ActionEvent arg2) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"traceroute"); } } class Start_Add3 implements ActionListener { public void actionPerformed(ActionEvent arg3) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"ipDom"); } } class Start_Add4 implements ActionListener { public void actionPerformed(ActionEvent arg4) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"servMX"); } } class Start_Add5 implements ActionListener { public void actionPerformed(ActionEvent arg5) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"NS"); } } class Start_Add6 implements ActionListener { public void actionPerformed(ActionEvent arg6) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"TXT"); } } class Start_Add7 implements ActionListener { public void actionPerformed(ActionEvent arg7) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"CNAME"); } } class Start_Add8 implements ActionListener { public void actionPerformed(ActionEvent arg8) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"SOA"); } } class Start_Add9 implements ActionListener { public void actionPerformed(ActionEvent arg9) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"regDomZona"); } } class Start_Add10 implements ActionListener { public void actionPerformed(ActionEvent arg10) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"IPQT"); } } class Start_Add11 implements ActionListener { public void actionPerformed(ActionEvent arg11) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"IPL"); } } class Start_Add12 implements ActionListener { public void actionPerformed(ActionEvent arg12) { String pp = iGetSource.lblResult.getText(); //System.out.println(pp); new EjecutarComando(pp,"TTL"); } } /**********************************************************/ class EjecutarComando { static String osName = System.getProperty ( "os.name" ); static String Arch = System.getProperty ( "os.arch" ); static String Version = System.getProperty ( "os.version" ); EjecutarComando(String dominio, String com){ String i = dominio; String comando = com; String s = null; /*****************************************/ if(comando == "ping"){ comando = "ping -c 1 -a " + i; } if(comando == "traceroute"){ comando = "traceroute "+ i; } if(comando == "ipDom"){ comando = "host -t a " + i; } if(comando == "servMX"){ comando = "host -t mx " + i; } if(comando == "NS"){ comando = "host -t ns " + i; } if(comando == "TXT"){ comando = "host -t txt " + i; } if(comando == "CNAME"){ comando = "host -t cname " + i; } if(comando == "SOA"){ comando = "host -t soa " + i; } if(comando == "regDomZona"){ comando = "host -a " + i; } if(comando == "IPQT"){ comando = "host -6 -a" + i; } if(comando == "IPL"){ comando = "host " + i; } if(comando == "TTL"){ comando = "host -v -t a " + i; } /*****************************************/ try { Process p = Runtime.getRuntime().exec(comando); BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); System.out.println("Ésta es la salida standard del comando:\n"); if (!osName.equals("Windows 7")){ String todo=""; while ((s = stdInput.readLine()) != null) { System.out.println(s); todo = todo+s+"\n"; s=stdInput.readLine(); //iGetSource.txtNumB.setText(s); } stdInput.close(); iGetSource.txtNumB.setText(todo); } //System.exit(0); } catch (IOException e) { System.out.println("Excepción: "); e.printStackTrace(); //System.exit(-1); } } } /* * averiguar ips de dominios "host -t a " + i; averiguar servidores de correos del dominio "host -t mx " + i; averiguar los nombres de dominio de los servidores NS "host -t ns " + i; descubrir registro de dominios TXT "host -t txt " + i; descubrir registro de dominios CNAME "host -t cname " + i; descubrir registro de dominios SOA "host -t soa " + i; Mostrar toda la información sobre los registros de dominio y de la zona "host -a " + i; Use IPv6 Query Transport "host -6 -a" + i; Reverse IP Lookup "host " + i; obtener información TTL "host -v -t a " + i; */
No hay comentarios:
Publicar un comentario