2017 © Pedro Peláez
 

library wsman

WSMan for PHP

image

c0py/wsman

WSMan for PHP

  • Wednesday, March 7, 2018
  • by c0py
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Wsman - A PHP package for WS-Management Protocol

-- Coming soon!, (*1)

Installation

You don't (just yet). The package is not quite ready ^_^, (*2)

Usage

Create a client

use dcone80\Wsman\Wsman;

$client = new Wsman([
        'location' => "http://TARGET-HOST:5985",
        'login' => 'username',
        'password' => 'password',
    ]);

Simple Queries

Identity target, (*3)

$response = $client->identify();

Get WinRM Config, (*4)

$config = $client->get('winrm/config');

WMI Queries

Get Volume C:, (*5)

$response = $client->get('wmicimv2/Win32_logicaldisk', ['DeviceId' => 'C:']);

List Windows Services:, (*6)

$response = $client->enumerate('wmicimv2/Win32_Service');

Using WQL:, (*7)

$params = [
    'dialect' => 'WQL',
    'query' => 'select * from Win32_Service WHERE DelayedAutoStart = "true"'
];
$results = $client->enumerate('wmicimv2/*', $params);

Windows Registy Query

$params = [
  'hDefKey' => '2147483650',
  'sSubKeyName' => 'SOFTWARE\Microsoft\Windows NT\CurrentVersion',
  'sValueName' => 'ProductName'
];

$response = $client->invoke('GetStringValue', 'wmi/root/default/StdRegProv', $params);

TODO

  • [x] Support for BASIC Authentication
  • [x] Support for Negotiate Authentication
  • [x] Implement Get Method
  • [x] Implement Identify Method
  • [x] Implement Enumerate Method
  • [x] Implement Invoke Method
  • [ ] Implement Put Method
  • [ ] Implement Delete Method
  • [ ] Handle Errors and failed requests
  • [x] Use Guzzlehttp client instead of plain CURL
  • [ ] Test againsts non-Windows based devices
  • [ ] Handle/Remove hard-coded language tags in SOAP headers

The Versions

07/03 2018

dev-master

9999999-dev

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

04/12 2017

v0.68-beta

0.68.0.0-beta

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

04/12 2017

v0.67-beta

0.67.0.0-beta

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

01/12 2017

v0.66-beta

0.66.0.0-beta

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

01/12 2017

v0.65-beta

0.65.0.0-beta

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

26/11 2017

v0.6-beta

0.6.0.0-beta

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

25/11 2017

v0.5-beta

0.5.0.0-beta

WSMan for PHP

  Sources   Download

MIT

The Requires

 

by Avatar c0py

20/11 2017

dev-dcom

dev-dcom

WSMan for PHP

  Sources   Download

MIT

by Avatar c0py

14/11 2017

v0.3-alpha

0.3.0.0-alpha

WSMan for PHP

  Sources   Download

MIT

by Avatar c0py

03/11 2017

v0.2-alpha

0.2.0.0-alpha

WSMan for PHP

  Sources   Download

MIT

by Avatar c0py