Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Can Perl read CPU id?

by fglock (Vicar)
on Feb 10, 2005 at 20:01 UTC ( [id://429901]=note: print w/replies, xml ) Need Help??


in reply to Can Perl read CPU id?

Is there a perl script that can read the cpu id of the computer that runs the specific perl script

This works for me - Install this script in the cgi directory in the server, and you will be able to read the cpu id using a browser (note: you must install the "cpuid" executable)

#! /usr/bin/perl use strict; print "Content-type: text/plain\n\n"; print `cpuid`;

is there a way also to spoof the cpu id

Sure. Just use this other script instead:

#! /usr/bin/perl use strict; print "Content-type: text/plain\n\n"; print <<EOT; eax in eax ebx ecx edx 00000000 00000002 756e6547 6c65746e 49656e69 00000001 00000f29 0602080b 00004400 bfebfbff 00000002 665b5001 00000000 00000000 007b7040 80000000 80000004 00000000 00000000 00000000 80000001 00000000 00000000 00000000 00000000 80000002 20202020 20202020 20202020 20202020 80000003 6e492020 286c6574 58202952 286e6f65 80000004 20294d54 20555043 36302e33 007a4847 Vendor ID: "GenuineIntel"; CPUID level 2 Intel-specific functions: Version 00000f29: Type 0 - Original OEM Family 15 - Pentium 4 Extended family 0 Model 2 - Stepping 9 Reserved 0 Brand index: 11 [not in table] Extended brand string: " Intel(R) Xeon(TM) CPU 3.06GH +z" CLFLUSH instruction cache line size: 8 Initial APIC ID: 6 Hyper threading siblings: 2 [cut] EOT

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://429901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-18 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found