Difference between revisions of "Unit RemoteShell"

From Ultibo.org
Jump to: navigation, search
Line 14: Line 14:
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''Remote shell specific constants''' <code> REMOTE_SHELL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Remote shell''' <code> REMOTE_SHELL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 25: Line 25:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''Telnet shell constants''' <code> TELNET_SHELL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Telnet shell''' <code> TELNET_SHELL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 36: Line 36:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''Telnet shell command constants''' <code> TELNET_SHELL_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Telnet shell command''' <code> TELNET_SHELL_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 47: Line 47:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''Telnet shell alias constants''' <code> TELNET_SHELL_ALIAS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Telnet shell alias''' <code> TELNET_SHELL_ALIAS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 58: Line 58:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SSH shell constants''' <code> SSH_SHELL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SSH shell''' <code> SSH_SHELL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 69: Line 69:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SSH shell command constants''' <code> SSH_SHELL_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SSH shell command''' <code> SSH_SHELL_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 80: Line 80:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SSH shell alias constants''' <code> SSH_SHELL_ALIAS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SSH shell alias''' <code> SSH_SHELL_ALIAS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"

Revision as of 03:29, 27 March 2017

Return to Unit Reference


Description


Ultibo Remote Shell unit

To be documented

Constants



Remote shell REMOTE_SHELL_*
REMOTE_SHELL_DEFAULT_WELCOME = ' (Type HELP for a list of available commands)';  


Telnet shell TELNET_SHELL_*
TELNET_SHELL_NAME = 'Telnet Shell';  


Telnet shell command TELNET_SHELL_COMMAND_*
TELNET_SHELL_COMMAND_LOGOUT = 'LOGOUT';  


Telnet shell alias TELNET_SHELL_ALIAS_*
TELNET_SHELL_ALIAS_EXIT = 'EXIT';  


SSH shell SSH_SHELL_*
SSH_SHELL_NAME = 'SSH Shell';  


SSH shell command SSH_SHELL_COMMAND_*
SSH_SHELL_COMMAND_LOGOUT = 'LOGOUT';  


SSH shell alias SSH_SHELL_ALIAS_*
SSH_SHELL_ALIAS_EXIT = 'EXIT';  


Type definitions


None defined

Class definitions



Telnet shell

TTelnetShell = class(TShell)

public
constructor Create;  
destructor Destroy; override;  
private
FListener:TTelnetListener;  
protected
procedure TelnetConnected(AConnection:TTelnetConnection);  
procedure TelnetDisconnected(AConnection:TTelnetConnection);  
function TelnetInit(AConnection:TTelnetConnection):Boolean;  
function TelnetChar(AConnection:TTelnetConnection; AChar:Char):Boolean;  
function TelnetCommand(AConnection:TTelnetConnection; ACommand,AOption:Byte; AData:Pointer; ASize:LongWord):Boolean;  
public
property Listener:TTelnetListener read FListener;  
 
function DoClear(ASession:TShellSession):Boolean; override;  
 
function DoInput(ASession:TShellSession; var AInput:String):Boolean; override;  
 
function DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; override;  
 
function MatchSequence(const ASequence:String; var AContinue:Boolean):Boolean;  
function ProcessSequence(const ASequence:String):Boolean;  

Telnet session

TTelnetSession = class(TShellSession)

public
Command:String;  
Sequence:String;  
Position:LongWord;  
private
 
public
 

SSH shell

TSSHShell = class(TShell)

public
constructor Create;  
destructor Destroy; override;  
private
 
public
 

Telnet shell logout

TTelnetShellLogout = class(TShellCommand)

public
constructor Create;  
destructor Destroy; override;  
private
 
public
function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;  
function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;  
function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;  

SSH shell logout

TSSHShellLogout = class(TShellCommand)

public
constructor Create;  
destructor Destroy; override;  
private
 
public
 


Public variables


None defined

Function declarations



Initialization functions

procedure RemoteShellInit;
Description: To be documented
Note None documented


Return to Unit Reference