PHP Detect Service

  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Feb 17, 2005
  • Posts: 1585
  • Status: Offline

Post August 28th, 2010, 7:43 am

Does anybody know if there is a way to detect running services on a machine with PHP? I'm just trying to get around a bug with something and it also interests me.
There's no place like 127.0.0.1, badass part is now it's ::1
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 28th, 2010, 7:43 am

  • Rincewind
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jan 24, 2004
  • Posts: 10
  • Loc: Glasgow, Scotland
  • Status: Offline

Post August 28th, 2010, 8:28 am

It would depend on the permissions that php has on your box, but something like:
PHP Code: [ Select ]
$service =   shell_exec('ps -x');

This would give you all the services running and their PID.
  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Feb 17, 2005
  • Posts: 1585
  • Status: Offline

Post August 28th, 2010, 5:45 pm

I was trying to find a way to do it internally with PHP, but if that's the only way, I guess so... cheers
There's no place like 127.0.0.1, badass part is now it's ::1

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 269 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.