标题:java 端口扫描 速度很慢 求大神帮忙
只看楼主
行痴
Rank: 1
等 级:新手上路
帖 子:2
专家分:4
注 册:2016-3-29
 问题点数:0 回复次数:0 
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);
    }
}
搜索更多相关主题的帖子: package Socket public import null 
2016-03-29 17:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-463042-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.089784 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved