Jump to content

Parsing 'passwd' in PHP


ChrisMartino

Recommended Posts

Hey there thanks again for your time reading this thread!.

 

So here's my issue,

 

I have a include I found on the internet that is very handy for sending commands to a machine if the host doesn't have SSH2 installed, now my problem is that I haven't got a clue how to parse passwd due to the fact that it's a prompt on the console, here's the include that I use:

 

http://phpseclib.sourceforge.net

 

And a example of how I run a command:

 

$ssh = new Net_SSH2('www.domain.tld');
if (!$ssh->login('username', 'password')) {
        exit('Login Failed');
}

$ssh->exec('adduser HelloWorld');

echo $ssh->exec('uptime');

 

But how would I run passwd?, thanks for your time.

 

Link to comment
https://forums.phpfreaks.com/topic/210083-parsing-passwd-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.