imporived Whois
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package de.muehlencord.shared.network;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jomu
|
||||
*/
|
||||
public class CidrToolTest {
|
||||
|
||||
public CidrToolTest() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCidrConversion() {
|
||||
System.out.println (CidrTool.rangeToCidrList("213.55.64.0", "213.55.127.255"));
|
||||
}
|
||||
}
|
||||
@ -31,18 +31,56 @@ public class WhoisTest extends BaseTest {
|
||||
@Ignore
|
||||
public void testInternic() throws UnknownHostException, SocketException, IOException, ParseException {
|
||||
Whois whoIsClient = new Whois();
|
||||
// Denic answers "status: connect" only
|
||||
whoIsClient.execute ("whois.1api.net", "egameladder.com");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testArin() throws UnknownHostException, SocketException, IOException, ParseException {
|
||||
Whois whoIsClient = new Whois();
|
||||
whoIsClient.execute ("whois.arin.net", "204.232.209.184");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testApnic() throws UnknownHostException, SocketException, IOException, ParseException {
|
||||
Whois whoIsClient = new Whois();
|
||||
whoIsClient.execute ("whois.apnic.net", "60.247.69.45");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnkown() throws UnknownHostException, SocketException, IOException, ParseException {
|
||||
Whois whoIsClient = new Whois();
|
||||
// whoIsClient.execute("whois.arin.net", "174.139.180.10");
|
||||
// whoIsClient.execute("whois.twnic.net", "60.250.38.39");
|
||||
// whoIsClient.execute("whois.apnic.net", "60.28.27.14");
|
||||
// whoIsClient.execute("whois.apnic.net", "203.127.200.113");
|
||||
// whoIsClient.execute("whois.apnic.net", "182.72.111.26");
|
||||
// whoIsClient.execute("whois.ripe.net", "213.55.95.62"); // Transferred to Afrinic
|
||||
whoIsClient.execute("whois.afrinic.net", "213.55.95.62");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testStepWise() throws UnknownHostException, SocketException, IOException, ParseException {
|
||||
Whois whoIsClient = new Whois();
|
||||
// whoIsClient.execute ("whois.ripe.net", "88.198.181.181");
|
||||
whoIsClient.execute ("whois.ripe.net", "212.204.60.1");
|
||||
assertTrue ("network", whoIsClient.getNetwork().contains("212.204.60.0/24"));
|
||||
// whoIsClient.execute ("whois.ripe.net", "212.204.60.0");
|
||||
// whoIsClient.execute ("whois.ripe.net", "212.0.0.0/8");
|
||||
|
||||
// whoIsClient.execute ("whois.ripe.net", "212.0.0.0/8");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user