java 端口扫描 速度很慢 求大神帮忙
package point_open;import
import
import
public class IPpoint {
Socket socket = null;
public IPpoint(int NO) {
try {
socket = new Socket("10.0.128.200",NO);
socket.setSoTimeout(10);
if (socket.isConnected()){
System.out.print("开放端口>>>>>>>>>:"+NO);
}
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println("端口未开放!"+NO);
} finally{
if(socket!=null)
try {
socket.close();
} catch (IOException e) {
// TODO Auto-generated catch block
}
}
}
public static void main(String [] args) throws UnknownHostException, IOException{
for(int StartIP=53;StartIP<=80;StartIP++){
new IPpoint(StartIP);
}
//new IPpoint(80);
}
}