Send method is used to send arbitrary text data to
connected user at any time, if applicable. You can use it
to create random 'chat sessions' with the user, or
to send specific information to the user.
Send method becomes valid after ServiceStart
event is fired for particular service. It can be used only
if Service is set to stNone, stShell or
stExecute. Using Send method with
stSubsystem or stPortForwarding can produce unexpected results
and will probably cause client to receive garbled data, and
finally disconnect.
ServiceIndex parameter is
optional. If not set, default service is used (this is
usually a shell).
You can generate custom banners when someone connects to
the server as easy as this (VB sample):
Private Sub wodSSHD1_ServiceStart(ByVal User
As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long,
ByVal ServiceType As wodSSHDComLIB.SSHServiceTypes, ByVal
ServiceName As String)
' show nice message
User.Send "# # #
###### #
#### #### #
# ######" & vbCrLf
User.Send "# # #
#
# #
# # # ## ##
#" & vbCrLf
User.Send "# # #
##### #
# #
# # ## # #####" & vbCrLf
User.Send "# # #
#
#
# #
# # # #" &
vbCrLf
User.Send "# # #
#
# #
# # # #
# #" & vbCrLf
User.Send " ## ##
###### ###### ####
#### # # ######"
& vbCrLf
User.Send vbCrLf & "You have
connected to wodSSHD server. Feel free to stay." &
vbCrLf & vbCrLf
User.Send "You are coming from host
" & User.RemoteIP & vbCrLf
User.Send "Your login is "
& User.Login & vbCrLf
User.Send "You connected at "
& Format(User.TimeConnected, "dddd, mmm d yyyy
h:m") & vbCrLf
User.Send "So far you have received
" & User.BytesDownload & "
bytes"
User.Disconnect ' this isn't
really very nice from us
End Sub