• 网络扫描程序设计


    一、简介

    目标主机扫描是网络功防的基础和前提,扫描探测一台目标主机包括:确定该目标主机是否活动、目标主机的操作系统、正在使用哪些端口、对外提供了哪些服务、相关服务的软件版本等等,对这些内容的探测就是为了“对症下药”,为攻防提供参考信息。对主机的探测工具非常多,比如大名鼎鼎的nmap、netcat、superscan,以及国内的x-scanner等等。

    二、主机扫描(远程主机探测)

    1、通过指定的IP地址范围,发现该范围钟活跃的主机,如192.168.233.0-192.168.233.255

    请添加图片描述
    扫描192.168.233.0~192.168.233.255,收到消息192.168.233.175的端口6060开放

    更好的思路是将ip地址转换为整数形式,ip地址范围的遍历就转为在两个数字之间for循环,循环体钟将每一个数字换回ip地址进行处理即可,关键就在于实现ip与数字之间的互相转换:
    请添加图片描述
    最终结果=以上四行或运算

    但是!在java钟,二进制最高位1是符号位使用,表示负数,所以我们需要用long类型来存储ip转换的数字,避免出现负数的情况。

    ip和长整型互相转化:
    public  long ipToLong(String ip) {
      String[] ipArray = ip.split("\\.");
      long num = 0;
      for (int i=0; i<ipArray.length; i++) {
        long valueOfSection = Long.parseLong(ipArray[i]);
        num = (valueOfSection << 8 * (3 - i)) | num;
      }
      return num;
    }
    
    /**
     * 长整型转ip  
     */
    public  String longToIp(long i) {
    //右移,并将高位置0
      return ((i >> 24 ) & 0xFF) + "." +
          ((i >> 16 ) & 0xFF) + "." +
          ((i >>  8 ) & 0xFF) + "." +
          ( i        & 0xFF);
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21

    三、端口扫描

    在目标主机IP文本框中填入活跃主机的ip,再点击扫描。

    多线程扫描:即便使用快速扫描的方式,如果扫描的端口范围较大,还是耗时较久。可以结合快速扫描,开启多线程加快速度:每一个线程负责扫描一段范围,分而治之加快速度。
    请添加图片描述

    四、完整代码

    IpUtils.java
    package chapter09;
    //
    // Source code recreated from a .class file by IntelliJ IDEA
    // (powered by FernFlower decompiler)
    //
    
    
    public class IpUtils {
        public IpUtils() {
        }
    
        public static int ipToInt(String ip) {
            String[] ipArray = ip.split("\\.");
            int num = 0;
    
            for(int i = 0; i < ipArray.length; ++i) {
                int valueOfSection = Integer.parseInt(ipArray[i]);
                num |= valueOfSection << 8 * (3 - i);
            }
    
            return num;
        }
    
        public static String intToIp(int ip) {
            StringBuffer sb = new StringBuffer("");
            sb.append(String.valueOf(ip >>> 24));
            sb.append(".");
            sb.append(String.valueOf((ip & 16777215) >>> 16));
            sb.append(".");
            sb.append(String.valueOf((ip & '\uffff') >>> 8));
            sb.append(".");
            sb.append(String.valueOf(ip & 255));
            return sb.toString();
        }
    
        public static long ipToLong(String strIp) {
            String[] s = strIp.split("\\.");
            long ip = (Long.parseLong(s[0]) << 24) + (Long.parseLong(s[1]) << 16) + (Long.parseLong(s[2]) << 8) + Long.parseLong(s[3]);
            return ip;
        }
    
        public static String longToIp(long longIp) {
            StringBuffer sb = new StringBuffer("");
            sb.append(String.valueOf(longIp >> 24)).append(".").append(String.valueOf((longIp & 16777215L) >> 16)).append(".").append(String.valueOf((longIp & 65535L) >> 8)).append(".").append(String.valueOf(longIp & 255L));
            return sb.toString();
        }
    
        public static void main(String[] args) {
            int intIP;
            System.out.println(intIP = ipToInt("192.168.0.1"));
            System.out.println(ipToInt("192.168.0.254"));
            System.out.println(intToIp(intIP));
            System.out.println(ipToLong("192.168.0.127"));
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    HostScannerFX.java
    package chapter09;
    //
    // Source code recreated from a .class file by IntelliJ IDEA
    // (powered by FernFlower decompiler)
    //
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.Socket;
    import java.util.concurrent.atomic.AtomicInteger;
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.HBox;
    import javafx.scene.layout.Priority;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class HostScannerFX extends Application {
        private TextArea taDisplay = new TextArea();
        private TextField tfStartIp = new TextField("192.168.0.1");
        private TextField tfEndIp = new TextField("192.168.0.158");
        private TextField tfCmd = new TextField();
        private Button btnScan = new Button("主机扫描");
        private Button btnExecute = new Button("执行命令");
        private Button btnStop = new Button("停止");
        private Button btnExit = new Button("退出");
        private ThreadGroup threadGroup = new ThreadGroup("scanThread");
        static AtomicInteger hostCount = new AtomicInteger(0);
        private long startIp;
        private long endIp;
    
        public HostScannerFX() {
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    
        public void start(Stage primaryStage) throws Exception {
            BorderPane mainPane = new BorderPane();
            VBox display = new VBox();
            display.setSpacing(10.0D);
            display.setPadding(new Insets(10.0D, 20.0D, 10.0D, 20.0D));
            this.taDisplay.setWrapText(true);
            this.taDisplay.setEditable(false);
            display.getChildren().addAll(new Node[]{new Label("扫描结果:"), this.taDisplay});
            VBox.setVgrow(this.taDisplay, Priority.ALWAYS);
            mainPane.setCenter(display);
            this.btnScan.setOnAction((event) -> {
                this.startIp = IpUtils.ipToLong(this.tfStartIp.getText());
                this.endIp = IpUtils.ipToLong(this.tfEndIp.getText());
                int thread = 4;
                hostCount.set(0);
    
                for(int i = 0; i < thread; ++i) {
                    HostScannerFX.ScanHandler scanHandler = new HostScannerFX.ScanHandler(i, thread);
                    (new Thread(this.threadGroup, scanHandler, "MultiThread" + i)).start();
                }
    
            });
            this.btnExecute.setOnAction((event) -> {
                Thread scanThread = new Thread(this.threadGroup, () -> {
                    try {
                        String cmd = this.tfCmd.getText();
                        Process process = Runtime.getRuntime().exec(cmd);
                        InputStream in = process.getInputStream();
                        BufferedReader br = new BufferedReader(new InputStreamReader(in, "gbk"));
    
                        String msg;
                        while((msg = br.readLine()) != null) {
                            String finalMsg = msg;
                            Platform.runLater(() -> {
                                this.taDisplay.appendText(finalMsg + "\n");
                            });
                        }
                    } catch (IOException var7) {
                        System.err.println(var7.getMessage());
                    }
    
                }, "scanThread");
                scanThread.start();
            });
            this.btnStop.setOnAction((event) -> {
                this.threadGroup.interrupt();
            });
            this.btnExit.setOnAction((event) -> {
                this.threadGroup.interrupt();
                System.exit(0);
            });
            HBox controls = new HBox();
            controls.setSpacing(10.0D);
            controls.setPadding(new Insets(10.0D, 20.0D, 10.0D, 20.0D));
            controls.setAlignment(Pos.CENTER);
            controls.getChildren().addAll(new Node[]{new Label("起始地址:"), this.tfStartIp, new Label("结束地址:"), this.tfEndIp, this.btnScan});
            HBox cmd = new HBox();
            cmd.setSpacing(10.0D);
            cmd.setPadding(new Insets(10.0D, 20.0D, 10.0D, 20.0D));
            cmd.setAlignment(Pos.CENTER);
            cmd.getChildren().addAll(new Node[]{new Label("输入命令格式:"), this.tfCmd, this.btnExecute, this.btnStop, this.btnExit});
            VBox vCmd = new VBox();
            vCmd.setAlignment(Pos.CENTER);
            vCmd.setPrefWidth(500.0D);
            vCmd.getChildren().addAll(new Node[]{controls, cmd});
            mainPane.setBottom(vCmd);
            Scene scene = new Scene(mainPane, 700.0D, 400.0D);
            primaryStage.setOnCloseRequest((event) -> {
                this.threadGroup.interrupt();
                System.exit(0);
            });
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        public boolean isReachable(String host) throws IOException {
            int timeOut = 100;
            InetAddress address = InetAddress.getByName(host);
            return address.isReachable(timeOut);
        }
    
        class ScanHandler implements Runnable {
            private int totalThreadNum;
            private int threadNo;
    
            public ScanHandler(int threadNo) {
                this.totalThreadNum = 10;
                this.threadNo = threadNo;
            }
    
            public ScanHandler(int threadNo, int totalThreadNum) {
                this.totalThreadNum = totalThreadNum;
                this.threadNo = threadNo;
            }
    
            public void run() {
                for(long host = HostScannerFX.this.startIp + (long)this.threadNo; host <= HostScannerFX.this.endIp; host += (long)this.totalThreadNum) {
                    if (Thread.currentThread().isInterrupted()) {
                        System.out.println("interrupted!");
                        break;
                    }
    
                    try {
                        boolean res = HostScannerFX.this.isReachable(IpUtils.longToIp(host));
                        if (res) {
                            long finalHost = host;
                            Platform.runLater(() -> {
                                HostScannerFX.this.taDisplay.appendText(IpUtils.longToIp(finalHost) + " is reachable.\n");
    
                                try {
                                    Socket socket = new Socket();
                                    socket.connect(new InetSocketAddress(String.valueOf(finalHost), 6060), 200);
                                    socket.close();
                                    String msg = IpUtils.longToIp(finalHost) + "的端口6060开放了\n";
                                    Platform.runLater(() -> {
                                        HostScannerFX.this.taDisplay.appendText(msg);
                                    });
                                } catch (IOException var5) {
                                    var5.printStackTrace();
                                }
    
                            });
                        }
                    } catch (IOException var6) {
                        var6.printStackTrace();
                    }
    
                    HostScannerFX.hostCount.incrementAndGet();
                }
    
                if ((long)HostScannerFX.hostCount.get() == HostScannerFX.this.endIp - HostScannerFX.this.startIp + 1L) {
                    HostScannerFX.hostCount.incrementAndGet();
                    Platform.runLater(() -> {
                        HostScannerFX.this.taDisplay.appendText("扫描完毕");
                    });
                }
    
            }
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    PortScannerFx.java
    package chapter09;
    //
    // Source code recreated from a .class file by IntelliJ IDEA
    // (powered by FernFlower decompiler)
    //
    
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.net.Socket;
    import java.util.concurrent.atomic.AtomicInteger;
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.HBox;
    import javafx.scene.layout.Priority;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class PortScannerFx extends Application {
        private TextArea taDisplay = new TextArea();
        private TextField tfTargetIp = new TextField("192.168.0.1");
        private TextField tfStartPort = new TextField("1");
        private TextField tfEndPort = new TextField("443");
        private Button btnScan = new Button("扫描");
        private Button btnQuickScan = new Button("快速扫描");
        private Button btnMultiThreadScan = new Button("多线程扫描");
        private Button btnStop = new Button("停止");
        private Button btnClear = new Button("清空");
        private Button btnExit = new Button("退出");
        private ProgressBar progressBar = new ProgressBar(0.0D);
        private Label progressLabel = new Label("0%");
        private String ip;
        private int startPort;
        private int endPort;
        private ThreadGroup threadGroup = new ThreadGroup("scanThread");
        static AtomicInteger portCount = new AtomicInteger(0);
    
        public PortScannerFx() {
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    
        public void start(Stage primaryStage) throws Exception {
            BorderPane mainPane = new BorderPane();
            VBox display = new VBox();
            display.setSpacing(10.0D);
            display.setPadding(new Insets(10.0D, 20.0D, 10.0D, 20.0D));
            this.taDisplay.setWrapText(true);
            this.taDisplay.setEditable(false);
            this.taDisplay.setPrefHeight(250.0D);
            this.progressBar.setPrefWidth(600.0D);
            HBox progressBox = new HBox();
            progressBox.setAlignment(Pos.CENTER);
            progressBox.setSpacing(10.0D);
            progressBox.getChildren().addAll(new Node[]{this.progressLabel, this.progressBar});
            display.getChildren().addAll(new Node[]{new Label("端口扫描结果:"), this.taDisplay, progressBox});
            VBox.setVgrow(this.taDisplay, Priority.ALWAYS);
            mainPane.setTop(display);
            HBox params = new HBox();
            params.setSpacing(10.0D);
            params.setPadding(new Insets(10.0D, 20.0D, 10.0D, 20.0D));
            params.setAlignment(Pos.CENTER);
            this.tfStartPort.setPrefWidth(40.0D);
            this.tfEndPort.setPrefWidth(40.0D);
            params.getChildren().addAll(new Node[]{new Label("目标主机IP:"), this.tfTargetIp, new Label("起始端口号:"), this.tfStartPort, new Label("结束端口号:"), this.tfEndPort});
            mainPane.setCenter(params);
            this.btnStop.setDisable(true);
            this.btnScan.setOnAction((event) -> {
                this.ip = this.tfTargetIp.getText();
                this.startPort = Integer.parseInt(this.tfStartPort.getText());
                this.endPort = Integer.parseInt(this.tfEndPort.getText());
                this.progressBar.setProgress(0.0D);
                this.progressLabel.setText("0%");
                int totalPorts = this.endPort - this.startPort + 1;
                Thread scanThread = new Thread(this.threadGroup, () -> {
                    System.out.println("Scan start!");
    
                    for(int i = this.startPort; i <= this.endPort; ++i) {
                        if (Thread.currentThread().isInterrupted()) {
                            System.out.println("interrupted!");
                            break;
                        }
    
                        System.out.println("Scanning port " + i);
    
                        String msg;
                        try {
                            Socket socket = new Socket(this.ip, i);
                            socket.close();
                            msg = "端口 " + i + " is open\n";
                        } catch (IOException var6) {
                            msg = "端口 " + i + " is not open\n";
                        }
    
                        this.taDisplay.appendText(msg);
                        double progress = (double)(i - this.startPort) / (double)totalPorts;
                        Platform.runLater(() -> {
                            this.progressBar.setProgress(progress);
                            this.progressLabel.setText((int)(progress * 100.0D) + "%");
                        });
                    }
    
                }, "scanThread");
                this.btnStop.setDisable(false);
                this.btnScan.setDisable(true);
                this.btnQuickScan.setDisable(true);
                this.btnMultiThreadScan.setDisable(true);
                scanThread.start();
            });
            this.btnQuickScan.setOnAction((event) -> {
                this.ip = this.tfTargetIp.getText();
                this.startPort = Integer.parseInt(this.tfStartPort.getText());
                this.endPort = Integer.parseInt(this.tfEndPort.getText());
                this.progressBar.setProgress(0.0D);
                this.progressLabel.setText("0%");
                int totalPorts = this.endPort - this.startPort + 1;
                Thread scanThread = new Thread(this.threadGroup, () -> {
                    System.out.println("Scan start!");
    
                    for(int i = this.startPort; i <= this.endPort; ++i) {
                        if (Thread.currentThread().isInterrupted()) {
                            System.out.println("interrupted!");
                            break;
                        }
    
                        System.out.println("Scanning port " + i);
    
                        String msg;
                        try {
                            Socket socket = new Socket();
                            socket.connect(new InetSocketAddress(this.ip, i), 200);
                            socket.close();
                            msg = "端口 " + i + " is open\n";
                        } catch (IOException var6) {
                            msg = "端口 " + i + " is not open\n";
                        }
    
                        this.taDisplay.appendText(msg);
                        double progress = (double)(i - this.startPort) / (double)totalPorts;
                        Platform.runLater(() -> {
                            this.progressBar.setProgress(progress);
                            this.progressLabel.setText((int)(progress * 100.0D) + "%");
                        });
                    }
    
                }, "quickScanThread");
                this.btnStop.setDisable(false);
                this.btnScan.setDisable(true);
                this.btnQuickScan.setDisable(true);
                this.btnMultiThreadScan.setDisable(true);
                scanThread.start();
            });
            this.btnMultiThreadScan.setOnAction((event) -> {
                this.ip = this.tfTargetIp.getText();
                this.startPort = Integer.parseInt(this.tfStartPort.getText());
                this.endPort = Integer.parseInt(this.tfEndPort.getText());
                this.btnStop.setDisable(false);
                this.btnScan.setDisable(true);
                this.btnQuickScan.setDisable(true);
                this.btnMultiThreadScan.setDisable(true);
                int thread = 4;
                portCount.set(0);
    
                for(int i = 0; i < thread; ++i) {
                    PortScannerFx.ScanHandler scanHandler = new PortScannerFx.ScanHandler(i, thread);
                    (new Thread(this.threadGroup, scanHandler, "MultiThread" + i)).start();
                }
    
            });
            this.btnStop.setOnAction((event) -> {
                this.btnStop.setDisable(true);
                this.btnScan.setDisable(false);
                this.btnQuickScan.setDisable(false);
                this.btnMultiThreadScan.setDisable(false);
    
                try {
                    this.threadGroup.list();
                    this.threadGroup.interrupt();
                } catch (Exception var3) {
                }
    
            });
            this.btnExit.setOnAction((event) -> {
                try {
                    this.threadGroup.interrupt();
                } catch (Exception var3) {
                }
    
                System.exit(0);
            });
            this.btnClear.setOnAction((event) -> {
                this.taDisplay.clear();
                this.progressBar.setProgress(0.0D);
                this.progressLabel.setText("0%");
            });
            HBox buttons = new HBox();
            buttons.setAlignment(Pos.CENTER);
            buttons.setSpacing(10.0D);
            buttons.setPadding(new Insets(10.0D, 20.0D, 10.0D, 20.0D));
            buttons.getChildren().addAll(new Node[]{this.btnScan, this.btnQuickScan, this.btnMultiThreadScan, this.btnStop, this.btnClear, this.btnExit});
            mainPane.setBottom(buttons);
            Scene scene = new Scene(mainPane, 700.0D, 400.0D);
            primaryStage.setOnCloseRequest((event) -> {
                try {
                    this.threadGroup.interrupt();
                } catch (Exception var3) {
                }
    
                System.exit(0);
            });
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        class ScanHandler implements Runnable {
            private int totalThreadNum;
            private int threadNo;
    
            public ScanHandler(int threadNo) {
                this.totalThreadNum = 10;
                this.threadNo = threadNo;
            }
    
            public ScanHandler(int threadNo, int totalThreadNum) {
                this.totalThreadNum = totalThreadNum;
                this.threadNo = threadNo;
            }
    
            public void run() {
                System.out.println("thread created");
    
                for(int port = PortScannerFx.this.startPort + this.threadNo; port <= PortScannerFx.this.endPort; port += this.totalThreadNum) {
                    if (Thread.currentThread().isInterrupted()) {
                        System.out.println("interrupted!");
                        break;
                    }
    
                    double progress = (double)PortScannerFx.portCount.get() / (double)(PortScannerFx.this.endPort - PortScannerFx.this.startPort + 1);
                    Platform.runLater(() -> {
                        PortScannerFx.this.progressBar.setProgress(progress);
                        PortScannerFx.this.progressLabel.setText((int)(progress * 100.0D) + "%");
                    });
    
                    try {
                        Socket socket = new Socket();
                        socket.connect(new InetSocketAddress(PortScannerFx.this.ip, port), 200);
                        socket.close();
                        String msg = "端口 " + port + " is open\n";
                        Platform.runLater(() -> {
                            PortScannerFx.this.taDisplay.appendText(msg);
                        });
                    } catch (IOException var6) {
                    }
    
                    PortScannerFx.portCount.incrementAndGet();
                }
    
                if (PortScannerFx.portCount.get() == PortScannerFx.this.endPort - PortScannerFx.this.startPort + 1) {
                    PortScannerFx.portCount.incrementAndGet();
                    Platform.runLater(() -> {
                        PortScannerFx.this.taDisplay.appendText("\n----------------多线程扫描结束--------------------\n");
                        PortScannerFx.this.btnStop.setDisable(true);
                        PortScannerFx.this.btnScan.setDisable(false);
                        PortScannerFx.this.btnQuickScan.setDisable(false);
                        PortScannerFx.this.btnMultiThreadScan.setDisable(false);
                    });
                }
    
            }
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
  • 相关阅读:
    AQS如何实现
    【编程题】【Scratch四级】2022.06 成绩查询
    医院微信预约挂号小程序开发_分享医院做预约挂号小程序的可以实现什么功能
    深度优先搜索和广度优先搜索
    企业软文怎么写?教你搞定各种类型软文
    随想录一刷Day41——动态规划
    【Web前端】怎样用记事本写一个简单的网页-html
    云原生技术在云计算中的应用探讨
    Android 9.0 蓝牙功能之一:蓝牙音乐
    GraphQL 入门与实践
  • 原文地址:https://blog.csdn.net/weixin_51293984/article/details/127635188