代码拉取完成,页面将自动刷新
<html>
<head>
<script>
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var info = "";
//CPU信息
info = CpuInfo();
document.write(info);
info = "";
//主板信息
info = MainBoard();
document.write(info);
info = "";
//硬盘信息
// info = disk();
// document.write(info);
// info = "";
//网络连接信息
info = IpInfo();
document.write(info);
info = "";
//操作系统信息
info = OsInfo();
document.write(info);
document.write("硬盘序列号请在控制台弹窗复制");
Win10DiskDrive();
//硬盘信息
function Win10DiskDrive() {
var command =
"cmd /k wmic diskdrive get serialnumber | wmic path win32_physicalmedia get SerialNumber | wmic path Win32_DiskDrive get SerialNumber";
var cmd = new ActiveXObject("WScript.Shell");
cmd.run(command);
}
//CPU信息
function CpuInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_Processor");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td width='450' >CPU 信息</td></tr>";
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info +=
"<tr style='color: black'><td >CPU序列号:" +
p.ProcessorID +
"</td></tr>";
info += "<tr><td >" + p.Caption + "</td></tr>";
info += "<tr><td >CPU编号:" + p.DeviceID + "</td></tr>";
info += "<tr><td >CPU型号:" + p.Name + "</td></tr>";
info += "<tr><td >CPU状态:" + p.CpuStatus + "</td></tr>";
info += "<tr><td >CPU可用性:" + p.Availability + "</td></tr>";
info += "<tr><td >CUP Level:" + p.Level + "</td></tr>";
info += "<tr><td >主机名称:" + p.SystemName + "</td></tr>";
}
info += "</table>";
return info;
}
//主板信息
function MainBoard() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_BaseBoard");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;'><td width='450'>主板信息 </td></tr>";
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info += "<tr><td >主板说明:" + p.Caption + "</td></tr>";
info += "<tr><td >主板制造商:" + p.Manufacturer + "</td></tr>";
info += "<tr><td >主板名称:" + p.Name + "</td></tr>";
info += "<tr><td >主板序列号:" + p.SerialNumber + "</td></tr>";
info += "<tr><td >主板型号:" + p.Product + "</td></tr>";
}
info += "</table>";
return info;
}
//硬盘信息
function disk() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_DiskDrive");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;'><td width='450'>硬盘信息 </td></tr>";
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info += "<tr><td >硬盘序列号:" + p.SerialNumber + "</td></tr>";
}
info += "</table>";
}
//网络连接信息
function IpInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery(
"SELECT * FROM Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE"
);
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td width='450'>MAC地址和IP地址:</td></tr>";
var i = 1;
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info +=
"<tr style='color: black'><td >MAC地址" +
i +
":" +
p.MACAddress +
"</td></tr>";
info +=
"<tr style='color: black'><td >IP地址" +
i +
":" +
p.IPAddress(0) +
"</td></tr>";
i++;
}
info += "</table>";
return info;
}
//操作系统信息
function OsInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery(
"SELECT * FROM Win32_OperatingSystem"
);
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td width='450'>操作系统和安装日期:</td></tr>";
var i = 1;
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info +=
"<tr style='color: black'><td> 版本号:" +
p.BuildNumber +
"</td></tr>";
info +=
"<tr style='color: black'><td> 系统描述:" +
p.Caption +
"</td></tr>";
info +=
"<tr style='color: black'><td> 国家代码:" +
p.CountryCode +
"</td></tr>";
info +=
"<tr style='color: black'><td> 空闲物理内存:" +
p.FreePhysicalMemory +
"</td></tr>";
info +=
"<tr style='color: black'><td> 空闲虚拟内存:" +
p.FreeVirtualMemory +
"</td></tr>";
info +=
"<tr style='color: black'><td> 安装日期:" +
s2Time(p.InstallDate) +
"</td></tr>";
info +=
"<tr style='color: black'><td> 当前日期:" +
s2Time(p.LocalDateTime) +
"</td></tr>";
info +=
"<tr style='color: black'><td> 生产商:" +
p.Manufacturer +
"</td></tr>";
info +=
"<tr style='color: black'><td>" + p.OSArchitecture + "</td></tr>";
info +=
"<tr style='color: black'><td> 产品序列号:" +
p.SerialNumber +
"</td></tr>";
info +=
"<tr style='color: black'><td> 系统版本:" +
p.Version +
"</td></tr>";
i++;
}
info += "</table>";
return info;
}
//用户帐号信息
function UidInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_UserAccount");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td width='450'>用户帐号信息:</td></tr>";
var i = 1;
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.AccountType +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.Caption +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.Description +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.Disabled +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.Domain +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.FullName +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.InstallDate +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.LocalAccount +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.Lockout +
"</td></tr>";
info +=
"<tr style='color: black'><td > " + i + ":" + p.Name + "</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.PasswordChangeable +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.PasswordExpires +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.PasswordRequiblack +
"</td></tr>";
info +=
"<tr style='color: black'><td > " + i + ":" + p.SID + "</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.SIDType +
"</td></tr>";
info +=
"<tr style='color: black'><td > " +
i +
":" +
p.Status +
"</td></tr>";
i++;
}
info += "</table>";
return info;
}
//系统组帐号信息
function SysuidInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_GroupUser");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td colspan='3'>系统组帐号信息:</td></tr>";
info +=
"<tr style='color: black'><td >id</td><td >GroupComponent</td><td >PartComponent</td></tr>";
var i = 1;
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info += "<tr style='color: black'><td > " + i + "</td>";
info += "<td>" + p.GroupComponent + "</td>";
info += "<td>" + p.PartComponent + "</td></tr>";
i++;
}
info += "</table>";
return info;
}
//系统管理组信息
function SysmadInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_Group");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td colspan='10'>系统管理组信息:</td></tr>";
info +=
"<tr style='color: black'><td >id</td><td >Caption</td><td >Description</td><td >Domain</td><td >InstallDate</td><td >LocalAccount</td><td >Name</td><td >SID</td><td >SIDType</td><td >Status</td></tr>";
var i = 1;
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info += "<tr style='color: black'><td>" + i + "</td>";
info += "<td>" + p.Caption + "</td>";
info += "<td>" + p.Description + "</td>";
info += "<td>" + p.Domain + "</td>";
info += "<td>" + p.InstallDate + "</td>";
info += "<td>" + p.LocalAccount + "</td>";
info += "<td>" + p.Name + "</td>";
info += "<td>" + p.SID + "</td>";
info += "<td>" + p.SIDType + "</td>";
info += "<td>" + p.Status + "</td></tr>";
i++;
}
info += "</table>";
return info;
}
//系统安装的服务信息
function SysserInfo() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_Service");
var e = new Enumerator(properties);
var info = "<table border=1>";
info +=
"<tr bgcolor='#CDEDED' style='font-weight: bold;' ><td colspan='26'>系统安装的服务信息:</td></tr>";
info +=
"<tr style='color: black'><td>id</td><td>AcceptPause</td><td>AcceptStop</td><td>Caption</td><td>CheckPoint</td><td>CreationClassName</td><td>Description</td><td>DesktopInteract</td><td>DisplayName</td><td>ErrorControl</td><td>ExitCode</td><td>InstallDate</td><td>Name</td><td>PathName</td><td>ProcessId</td><td>ServiceSpecificExitCode</td><td>ServiceType</td><td>Started</td><td>StartMode</td><td>StartName</td><td>State</td><td>Status</td><td>SystemCreationClassName</td><td>SystemName</td><td>TagId</td><td>WaitHint</td></tr>";
var i = 1;
for (; !e.atEnd(); e.moveNext()) {
var p = e.item();
info += "<tr style='color: black'><td> " + i + "</td> ";
info += " <td>" + p.AcceptPause + "</td> ";
info += " <td>" + p.AcceptStop + "</td> ";
info += " <td>" + p.Caption + "</td> ";
info += " <td>" + p.CheckPoint + "</td> ";
info += " <td>" + p.CreationClassName + "</td> ";
info += " <td>" + p.Description + "</td> ";
info += " <td>" + p.DesktopInteract + "</td> ";
info += " <td>" + p.DisplayName + "</td> ";
info += " <td>" + p.ErrorControl + "</td> ";
info += " <td>" + p.ExitCode + "</td> ";
info += " <td>" + p.InstallDate + "</td> ";
info += " <td>" + p.Name + "</td> ";
info += " <td>" + p.PathName + "</td> ";
info += " <td>" + p.ProcessId + "</td> ";
info += " <td>" + p.ServiceSpecificExitCode + "</td> ";
info += " <td>" + p.ServiceType + "</td> ";
info += " <td>" + p.Started + "</td> ";
info += " <td>" + p.StartMode + "</td> ";
info += " <td>" + p.StartName + "</td> ";
info += " <td>" + p.State + "</td> ";
info += " <td>" + p.Status + "</td> ";
info += " <td>" + p.SystemCreationClassName + "</td> ";
info += " <td>" + p.SystemName + "</td> ";
info += " <td>" + p.TagId + "</td> ";
info += " <td>" + p.WaitHint + "</td></tr>";
i++;
}
info += "</table>";
return info;
}
function s2Time(str) {
var strTemp =
str.substring(0, 4) +
"-" +
str.substring(4, 6) +
"-" +
str.substring(6, 8);
return strTemp;
}
</script>
</head>
<body></body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。