Parent

Class/Module Index [+]

Quicksearch

Rex::Post::Meterpreter::Extensions::Stdapi::Sys::Power

This class provides access to the power of the remote machine (reboot, etc).

Attributes

client[RW]

Public Class Methods

reboot(reason = 0) click to toggle source

Reboots the remote machine.

# File lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb, line 43
def Power.reboot(reason = 0)
        self._exitwindows(EWX_REBOOT, reason)
end
shutdown(force = 0, reason = 0) click to toggle source

Shuts down the remote machine.

# File lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb, line 50
def Power.shutdown(force = 0, reason = 0)
        flags  = EWX_POWEROFF
        flags |= EWX_FORCEIFHUNG if force == 1
        flags |= EWX_FORCE       if force == 2

        self._exitwindows(flags, reason)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.