Jump to content

Server credentials


hackalive

Recommended Posts

Hi guys,

I am on the hunt for some code or method (that then I can write the code) that will allow me to do the following.

When someone visits mysite.com (as an example) I want it to trigger some code on a server (OS non specific) that then retrieves and displays to the user on the webbrowser the servers hard drive serial number, etc

 

Any help is much appreciated, thanks in advance

Link to comment
Share on other sites

And the answer is, you will need to use system to execute OS specific commands which retrieve said data and save it into a variable. eg;

 

$hdd = system($hddcmd);
$serial = system($serialcmd);

 

The contents of both $hddcmd and $serialcmd are not within the scope of php.

Link to comment
Share on other sites

Like I said, that question has nothing to do with php.

 

Most of the data you are looking for will likely be within the /proc directory or the output of ifconfig on Linux. I'm not a windows user so wouldn't even know where to start with it.

Link to comment
Share on other sites

if you want to test out those command on your computer

go start, run, type "cmd"(without quotes) and on the dos window, type those command u like

they are the same in $cmd of system("$cmd")

but if u want to execute a program, your php will hang, because no result will produce, and php keeps waiting it

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.