VERSION 5.00
Object = "{93019C16-6A9D-4E32-A995-8B9C1D41D5FE}#1.0#0"; "prjChameleon.ocx"
Begin VB.Form FrmPackets 
   BackColor       =   &H00000000&
   BorderStyle     =   1  'Fest Einfach
   Caption         =   "SnG Fun v1 - Packets"
   ClientHeight    =   5775
   ClientLeft      =   270
   ClientTop       =   495
   ClientWidth     =   6270
   Icon            =   "FrmPacketSender.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5775
   ScaleWidth      =   6270
   StartUpPosition =   2  'Bildschirmmitte
   Begin prjChameleon.chameleonButton cmd_send_to_server 
      Height          =   375
      Left            =   4560
      TabIndex        =   9
      Top             =   5280
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   "Send to Server"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   2
      FOCUSR          =   -1  'True
      BCOL            =   0
      BCOLO           =   0
      FCOL            =   255
      FCOLO           =   65280
      MCOL            =   12632256
      MPTR            =   1
      MICON           =   "FrmPacketSender.frx":030A
      UMCOL           =   -1  'True
      SOFT            =   0   'False
      PICPOS          =   0
      NGREY           =   0   'False
      FX              =   0
      HAND            =   0   'False
      CHECK           =   0   'False
      VALUE           =   0   'False
   End
   Begin prjChameleon.chameleonButton cmd_send_to_client 
      Height          =   375
      Left            =   120
      TabIndex        =   8
      Top             =   5280
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   "Send to Client"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   2
      FOCUSR          =   -1  'True
      BCOL            =   0
      BCOLO           =   0
      FCOL            =   255
      FCOLO           =   65280
      MCOL            =   12632256
      MPTR            =   1
      MICON           =   "FrmPacketSender.frx":0326
      UMCOL           =   -1  'True
      SOFT            =   0   'False
      PICPOS          =   0
      NGREY           =   0   'False
      FX              =   0
      HAND            =   0   'False
      CHECK           =   0   'False
      VALUE           =   0   'False
   End
   Begin VB.CheckBox chk_pause_dec 
      Alignment       =   1  'Rechts ausgerichtet
      BackColor       =   &H00000000&
      Caption         =   "Pause"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   195
      Left            =   5250
      TabIndex        =   7
      Top             =   3970
      Width           =   855
   End
   Begin VB.CheckBox chk_pause_enc 
      BackColor       =   &H00000000&
      Caption         =   "Pause"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   195
      Left            =   120
      TabIndex        =   6
      Top             =   3970
      Width           =   855
   End
   Begin VB.TextBox txt_packetsend 
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Lucida Console"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   975
      Left            =   120
      MultiLine       =   -1  'True
      TabIndex        =   4
      Top             =   4200
      Width           =   6015
   End
   Begin VB.TextBox txt_packetlogs_dec 
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   3615
      Left            =   3120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertikal
      TabIndex        =   1
      Top             =   360
      Width           =   3000
   End
   Begin VB.TextBox txt_packetlogs_enc 
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   3615
      Left            =   120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertikal
      TabIndex        =   0
      Top             =   360
      Width           =   3000
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Zentriert
      BackColor       =   &H00000000&
      Caption         =   "Packet Sender"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   3960
      Width           =   6015
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Zentriert
      BackColor       =   &H00000000&
      Caption         =   "Decrypted Packet Logs"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   255
      Left            =   3120
      TabIndex        =   3
      Top             =   120
      Width           =   3015
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Zentriert
      BackColor       =   &H00000000&
      Caption         =   "Encrypted Packet Logs"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "FrmPackets"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private StopRoutine As Boolean

Private Sub cmd_send_to_client_Click()

' If SckClient is connected, send the Packet to the Client
If FrmBrowser.SckClient.State = sckConnected Then
FrmBrowser.SckClient.SendData (txt_packetsend)
End If

End Sub

Private Sub cmd_send_to_server_Click()

' If SckServer is connected...
If FrmBrowser.SckServer.State = sckConnected Then
' ... and if the Packetlength is less than 65 characters
If Len(txt_packetsend.Text) >= 65 Then
    MsgBox "Packetlength > 64"
' ... then encrypt the Packet and send it to the Server
ElseIf Len(txt_packetsend.Text) < 65 Then
    FrmBrowser.SentData = True
    FrmBrowser.SckServer.SendData FrmBrowser.RC4E.encipher(txt_packetsend.Text)
End If
End If

End Sub

Private Sub txt_packetlogs_dec_Change()

' When Decrypted Packetlogs change, scroll to the end of the logs
txt_packetlogs_dec.SelStart = Len(txt_packetlogs_dec.Text)

End Sub

Private Sub txt_packetlogs_enc_Change()

' When Encrypted Packetlogs change, scroll to the end of the logs
txt_packetlogs_enc.SelStart = Len(txt_packetlogs_enc.Text)

End Sub
