Hard disk
private void GetInfo (){String cpuInfo = "";//cpu serial numberManagementClass cimobject = new ManagementClass ("Win32_Processor");Managementobjectcollection MOC = Cimobject. GetInstances ();foreach (ManagementObject mo in MOC){CpuInfo = mo. properties["Processorid"]. Value.tostring ();Response.Write ("CPU serial Number:" +cpuinfo.tostring ());}
Get the hard drive IDString Hdid;ManagementClass Cimobject1 = new ManagementClass ("win32_diskdri
In the recent acquisition of Linux process network indicators, in order to compare the results, the Linux system needs to view the process network traffic command, finally found nethogs this tool useful, but in the download installation process encountered problems:1:http://blog.csdn.net/camlot_/article/details/47424671Problem:sudo apt-get install nethogsWhen Mac:-bash:apt-get:command not foundThe above lin
Because the WiFi MAC address is a passive consulting. Generally after the boot, will not be active into the system. To wait for the WiFi hardware to boot, the relevant MAC address data will be recorded in the system. Therefore, the general Android system to obtain the MAC address when the following situations occur:1. You can
C #
get local
IP
Address and
MAC
Address 1, obtain the LAN IP address through the host name; try { iphostentry iphostentry = Dns.gethostentry (Txthost.text);//pass Computer name if (ipHostEntry.Aliases.Length > 0) { foreach (string Alias in iphostentry.aliases) txtip.text = alias; } //Get IP address foreach (IPAddress addr in iphostentry.addres
Java code get computer IP, MAC, various versions Packagecom.rapoo.middle.action;ImportJava.io.BufferedReader;ImportJava.io.InputStream;ImportJava.io.InputStreamReader;Importjava.net.InetAddress;ImportJava.net.NetworkInterface;Importjava.util.ArrayList;ImportJava.util.Formatter;Importjava.util.List;ImportJava.util.Locale;ImportJava.util.Map;Importjava.util.Properties; Public classSystemutil {//Computer Conf
You can use the following code to get the MAC address, depending on your actual needs./*** get MAC address * @param ipAddress127.0.0.1* @return based on IP address * @throws SocketException* @throws unknownhostexception*/publicstatic stringgetlocalmac (stringipaddress) throwssocketexception,unknownhostexception {//TOD
Recently, due to the needs of the project, the need to get the machine's hard drive serial number and MAC address information, under C #, it is easy to obtain this information, but in the C + + program feel more trouble. After Baidu, found that a lot of prawns are through the WMI to obtain these hardware information, the network also has relevant code, through the actual debugging, but also found that it is
First introduce the service and then call the
This paper is reproduced from http://blog.sina.com.cn/s/blog_7eeb43210101hf7f.html
public class Computer {public static string CpuID;//1.cpu serial number public static string MacAddress;//2. Mac serial number public static string DiskID; 3. Hard disk ID public static string ipaddress; 4.ip address public static string loginusername; 5. Login username public static string ComputerName; 6. Computer name
/** * Get MAC Address **/classgetmacaddr{var $return _array=Array();//returns an array of strings with MAC addresses var $mac _addr; functionGETMACADDR ($os _type){ Switch(Strtolower($os _type) ){ Case"Linux":$this-Forlinux (); Break; Case"Solaris": Break; Case"UNIX": Break; Case"Aix": Break;
Public class getip{[Dllimport ("iphlpapi. dll")] // comes with the operating systemPrivate Static extern int sendarp (int32 DEST, int32 host, ref int64 Mac, ref int32 length );[Dllimport ("ws2_32.dll")]Private Static extern int32 inet_addr (string IP );
// Obtain the IP address of the Local MachinePublic String getlocalip (){String strhostname = DNS. gethostname (); // obtain the Host Name of the local machine.Iphostentry ipentry = DNS. gethostbyname
Gets the physical (MAC) address of the machine's network card.Code:
. The code is as follows:
/**
* Get the physical (MAC) address of the machine's network card
* currently supports Win/linux system
**/
class Macaddinfo {
var $return _array = Array (); Returns a string array with a MAC add
There are some ways to get the MAC address on the network as follows:1. Send the ARP command, using the returned MAC address buffer to get2. Use Networkinterface.getallnetworkinterfaces () to obtain all network cards (including virtual network cards) to obtain the appropriate MAC address3. Also available from the local
For a habit of using the Ubuntu terminal on the Apt-get to install the tool software, I also hope to find similar tools on the Mac, a very convenient command to install the required software, instead of manually to find the download compile, or toss the installation of some of the dependencies required. It's a surprise to find that there are similar tool package managers on
/**Get the physical (MAC) address of the machine's network cardWWA $Exp**/Class Getmacaddr{var $return _array = Array (); Returns an array of strings with a MAC addressvar $mac _addr;function getmacaddr ($os _type){Switch (Strtolower ($os _type)){Case "Linux":$this->forlinux ();BreakCase "Solaris":BreakCase "UNIX":Brea
The following actions are done in the Command Prompt window.Known IP, how to get the computer nameMethod (1):Use Ping-i IP AddressFor example, the known address is 192.168.1.168.Then use Ping-i 192.168.1.168 if you can ping the computer. You can get the name of the computerMethod (2):Use Nbtstat-a plus IP to check the host name of each otherFor example Nbtstat-a 192.168.1.168Known computer name, how to
First, the use of JS to obtain the client IP several methodsMethod one (only for IE and the client's IE allows Acitivex to run, through the platform: xp,server03,2000).Get the client IP code:Get IP:Method Two (all platforms and browsers):Get the IP that the client is in the network, provided that the customer is networked. The Sina interface is used. Method Three (all platforms and browsers):Sohu Interface
");
document.write ("Computer name =" + wshshell.expandenvironmentstrings ("%computername%") + "br/>");
document.write ("Login username =" + wshshell.expandenvironmentstrings ("%USERNAME%") + "br/>");
Script>
BODY>
HTML>
Method Four (ie only and the client's IE allows Acitivex to run):Get the computer name, login username, and domain name (if you join a domain, it shows you which domain the machine is in).
HTML>
HEAD>
title>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.