search
Homephp教程PHP源码PHP获得计算机的唯一标识[cpu,网卡]

跳至

//获取电脑的CPU信息

function OnlyU(){
        $a = '';
        $b = array();
        if(function_exists('exec')){
                if(mailto:!@exec( /all",$b)){
                        return false;
                }
        }elseif(function_exists('system')){
                ob_start();
                if(mailto:!@system( /all")){
                        return false;
                }else{
                }
                $b = ob_get_contents();
                ob_end_clean();
                $b = explode("\n",$b);//print_r($b);
                array_pop($b);
        }else{
                return false;
        }

        $all = sizeof($b);
        for($i = 0; $i < $all; $i++){
                if(strpos($b[$i],"Description") !== false){
                        if(strpos($b[$i+1],"Physical Address") !== false){
                                $c = explode(":",$b[$i+1]);
                                $a = trim($c[1]);
                                break;
                        }
                }
        } // End for
        return empty($a)?false:$a;
} // End function OnlyU

 

//获取网卡的MAC的地址

function getMAC() {
 @exec("ipconfig /all",$array);
 for($Tmpa;$Tmpa<count($array);$Tmpa++){
  if(eregi("Physical",$array[$Tmpa])){
   $mac=explode(":",$array[$Tmpa]);
   return $mac[1];
  }
 }
}

                   

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools