Difference between revisions of "Unit RemoteShell"

From Ultibo.org
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
'''Ultibo Remote Shell unit'''
 
'''Ultibo Remote Shell unit'''
 
''To be documented''
 
  
 
=== Constants ===
 
=== Constants ===
Line 14: Line 12:
  
 
<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 23:
 
<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 34:
 
<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 45:
 
<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 56:
 
<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 67:
 
<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 78:
 
<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;"
Line 100: Line 98:
  
  
'''Telnet shell'''
+
'''Remote shell specific classes'''
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
<code>TTelnetShell = class(TShell)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TTelnetShell|<code>TTelnetShell = class(TShell)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FListener:TTelnetListener;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>procedure TelnetConnected(AConnection:TTelnetConnection);</code>
+
| &nbsp;
+
|-
+
| <code>procedure TelnetDisconnected(AConnection:TTelnetConnection);</code>
+
| &nbsp;
+
|-
+
| <code>function TelnetInit(AConnection:TTelnetConnection):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function TelnetChar(AConnection:TTelnetConnection; AChar:Char):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function TelnetCommand(AConnection:TTelnetConnection; ACommand,AOption:Byte; AData:Pointer; ASize:LongWord):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Listener:TTelnetListener read FListener;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoClear(ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoInput(ASession:TShellSession; var AInput:String):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function MatchSequence(const ASequence:String; var AContinue:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ProcessSequence(const ASequence:String):Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Telnet session'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTelnetSession = class(TShellSession)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TTelnetSession|<code>TTelnetSession = class(TShellSession)</code>]]
|-
+
| <code>Command:String;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>Sequence:String;</code>
+
| &nbsp;
+
|-
+
| <code>Position:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''SSH shell'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TSSHShell = class(TShell)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TSSHShell|<code>TSSHShell = class(TShell)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div> 
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''Telnet shell logout'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTelnetShellLogout = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TTelnetShellLogout|<code>TTelnetShellLogout = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''SSH shell logout'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TSSHShellLogout = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
 
|-
 
|-
|colspan="2"|&nbsp;
+
| [[TSSHShellLogout|<code>TSSHShellLogout = class(TShellCommand)</code>]]
 
|-
 
|-
 
|}
 
|}
</div></div>
 
 
<br />
 
<br />
  
Line 305: Line 144:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-

Latest revision as of 06:05, 31 August 2021

Return to Unit Reference


Description


Ultibo Remote Shell unit

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



Remote shell specific classes

TTelnetShell = class(TShell)
TTelnetSession = class(TShellSession)
TSSHShell = class(TShell)
TTelnetShellLogout = class(TShellCommand)
TSSHShellLogout = class(TShellCommand)


Public variables


None defined

Function declarations



Initialization functions

procedure RemoteShellInit;
Description: To be documented
Note None documented


Return to Unit Reference