zoukankan      html  css  js  c++  java
  • 局域网活跃主机扫描

     1 /*
     2  * To change this license header, choose License Headers in Project Properties.
     3  * To change this template file, choose Tools | Templates
     4  * and open the template in the editor.
     5  */
     6 package example;
     7 
     8 import java.io.IOException;
     9 import java.net.InetAddress;
    10 
    11 /**
    12  *
    13  * @author silianbo
    14  */
    15 public class test {
    16 
    17     public static void main(String[] args) throws IOException {
    18         String ip = "192.168.1.";
    19         for (int i = 1; i < 256; i++) {
    20             String host = ip + i;
    21             InetAddress ia = InetAddress.getByName(host);
    22             boolean bool = ia.isReachable(1500);
    23             if (bool) {
    24                 System.out.println("主机: " + host + " 可用");
    25             }
    26 
    27         }
    28 
    29     }
    30 }
  • 相关阅读:
    Analog power pin UPF defination
    动态功耗计算
    静态功耗 计算
    Innovus 对multibit 的支持
    P &R 12
    P & R 11
    power-plan如何定
    P & R 10
    P & R 9
    线程基础
  • 原文地址:https://www.cnblogs.com/silianbo/p/4628745.html
Copyright © 2011-2022 走看看