System, Method, and Apparatus for Remote Computer Command Execution
A system, method, and apparatus for executing a command on a remote computer includes installing a push controller module on an end-point device. Upon initialization of the end-point device, the push controller module begins running and establishes a connection to a push server. Upon receiving the command for the end-point device, the push server forwards the command to the push controller module that is running on the end-point device and responsive to receiving the command, the push controller module executes the command.
1 . A system for remote computer command execution, the system comprising:
a push server;
a plurality of end-point device;
a push controller module installed on each of the end-point devices, each push controller module initializing upon start-up of a respective one of the end-point devices, and each push controller module automatically establishing a connection to the push server;
upon receiving a command for execution on one of the end-point devices from a web portal computer, the push server forwards the command to the push controller module of the one of the end-point devices over a respective one of the connections;
upon receiving the command, the push controller module executes the command on the end-point device, captures output from the command and forwards the output to the push server; and
upon receiving the output from the push controller module, the push server forwards the output to the web portal computer.
2 . The system of claim 1 , wherein the connection to the push server is by a web socket connection.
3 . The system of claim 1 , wherein the push controller module checks the command for validity before executing by searching for the command in a blacklist and preventing execution of the command if the command is found in the blacklist.
4 . The system of claim 1 , wherein the push controller module captures the output from standard output and standard error when the push controller module executes the command.
5 . The system of claim 1 , wherein the system for remote computer command execution keeps track of a current directory for each end-point device and sets the directory to the current directory before the push controller module executes the command.
6 . A method of executing a command on a remote computer, the method comprising:
installing a push controller module on an end-point device;
upon initialization of the end-point device, running the push controller module;
establishing a connection to a push server by the push controller module;
upon receiving the command for the end-point device, the push server forwarding the command to the push controller module that is running on the end-point device; and
responsive to receiving the command, the push controller module executing the command.
7 . The method of claim 6 , further comprising:
during the step of executing the command, capturing an output of the command; and
sending the output of the command from the push controller module to the push server.
8 . The method of claim 6 , further comprising:
before the step of executing the command, setting a directory to a prior directory; and
after the step of executing the command, saving the directory as the prior directory.
9 . The method of claim 6 , further comprising:
before the step of executing the command, verifying that the command is allowed.
10 . The method of claim 9 , the step of verifying the command comprising:
looking for the command in a blacklist and if the command is in the blacklist, preventing the step of executing the command.
11 . Program instructions tangibly embodied in a non-transitory storage medium comprising at least one instruction configured to implement a system for executing a command on a remote computer, wherein the at least one instruction comprises:
computer readable instructions executed by a processor of an end-point device causing the end-point device to initiate a connection to a push server;
computer readable instructions executed by a processor of the push server causing the server to accept the connection;
computer readable instructions executed by the processor of the push server receiving the command for the end-point device;
responsive to the computer readable instructions executed by the processor of the push server receiving the command, the computer readable instructions executed by the processor of the push server causing the server to forward the command to the computer readable instructions executed by the processor of the end-point device; and
responsive to receiving the command, the computer readable instructions executed by the processor of the end-point device causing the end-point device to execute the command.
12 . The program instructions tangibly embodied in the non-transitory storage medium of claim 11 , further comprising:
during the end-point device executing the command, the computer readable instructions executed by the processor of the end-point device causing the end-point device to capture output of the command; and
the computer readable instructions executed by the processor of the end-point device causing the end-point device to send the output to the push server.
13 . The program instructions tangibly embodied in the non-transitory storage medium of claim 11 , further comprising:
the computer readable instructions executed by the processor of the end-point device causing the end-point device to execute the command, the computer readable instructions executed by the processor of the end-point device causing the end-point device to set a directory to a prior directory; and
after the computer readable instructions executed by the processor of the end-point device causing the end-point device to execute the command, the computer readable instructions executed by the processor of the end-point device causing the end-point device to save the directory as the prior directory.
14 . The program instructions tangibly embodied in the non-transitory storage medium of claim 11 , further comprising:
before the computer readable instructions executed by the processor of the end-point device causing the end-point device to execute the command, the computer readable instructions executed by the processor of the end-point device causing the end-point device to verify that the command is allowed.
15 . The program instructions tangibly embodied in the non-transitory storage medium of claim 14 , wherein the end-point device verifies the command by:
the computer readable instructions executed by the processor of the end-point device causing the end-point device to look for the command in a blacklist and if the command is in the blacklist, the computer readable instructions executed by the processor of the end-point device causing the end-point device to prevent execution of the command.