jonsjava Posted May 9, 2008 Share Posted May 9, 2008 ....scripts: This code will tell you who runs your web scripts. (more useful than most would think). I wrote it for an open-source app that I write, and I decided someone might find this to be of use. <?php $iam = exec("whoami"); if ($iam == ""){ print "you are on a windows machine!"; print "<br /> Try installing <a href='http://www.microsoft.com/downloads/details.aspx?familyid=3E89879D-6C0B-4F92-96C4-1016C187D429&displaylang=en'>Windows 2000 Resource Kit Tool: Whoami.exe</a>"; print "<br /> (hint) after downloading and installing, go to c:\\Program Files\\Resourcekit\\ and copy WHOAMI.EXE to c:\\Windows\\System32)"; exit(); } else{ if (strstr($iam, "\\")){ $name_array = explode("\\", $iam); $name = $name_array[1]; print "the domain that you are attached to: ".$name_array[0]; print "\n<br /> your username: $name"; exit(); } else{ print "the user who handles all your web scripts is: ".$iam; exit(); } } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.