Código
//LocateIP 0.1 //Coded By Doddy H import java.util.Scanner; import java.io.*; import java.net.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { String ip; ip = host.nextLine(); String code; code = toma("http://www.melissadata.com/lookups/iplocation.asp?ipaddress=" + ip); Pattern uno = null; Matcher dos = null; uno = Pattern.compile("City</td><td align=(.*?)><b>(.*?)</b></td>"); dos = uno.matcher(code); if (!dos.find()) { } else { } uno = Pattern.compile("Country</td><td align=(.*?)><b>(.*?)</b></td>"); dos = uno.matcher(code); if (!dos.find()) { } else { } uno = Pattern.compile("State or Region</td><td align=(.*?)><b>(.*?)</b></td>"); dos = uno.matcher(code); if (!dos.find()) { } else { } //code = toma("http://www.ip-adress.com/reverse_ip/178.33.230.100"); //uno = Pattern.compile("/whois/(.*?)\">Whois"); //dos = uno.matcher(code); //while(dos.find()) { //System.out.println("[+] DNS : "+dos.group(1)); //} } String re; hc.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"); while ((re = nave.readLine()) != null) { conte.append(re); } nave.close(); return conte.toString(); } } // The End ?