403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/SMSC client .NET/samples/vb-6.0/UCP/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/SMSC client .NET/samples/vb-6.0/UCP/Main.frm
VERSION 5.00
Begin VB.Form fmMain 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "SMSC client .NET UCP sample"
   ClientHeight    =   8025
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6195
   Icon            =   "Main.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8025
   ScaleWidth      =   6195
   StartUpPosition =   2  'CenterScreen
   Begin VB.CheckBox chkUseAuthentication 
      Caption         =   "Use authentication (OT-60 operation)"
      Height          =   255
      Left            =   1500
      TabIndex        =   10
      Top             =   2100
      Width           =   3015
   End
   Begin VB.TextBox txtAccount 
      Height          =   315
      Left            =   1500
      TabIndex        =   6
      Top             =   1380
      Width           =   1755
   End
   Begin VB.TextBox txtTON 
      Height          =   315
      Left            =   3900
      TabIndex        =   7
      Text            =   "1"
      Top             =   1380
      Width           =   615
   End
   Begin VB.TextBox txtNPI 
      Height          =   315
      Left            =   3900
      TabIndex        =   9
      Text            =   "1"
      Top             =   1740
      Width           =   615
   End
   Begin VB.TextBox txtPassword 
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   1500
      PasswordChar    =   "*"
      TabIndex        =   8
      Top             =   1740
      Width           =   1755
   End
   Begin VB.CheckBox chkDirectDisplay 
      Caption         =   "Direct display (Flash SMS)"
      Height          =   255
      Left            =   1500
      TabIndex        =   17
      Top             =   5520
      Width           =   3015
   End
   Begin VB.CheckBox chkStatusReport 
      Caption         =   "Request status report for the message"
      Height          =   255
      Left            =   1500
      TabIndex        =   16
      Top             =   5280
      Value           =   1  'Checked
      Width           =   3015
   End
   Begin VB.TextBox txtUDH 
      Height          =   495
      Left            =   1500
      MultiLine       =   -1  'True
      TabIndex        =   14
      Top             =   4260
      Width           =   3015
   End
   Begin VB.ComboBox cbEncoding 
      Height          =   315
      ItemData        =   "Main.frx":000C
      Left            =   1500
      List            =   "Main.frx":0019
      Style           =   2  'Dropdown List
      TabIndex        =   15
      Top             =   4800
      Width           =   3015
   End
   Begin VB.TextBox txtOriginator 
      Height          =   315
      Left            =   1500
      TabIndex        =   11
      Top             =   2700
      Width           =   3015
   End
   Begin VB.CommandButton cmdInitialize 
      Caption         =   "Initialize"
      Height          =   345
      Left            =   4800
      TabIndex        =   2
      Top             =   1380
      Width           =   1035
   End
   Begin VB.TextBox txtDestination 
      Height          =   315
      Left            =   1500
      TabIndex        =   12
      Top             =   3060
      Width           =   3015
   End
   Begin VB.TextBox txtLog 
      Height          =   1515
      Left            =   300
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   18
      Top             =   6240
      Width           =   5595
   End
   Begin VB.CommandButton cmdSubmit 
      Caption         =   "Submit"
      Height          =   345
      Left            =   4800
      TabIndex        =   3
      Top             =   2700
      Width           =   1035
   End
   Begin VB.TextBox txtSubmit 
      Height          =   795
      Left            =   1500
      MultiLine       =   -1  'True
      TabIndex        =   13
      Top             =   3420
      Width           =   3015
   End
   Begin VB.CommandButton cmdDisconnect 
      Caption         =   "Disconnect"
      Height          =   345
      Left            =   4800
      TabIndex        =   1
      Top             =   720
      Width           =   1035
   End
   Begin VB.TextBox txtPort 
      Height          =   315
      Left            =   3900
      TabIndex        =   5
      Text            =   "0"
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox txtHost 
      Height          =   315
      Left            =   1500
      TabIndex        =   4
      Text            =   "0.0.0.0"
      Top             =   240
      Width           =   1755
   End
   Begin VB.CommandButton cmdConnect 
      Caption         =   "Connect"
      Height          =   345
      Left            =   4800
      TabIndex        =   0
      Top             =   240
      Width           =   1035
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "Account:"
      Height          =   195
      Left            =   300
      TabIndex        =   30
      Top             =   1440
      Width           =   645
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "TON:"
      Height          =   195
      Left            =   3360
      TabIndex        =   29
      Top             =   1440
      Width           =   390
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "NPI:"
      Height          =   195
      Left            =   3360
      TabIndex        =   28
      Top             =   1800
      Width           =   315
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "Password:"
      Height          =   195
      Left            =   300
      TabIndex        =   27
      Top             =   1800
      Width           =   735
   End
   Begin VB.Label Label17 
      AutoSize        =   -1  'True
      Caption         =   "Event log:"
      Height          =   195
      Left            =   300
      TabIndex        =   26
      Top             =   6000
      Width           =   720
   End
   Begin VB.Line Line3 
      BorderColor     =   &H8000000C&
      X1              =   240
      X2              =   5940
      Y1              =   5880
      Y2              =   5880
   End
   Begin VB.Label Label16 
      Caption         =   "User Data Header:"
      Height          =   435
      Left            =   300
      TabIndex        =   25
      Top             =   4260
      Width           =   855
      WordWrap        =   -1  'True
   End
   Begin VB.Line Line2 
      BorderColor     =   &H8000000C&
      X1              =   240
      X2              =   5940
      Y1              =   2520
      Y2              =   2520
   End
   Begin VB.Line Line1 
      BorderColor     =   &H8000000C&
      X1              =   240
      X2              =   5940
      Y1              =   1200
      Y2              =   1200
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "Encoding:"
      Height          =   195
      Left            =   300
      TabIndex        =   24
      Top             =   4860
      Width           =   720
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Originator:"
      Height          =   195
      Left            =   300
      TabIndex        =   23
      Top             =   2760
      Width           =   720
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "Message:"
      Height          =   195
      Left            =   300
      TabIndex        =   22
      Top             =   3480
      Width           =   690
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "Destination:"
      Height          =   195
      Left            =   300
      TabIndex        =   21
      Top             =   3120
      Width           =   840
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Port:"
      Height          =   195
      Left            =   3360
      TabIndex        =   20
      Top             =   300
      Width           =   330
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "SMSC address:"
      Height          =   195
      Left            =   300
      TabIndex        =   19
      Top             =   300
      Width           =   1095
   End
