windows: package cn.net.comsys.helper.system.info;   import java.io.BufferedReader; import java.io.File; import java.io.FileWriter; import java.io.InputStreamReader; import java.io.LineNumberReader;   public class HardWareUtils {       /**      * 获取主…
做一个内网根据MAC地址自动登录的应用,在WINDOW 2003可以正常使用,函数如下   复制代码 代码如下: function ce_getmac() { if(PHP_OS == 'WINNT') { $return_array = array(); $temp_array = array(); $mac_addr = ""; @exec("arp -a",$return_array); foreach($return_array as $value) { i…
在开发过程中,经常需要获取电脑的一些属性,如获取硬盘ID/CPU序列号/MAC地址作为来加密字符串. 1.硬盘 在我查看网上一些文档时,发现很多人对硬盘序列号很模糊~ 什么叫硬盘序列号?指的是作为一个硬盘的标识;但是有时候发现,同事的电脑硬盘序列号有重复的.所以硬盘标识我们可以试试用ID,这个如何获取下面讲解. 我们可以运行DOS命令,或者查看注册表,查看硬盘的序列号.如图中所示:都是HGST HTS725050A7E630. 大部分情况下,大家都可以通过如下获取: Dim key As Reg…
首先引入服务 然后 调用 本文转载自http://blog.sina.com.cn/s/blog_7eeb43210101hf7f.html public class Computer { public static string CpuID; //1.cpu序列号 public static string MacAddress; //2.mac序列号 public static string DiskID; //3.硬盘id public static string IpAddress; //…
有些机器有许多虚拟的网卡,获取IP地址时会出现一些意外,所以需要一些验证: // 获取mac地址 public static String getMacAddress() { try { Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkInterfaces(); byte[] mac = null; while (allNetInterfaces.hasMoreElements()) { N…
public class Computer { public static string CpuID; //1.cpu序列号 public static string MacAddress; //2.mac序列号 public static string DiskID; //3.硬盘id public static string IpAddress; //4.ip地址 public static string LoginUserName; //5.登录用户名 public static stri…
只获取clientIP package com.ppms.utils; import javax.servlet.http.HttpServletRequest; /** * Created by liangyadong on 2018/9/6 0006. */ public class GetClientIPUtil { public static String getIpAddr(HttpServletRequest request){ String ip = request.getHead…
根据Arp列表数据,查询本地设备在线状态 使用 arp -a 获得所有内网地址,首先看Mod对象 public struct MacIpPair { public string HostName; public string MacAddress; public string IpAddress; public override string ToString() { string str = ""; str += $"HostName:{HostName}\t{IpAddr…
获取手机WiFi信息. iOS9以前的方法,还是能用,警告就警告吧!iOS9以后使用的是苹果最新的API框架,NetworkExtension/NEHotspotHelper.h,这个框架,第一次开放了它的虚拟网卡,有时间了再介绍. #import <SystemConfiguration/CaptiveNetwork.h> - (void)viewDidLoad { [super viewDidLoad]; NSDictionary *dict = [self SSIDInfo]; NSLo…
C#实现的获取路由器MAC地址,路由器外网地址.对于要获取路由器MAC地址,一定需要知道路由器web管理系统的用户名和密码.至于获取路由器的外网IP地址,可以不需要知道路由器web管理系统的用户名和密码,但是需要有一个代理页面获取客户端公网ip地址的,这样C#请求此页面即可获取到路由器公网ip地址.如:http://xxxx.getip.ashx测试路由为水星 MR804,水星 MR808,都可以成功重启路由和获取到路由器MAC和外网IP地址 源代码下载地址:C#实现路由器重启更换IP,获取路由…