📄 findwhois.java
字号:
import java.io.IOException;
import java.io.InputStream;
public class findWhois extends Thread
{
public InputStream in = null;
private String url = null;
private String equilStr = null;
private int bgn =0, end = 0;
// private String url1 =
// "http://whois.hichina.com/cgi-bin/whois?domain=";//"http://www.123cha.com/domain/?q="
public HttpClient http = null;
findWhois(String str, String check,int b,int e)
{
url = str;
equilStr = check;
bgn = b;
end = e;
}
public synchronized void run()
{
String urlStr = "";
// for (int i = 0; i < 26; i++){
for(int j = 0 ; j < 26; j++){
for(int k = bgn; k < end; k++){
urlStr = url ;//+ (char)('a'+j)+ (char)('a'+k)+"888.cn";
System.out.println(urlStr);
http = new HttpClient(urlStr);
in = http.getInputStream();
byte[] tmp = new byte[15312];
try
{
in.read(tmp);
}
catch (IOException e)
{
// TODO 自动生成 catch 块
e.printStackTrace();
}
String str = new String(tmp);
if ( str.indexOf(equilStr)!= -1){
System.out.println("========================"+equilStr+"====================");
System.out.println(urlStr);
}
in = null;
try
{
sleep(500);
}
catch (InterruptedException e)
{
// TODO 自动生成 catch 块
e.printStackTrace();
}
}
}
// }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -