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