End
Attribute VB_Name = "fmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'------------------------------------------------------------------------------
' SMSC client .NET components UCP sample application of COM interface
'
' $Header: $
' Copyright (c) 2003-2013 Tops. All rights reserved.
'------------------------------------------------------------------------------

Private WithEvents ucp As SMSCclientUCP
Attribute ucp.VB_VarHelpID = -1

Option Explicit

' Connect to SMSC
Private Sub cmdConnect_Click()
    Dim Result As Long
    
    txtLog = ""
    AddConnectingEvent txtLog
    txtLog.Refresh
    
    Result = ucp.tcpConnect(txtHost, txtPort)
    
    If Result <> 0 Then
        AddConnectionErrorEvent txtLog, Result
    Else
        AddConnectedEvent txtLog
    End If
End Sub

' Disonnect from SMSC
Private Sub cmdDisconnect_Click()
    ucp.tcpDisconnect
End Sub

' Initialize session with SMSC
Private Sub cmdInitialize_Click()
    Dim Result As Long
    
    Result = ucp.ucpInitializeSession(txtAccount, txtTON, txtNPI, txtPassword, chkUseAuthentication.Value = vbChecked, "")
        
    If Result <> 0 Then
        AddInitializationErrorEvent txtLog, Result
    Else
        AddInitializedEvent txtLog
    End If
End Sub

' Submit message to the SMSC
Private Sub cmdSubmit_Click()
    Dim Result As Long
    Dim SystemMessage As String
    Dim TimeStamp As Date
    Dim Encoding As EncodingEnum
    Dim Options As Long
    
    Select Case cbEncoding.ListIndex
        Case 2
            Encoding = EncodingEnum_etUCS2Text
        Case 1
            Encoding = EncodingEnum_et8BitHexadecimal
        Case Else
            Encoding = EncodingEnum_et7BitText
    End Select
    
    If Encoding = EncodingEnum_etUCS2Text Then
      If MsgBox("Because of the nature of the VB controls, which do not " & _
        "support UNICODE the message will only be sent correctly if the " & _
        "characters entered in the Message box match the default code page. " & _
        vbCrLf & vbCrLf & "Do you want to continue?", vbQuestion + vbYesNo) <> vbYes Then
        Exit Sub
      End If
    End If
    
    Options = 0
    If chkStatusReport.Value = vbChecked Then _
        Options = Options Or SubmitOptionEnum_soRequestStatusReport
    If chkDirectDisplay.Value = vbChecked Then _
        Options = Options Or SubmitOptionEnum_soDirectDisplay
    
    Result = ucp.ucpSubmitMessage(txtDestination, txtOriginator, txtSubmit, Encoding, txtUDH, Options, SystemMessage, TimeStamp)
    
    If Result <> 0 Then
        AddMessageSubmissionErrorEvent txtLog, Result
    Else
        AddMessageSubmitedEvent txtLog, , TimeStamp
    End If
End Sub

Private Sub Form_Load()
    Set ucp = New SMSCclientUCP
    cbEncoding.ListIndex = 0
End Sub

' Disconnected from SMSC
Private Sub ucp_OnTcpDisconnected(ByVal sender As Variant, ByVal e As smscc.ITcpDisconnectedEventArgs)
    AddDisconnectedEvent txtLog, e.Reason
End Sub

' Message received from SMSC
Private Sub ucp_OnUcpMessageReceived(ByVal sender As Variant, ByVal e As smscc.IUcpMessageReceivedEventArgs)
    AddMessageReceivedEvent txtLog, e.Destination, e.Originator, e.Content, e.Encoding, e.UserDataHeader, e.TimeStamp
End Sub

' Status Report (SR) received from SMSC
Private Sub ucp_OnUcpStatusReportReceived(ByVal sender As Variant, ByVal e As smscc.IUcpStatusReportReceivedEventArgs)
    AddStatusReportReceivedEvent e.txtLog, e.Destination, e.DeliveryStatus, e.ReasonCode, e.Originator, , e.MessageTimeStamp, e.TimeStamp
End Sub

Youez - 2016 - github.com/yon3zu
LinuXploit