Nik has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Can Perl read CPU id?
by dragonchild (Archbishop) on Feb 09, 2005 at 22:30 UTC
    Yes, and yes.

    As for the specifics for the party of the first part ... Perl can do access use any code that has been written in any language. Look at Inline.

    As for the specifics for the party of the second part ... the spoof is going to be accessor-specific, just like MAC address spoofing is.

    An aside: you really need to learn a few things.

    • Spelling
    • Grammar
    • Subtlety

    While English may or may not be your first language, you write as if you're a street punk. That won't win you many friends among the people whose knowledge you want to mine.

    Update: Fixed grammatical error per g0n's reply.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      No offence Dragonchild, but this:
      Perl can do access any code...
      isn't particularly grammatically correct either.

      VGhpcyBtZXNzYWdlIGludGVudGlvbmFsbHkgcG9pbnRsZXNz
    A reply falls below the community's threshold of quality. You may see it by logging in.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Can Perl read CPU id?
by gellyfish (Monsignor) on Feb 10, 2005 at 09:22 UTC

    If this is the same thing that you have been banging on about without actually listening to what you have been told (like OT: Unique identification of a visitors pc), then the answer is again NO YOU CAN'T you cannot retrieve arbitrary information for a remote computer in a CGI program. Besides not all computers have a CPU which has a "CPU ID" and some CPUs allow you to turn it off or change it.

    /J\

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Can Perl read CPU id?
by fglock (Vicar) on Feb 10, 2005 at 20:01 UTC

    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
    A reply falls below the community's threshold of quality. You may see it by logging in.