VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "msinet.ocx"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "mswinsck.ocx"
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Begin VB.Form FrmBrowser 
   BorderStyle     =   1  'Fest Einfach
   Caption         =   "SnG Fun v1 - Browser"
   ClientHeight    =   8760
   ClientLeft      =   1530
   ClientTop       =   1125
   ClientWidth     =   11670
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "FrmBrowser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8760
   ScaleWidth      =   11670
   StartUpPosition =   2  'Bildschirmmitte
   Visible         =   0   'False
   Begin InetCtlsObjects.Inet HabboNet 
      Left            =   1560
      Top             =   1560
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
   End
   Begin MSWinsockLib.Winsock SckServer 
      Left            =   2160
      Top             =   1680
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin MSWinsockLib.Winsock SckClient 
      Left            =   1080
      Top             =   1680
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin SHDocVwCtl.WebBrowser HabboBrowser 
      Height          =   8655
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   11655
      ExtentX         =   20558
      ExtentY         =   15266
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   1
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin VB.Menu cnto 
      Caption         =   "Connect"
      Begin VB.Menu ctsmo 
         Caption         =   "Custom"
      End
      Begin VB.Menu cntoo 
         Caption         =   "Connect"
      End
   End
   Begin VB.Menu fs 
      Caption         =   "Fun Section"
      Begin VB.Menu wparts 
         Caption         =   "Wallparts"
      End
      Begin VB.Menu drnks 
         Caption         =   "Drinks"
      End
      Begin VB.Menu bdgs 
         Caption         =   "Badges"
      End
      Begin VB.Menu mdcmmnd 
         Caption         =   "MOD Functions"
      End
      Begin VB.Menu pts 
         Caption         =   "Pets"
      End
      Begin VB.Menu frntre 
         Caption         =   "Furniture"
      End
      Begin VB.Menu pstr 
         Caption         =   "Posters"
      End
      Begin VB.Menu cnslos 
         Caption         =   "Console"
      End
      Begin VB.Menu crdts 
         Caption         =   "Credits"
      End
      Begin VB.Menu wrp 
         Caption         =   "Warp"
      End
      Begin VB.Menu thetool 
         Caption         =   "The Tool"
      End
      Begin VB.Menu Bots 
         Caption         =   "Bots"
      End
      Begin VB.Menu mtns 
         Caption         =   "Mutants"
      End
      Begin VB.Menu clns 
         Caption         =   "Cloning"
      End
      Begin VB.Menu rma 
         Caption         =   "Room"
      End
      Begin VB.Menu msgs 
         Caption         =   "Messages"
      End
      Begin VB.Menu rghts 
         Caption         =   "Rights"
      End
      Begin VB.Menu anmls 
         Caption         =   "Animals"
      End
   End
   Begin VB.Menu scrpts 
      Caption         =   "Scripts"
      Begin VB.Menu imta 
         Caption         =   "Imitate"
      End
      Begin VB.Menu stts 
         Caption         =   "Status"
      End
      Begin VB.Menu rmm 
         Caption         =   "Rooms"
      End
      Begin VB.Menu snd 
         Caption         =   "Quick Send"
      End
      Begin VB.Menu hnd 
         Caption         =   "Hand Scripts"
      End
      Begin VB.Menu pstrbla 
         Caption         =   "Posters in Black"
      End
      Begin VB.Menu photo 
         Caption         =   "Photographing"
      End
   End
   Begin VB.Menu artm 
      Caption         =   "Artmoney"
      Begin VB.Menu cnls 
         Caption         =   "Console Bomber"
      End
      Begin VB.Menu pstrs 
         Caption         =   "Posters (A_)"
      End
      Begin VB.Menu imt 
         Caption         =   "Imitate Users"
      End
   End
   Begin VB.Menu misc 
      Caption         =   "Misc"
      Begin VB.Menu encrypt 
         Caption         =   "Packets"
      End
      Begin VB.Menu lv64 
         Caption         =   "LV64 encoder"
      End
      Begin VB.Menu b64 
         Caption         =   "B64 encoder"
      End
      Begin VB.Menu srx 
         Caption         =   "Search + Replace"
      End
      Begin VB.Menu fsu 
         Caption         =   "Custom Fuse"
      End
      Begin VB.Menu fsulg 
         Caption         =   "Fuse Login"
      End
   End
   Begin VB.Menu fsua 
      Caption         =   "Fuse"
      Begin VB.Menu chasor 
         Caption         =   "Chooser"
      End
      Begin VB.Menu frzz 
         Caption         =   "Furni"
      End
      Begin VB.Menu przz 
         Caption         =   "Performance"
      End
      Begin VB.Menu cmraa 
         Caption         =   "Camera"
      End
      Begin VB.Menu dzzdd 
         Caption         =   "Ignore Owner"
      End
      Begin VB.Menu flatidddsss 
         Caption         =   "Show ID's"
      End
   End
   Begin VB.Menu custom 
      Caption         =   "Custom"
      Begin VB.Menu rteo 
         Caption         =   "Retro"
         Begin VB.Menu ockup 
            Caption         =   "Pick Up"
         End
      End
   End
   Begin VB.Menu abto 
      Caption         =   "About"
   End
End
Attribute VB_Name = "FrmBrowser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public DCR As String
Public LocalHost As String
Public InfoHost As String
Public InfoPort As String
Public MusPort As String
Public MusHost As String
Public ExternalVariables As String
Public ExternalTexts As String
Public SSOTicket As String
Public RC4E As New clsHabboRC4
Public RC4D As New clsHabboRC4
Public PublicKey As String
Public SentData As Boolean
Public PacketSplitted As Boolean
Public Function SplitIt(SiteURL As String)

' Get the Source of the Habbo Login Page
Dim SiteSource As String
SiteSource = GetUrlSource(SiteURL)
If InStr(SiteSource, "<noscript>") Then
SiteSource = Split(SiteSource, "<noscript>")(1)
End If
Do
DoEvents
Loop Until FrmBrowser.HabboNet.StillExecuting = False

FrmConnect.txt_status.Text = "Status: Getting Infos for loader.html..."

Dim TEMP As String

' Get the DCR Link
TEMP = Split(SiteSource, "<embed src=" & Chr(34))(1) 'dcr
TEMP = Split(TEMP, Chr(34))(0)
DCR = Replace(TEMP, " ", "")
FrmConnect.txt_status.Text = "Status: Found DCR Link - " & DCR

' Get the InfoHost
TEMP = Split(SiteSource, "connection.info.host=")(1) ' remote host
TEMP = Split(TEMP, ";")(0)
TEMP = Split(TEMP, Chr(34))(0)
LocalHost = Replace(TEMP, " ", "")
InfoHost = "SnGScriptConsole"
FrmConnect.txt_status.Text = "Status: Found InfoHost - " & LocalHost

' Get the InfoPort
TEMP = Split(SiteSource, "connection.info.port=")(1) 'remote port
TEMP = Split(TEMP, Chr(34))(0)
InfoPort = Replace(TEMP, " ", "")
FrmConnect.txt_status.Text = "Status: Found InfoPort - " & InfoPort

' Get the MUSPort
TEMP = Split(SiteSource, "connection.mus.port=")(1) ' mus port
TEMP = Split(TEMP, Chr(34))(0)
MusPort = Replace(TEMP, " ", "")
FrmConnect.txt_status.Text = "Status: Found MUSPort - " & MusPort

' Get the MusPort
TEMP = Split(SiteSource, "connection.mus.host=")(1) ' mus host
TEMP = Split(TEMP, ";")(0)
TEMP = Split(TEMP, Chr(34))(0)
MusHost = Replace(TEMP, " ", "")
FrmConnect.txt_status.Text = "Status: Found MusHost - " & MusHost

' Get the External Variables Link
TEMP = Split(SiteSource, "external.variables.txt=")(1) ' Variables
ExternalVariables = Split(TEMP, ";")(0)
FrmConnect.txt_status.Text = "Status: Found External Variables Link - " & ExternalVariables

' Get the External Texts Link
TEMP = Split(SiteSource, "external.texts.txt=")(1) ' external texts
ExternalTexts = Split(TEMP, Chr(34) & ">")(0)
FrmConnect.txt_status.Text = "Status: Found External Texts Link - " & ExternalTexts

' Get the SSO Ticket
If InStr(SiteSource, ";sso.ticket=") Then
TEMP = Split(SiteSource, ";sso.ticket=")(1) 'Ticket
Else
TEMP = Split(SiteSource, "sso.ticket=")(1) 'Ticket
End If
SSOTicket = Split(TEMP, Chr(34))(0)
SSOTicket = Split(TEMP, Chr(34))(0)
FrmConnect.txt_status.Text = "Status: Found SSO Ticket - " & SSOTicket



' Close the Connection if Sockets are connected (from an old connection)
SckServer.Close
SckClient.Close

' Set the Connection Details for Sockets
SckServer.RemoteHost = LocalHost
SckServer.RemotePort = InfoPort
SckClient.LocalPort = InfoPort
SckClient.Listen



' Call the Loader Gernerator and Loader
LoadingPage ("loader.html")

Exit Function

LoginFailed:
            FrmConnect.txt_status.Text = "Status: Login failed..."
            FrmBrowser.Hide
            FrmConnect.cbo_hotel.Enabled = True
            FrmConnect.txt_username.Enabled = True
            FrmConnect.txt_password.Enabled = True
            FrmConnect.cmd_logout.Enabled = False
            FrmConnect.Show
            Exit Function

End Function

Private Function LoadingPage(filename As String)
On Error GoTo LoginFailed

Dim LoaderFileName As String
LoaderFileName = filename

' If an old Loader exists, delete it
If LoaderFileName <> Empty Then
    If fileexists(App.path & "\" & LoaderFileName) = True Then
    fDelete App.path & "\" & LoaderFileName, False, False
    End If
End If

FrmConnect.txt_status.Text = "Status: Writing loader.html..."

' Write the Loader (with a script to disable the backspace key in IE)
txt_WriteAll App.path & "\" & filename, "<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>"
txt_AppendLine App.path & "\" & filename, "<meta http-equive = content-type content = text/html; charset= iso-8859-1>"
txt_AppendLine App.path & "\" & filename, "<html>"
txt_AppendLine App.path & "\" & filename, "<title>SnG Script Console - Browser</title>"
txt_AppendLine App.path & "\" & filename, ""
txt_AppendLine App.path & "\" & filename, "<head>"
txt_AppendLine App.path & "\" & filename, "<script type='text/javascript'>"
txt_AppendLine App.path & "\" & filename, ""
txt_AppendLine App.path & "\" & filename, "Function stopPropagation(e)"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "e = e¦¦event; /* get IE event ( not passed ) */"
txt_AppendLine App.path & "\" & filename, "alert(e.keyCode);"
txt_AppendLine App.path & "\" & filename, "e.stopPropagation? e.stopPropagation() : e.cancelBubble = true;"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, ""
txt_AppendLine App.path & "\" & filename, "var x = false;"
txt_AppendLine App.path & "\" & filename, "Function checkShortcut(e)"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, ""
txt_AppendLine App.path & "\" & filename, "stopPropagation(e);"
txt_AppendLine App.path & "\" & filename, "if(event.keyCode==8 ¦¦ event.keyCode==13)"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "alert('Backspace');"
txt_AppendLine App.path & "\" & filename, "if( x )"
txt_AppendLine App.path & "\" & filename, "return true;"
txt_AppendLine App.path & "\" & filename, "return false;"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "Function attachHandlerStart()"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "var dlist = document.getElementsByTagName('html');"
txt_AppendLine App.path & "\" & filename, "for( var i = 0; i < dlist.length; i++ )"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "attachHandler(dlist.item(i));"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "Function attachHandler(node)"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "// Iterate the dom, attaching the onkeypress event to all of the items"
txt_AppendLine App.path & "\" & filename, "if( node.nodeType == 1 ) // Element"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "node.onkeydown = checkShortcut;"
txt_AppendLine App.path & "\" & filename, "alert('Attached checkShortcut to '+node.nodeName);"
txt_AppendLine App.path & "\" & filename, ""
txt_AppendLine App.path & "\" & filename, "// Iterate the children of this node"
txt_AppendLine App.path & "\" & filename, "var children = node.childNodes;"
txt_AppendLine App.path & "\" & filename, "for( var i = 0; i < children.length; i++ )"
txt_AppendLine App.path & "\" & filename, "{"
txt_AppendLine App.path & "\" & filename, "attachHandler(children.item(i));"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "}"
txt_AppendLine App.path & "\" & filename, "</script>"
txt_AppendLine App.path & "\" & filename, "</head>"
txt_AppendLine App.path & "\" & filename, "<body bgcolor='#000000' onload='attachHandlerStart();'>"
txt_AppendLine App.path & "\" & filename, "<object classid=""clsid:166B1BCA-3F9C-11CF-8075-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"" id=""habbo"" width=""720"" height=""540"">"
txt_AppendLine App.path & "\" & filename, "<param name=""src"" value=" & DCR & ">"
txt_AppendLine App.path & "\" & filename, "<param name=swText value="""">"
txt_AppendLine App.path & "\" & filename, "<param name=""sw8"" value=""" & "use.sso.ticket=1;sso.ticket=" & SSOTicket & """>"
txt_AppendLine App.path & "\" & filename, "<param name=""sw1"" value=""" & "connection.info.host=" & InfoHost & """>"
txt_AppendLine App.path & "\" & filename, "<param name=""sw2"" value=""" & "connection.info.port=" & InfoPort & """>"
txt_AppendLine App.path & "\" & filename, "<param name=""sw4"" value=""" & "connection.mus.host=" & MusHost & """>"
txt_AppendLine App.path & "\" & filename, "<param name=""sw5"" value=""" & "connection.mus.port=" & MusPort & """>"
txt_AppendLine App.path & "\" & filename, "<param name=""sw6"" value=""external.variables.txt=" & ExternalVariables & """>"""""
txt_AppendLine App.path & "\" & filename, "<param name=""sw7"" value=""external.texts.txt=" & ExternalTexts & """>"""""
txt_AppendLine App.path & "\" & filename, "<embed src=" & DCR
txt_AppendLine App.path & "\" & filename, "bgColor=" & Chr(34) & "#000000" & Chr(34) & " " & "width=" & Chr(34) & "720" & Chr(34) & " " & "height=" & Chr(34) & "540" & Chr(34) & ""
txt_AppendLine App.path & "\" & filename, "sw1 = """ & "connection.info.host=" & InfoHost & """"
txt_AppendLine App.path & "\" & filename, "sw2 = """ & "connection.info.port=" & InfoPort & """"
txt_AppendLine App.path & "\" & filename, "sw4 = """ & "connection.mus.host=" & MusHost & """"
txt_AppendLine App.path & "\" & filename, "sw5 = """ & "connection.mus.port=" & MusPort & """"
txt_AppendLine App.path & "\" & filename, "sw6 = ""external.variables.txt=" & ExternalVariables & """"
txt_AppendLine App.path & "\" & filename, "sw7 = ""external.texts.txt=" & ExternalTexts & """"
txt_AppendLine App.path & "\" & filename, "sw8 = ""use.sso.ticket=1;sso.ticket=" & SSOTicket & """"
txt_AppendLine App.path & "\" & filename, "<!--Habbo V11 Loader -->"
txt_AppendLine App.path & "\" & filename, "</embed>"
txt_AppendLine App.path & "\" & filename, "</object>"
txt_AppendLine App.path & "\" & filename, "</body>"
txt_AppendLine App.path & "\" & filename, ""
txt_AppendLine App.path & "\" & filename, "</html>"

' Close the Connection if Sockets are connected (from an old connection)
SckServer.Close
SckClient.Close

' Set the Connection Details for Sockets
SckServer.RemoteHost = LocalHost
SckServer.RemotePort = InfoPort
SckClient.LocalPort = InfoPort
SckClient.Listen

FrmConnect.txt_status.Text = "Status: Loading loader.html..."

' Load the Loader in the Browser
HabboBrowser.Navigate (App.path & "\" & filename)
' Wait until the Browser URL has the "loader.html" in it - Loader loaded
Do
DoEvents
Loop Until Right(HabboBrowser.LocationURL, 11) = "loader.html"
Me.Show

' If an old Loader exists, delete it
If LoaderFileName <> Empty Then
    If fileexists(App.path & "\" & LoaderFileName) = True Then
    fDelete App.path & "\" & LoaderFileName, False, False
    End If
End If

Exit Function

LoginFailed:
            FrmConnect.txt_status.Text = "Status: Login failed..."
            FrmBrowser.Hide
            FrmConnect.cbo_hotel.Enabled = True
            FrmConnect.txt_username.Enabled = True
            FrmConnect.txt_password.Enabled = True
            FrmConnect.cmd_logout.Enabled = False
            FrmConnect.Show
            Exit Function

End Function

Private Sub abto_Click()
Form7000.Show
End Sub

Private Sub anmls_Click()
Form67.Show
End Sub

Private Sub B64_Click()
Form74.Show
End Sub

Private Sub bdgs_Click()
Form25.Show
End Sub

Private Sub Bots_Click()
Form35.Show
End Sub

Private Sub chasor_Click()
On Error Resume Next
FrmBrowser.SckClient.SendData "@Bfuse_habbo_chooser"
End Sub


Private Sub clns_Click()
Form66.Show
End Sub

Private Sub cmraa_Click()
FrmBrowser.SckClient.SendData "BLSI-4440S444camera110,0,0/" & Chr(13) & "1" & Chr(1)
End Sub

Private Sub cnls_Click()
Form10.Show
End Sub

Private Sub cnslos_Click()
Form83.Show
End Sub

Private Sub crdts_Click()
Form82.Show
End Sub

Private Sub drnks_Click()
Form23.Show
End Sub

Private Sub dzzdd_Click()
On Error Resume Next
FrmBrowser.SckClient.SendData "@Bfuse_ignore_room_owner"
End Sub

Private Sub encrypt_Click()
FrmPackets.Show
End Sub

Private Sub flatidddsss_Click()
On Error Resume Next
FrmBrowser.SckClient.SendData "@Bfuse_see_flat_ids"
End Sub

Private Sub frzz_Click()
On Error Resume Next
FrmBrowser.SckClient.SendData "@Bfuse_furni_chooser"
End Sub

Private Sub frntre_Click()
Form33.Show
End Sub

Private Sub fsu_Click()
Form69.Show
End Sub

Private Sub fsulg_Click()
Form68.Show
End Sub

Private Sub hnd_Click()
Form48.Show
End Sub

Private Sub imt_Click()
Form5.Show
End Sub

Private Sub imta_Click()
Form41.Show
End Sub

Private Sub lv64_Click()
Form73.Show
End Sub

Private Sub mdcmmnd_Click()
Form30.Show
End Sub

Private Sub mdrtmsaf_Click()

End Sub

Private Sub msgs_Click()
Form37.Show
End Sub

Private Sub mtns_Click()
Form12.Show
End Sub

Private Sub photo_Click()
Form91.Show
End Sub

Private Sub przz_Click()
On Error Resume Next
FrmBrowser.SckClient.SendData "@Bfuse_performance_panel"
End Sub

Private Sub pstr_Click()
Form34.Show
End Sub

Private Sub pstrbla_Click()
Form24.Show
End Sub

Private Sub pstrs_Click()
Form86.Show
End Sub

Private Sub pts_Click()
Form31.Show
End Sub

Private Sub rghts_Click()
Form42.Show
End Sub

Private Sub rma_Click()
Form38.Show
End Sub

Private Sub rmm_Click()
Form49.Show
End Sub

Private Sub SckClient_ConnectionRequest(ByVal requestID As Long)

' If Habboserver requests a Connection with SckClient
SckServer.Connect
SckClient.Close
Do Until SckServer.State = sckConnected
DoEvents
Loop
SckClient.Close
SckClient.Accept requestID
 
End Sub

Private Sub SckClient_DataArrival(ByVal bytesTotal As Long)

' Get the ClientPacket, if SckClient is connected
Dim ClientPacket As String
If SckClient.State = sckConnected Then
    SckClient.GetData ClientPacket
Else
' Call the Logout Procedure
Call LogOut
End If

' Count the Length of the ClientPacket
Dim PacketCount As Long
PacketCount = Len(ClientPacket)

' If ServerPacket is empty, skip the Packetlogger and Packetsplitter
If ClientPacket = Empty Then
GoTo TheEnd:
End If

' Call the Packetsplitter Procedure
Call SplitData(ClientPacket, "SckClient")

' If Encryption is on
If FrmConnect.opt_enc_on.Value = True Then
    ' Decrypt using Decryption Instance
    Dim Decrypted_ClientPacket As String
    Decrypted_ClientPacket = RC4D.decipher(ClientPacket)
End If

'Packet Logger
' If Encryption is on
If FrmConnect.opt_enc_on.Value = True Then
    If PublicKey = Empty Then
        If Len(FrmPackets.txt_packetlogs_enc.Text) > 12000 And FrmPackets.chk_pause_enc.Value = 0 Then
        FrmPackets.txt_packetlogs_enc.Text = ""
        End If
        If FrmPackets.chk_pause_enc.Value = 0 Then
        FrmPackets.txt_packetlogs_enc.Text = FrmPackets.txt_packetlogs_enc.Text & ClientPacket & vbNewLine & "----------------------------------------------------------" & vbNewLine
        End If
    Else
        If Len(FrmPackets.txt_packetlogs_enc.Text) > 12000 And FrmPackets.chk_pause_enc.Value = 0 Then
        FrmPackets.txt_packetlogs_enc.Text = ""
        End If
        If FrmPackets.chk_pause_enc.Value = 0 Then
        FrmPackets.txt_packetlogs_enc.Text = FrmPackets.txt_packetlogs_enc.Text & ClientPacket & vbNewLine & "----------------------------------------------------------" & vbNewLine
        End If
        If Len(FrmPackets.txt_packetlogs_dec.Text) > 12000 And FrmPackets.chk_pause_dec.Value = 0 Then
        FrmPackets.txt_packetlogs_dec.Text = ""
        End If
        If FrmPackets.chk_pause_dec.Value = 0 Then
        FrmPackets.txt_packetlogs_dec.Text = FrmPackets.txt_packetlogs_dec.Text & Decrypted_ClientPacket & vbNewLine & "----------------------------------------------------------" & vbNewLine
        End If
    End If
' If Encryption is off
ElseIf FrmConnect.opt_enc_off.Value = True Then
    If Len(FrmPackets.txt_packetlogs_enc.Text) > 12000 And FrmPackets.chk_pause_enc.Value = 0 Then
    FrmPackets.txt_packetlogs_enc.Text = ""
    End If
    ' Cause first packets will not be encrypted by the Client
    If Left(ClientPacket, 1) <> "@" Then
        If FrmPackets.chk_pause_enc.Value = 0 Then
        FrmPackets.txt_packetlogs_enc.Text = FrmPackets.txt_packetlogs_enc.Text & ClientPacket & vbNewLine & "----------------------------------------------------------" & vbNewLine
        End If
    Else
        If FrmPackets.chk_pause_dec.Value = 0 Then
        FrmPackets.txt_packetlogs_dec.Text = FrmPackets.txt_packetlogs_dec.Text & ClientPacket & vbNewLine & "----------------------------------------------------------" & vbNewLine
        End If
    End If
End If

TheEnd:
' If Encryption is on
If FrmConnect.opt_enc_on.Value = True Then
    If SckClient.State = sckConnected Then
        ' Cause first packets will not be encrypted by the Client
        If ClientPacket = "@@BCJ" Then GoTo no
        If ClientPacket = "@@BCN" Then GoTo no
        If PublicKey = "" Then Exit Sub

        ' Let the packets run through Encrypt instance
        If SentData = False Then
        RC4E.decipher (ClientPacket)
        End If

        ' Because client will be behind
        If SentData = True Then
            If Len(Decrypted_ClientPacket) >= 65 Then
            MsgBox "Packetlength > 64"
            ElseIf Len(Decrypted_ClientPacket) < 65 Then
            SckServer.SendData RC4E.encipher(Decrypted_ClientPacket)
            End If
        Else
no:
        ' Act normal
        SentData = False
        SckServer.SendData ClientPacket
        End If
    End If
' If Encryption is off, send the Client Packet without Encryption to the Server
ElseIf FrmConnect.opt_enc_off.Value = True Then
    If SckServer.State = sckConnected Then
    SckServer.SendData (ClientPacket)
    End If
End If

Debug.Print ClientPacket

End Sub

Private Sub SckServer_DataArrival(ByVal bytesTotal As Long)

' Get the ServerPacket, if SckServer is connected
Dim ServerPacket As String
If SckServer.State = sckConnected Then
SckServer.GetData ServerPacket
Else
' Call the Logout Procedure
Call LogOut
End If

' Count the Length of the ServerPacket
Dim PacketCount As Long
PacketCount = Len(ServerPacket)

' If ServerPacket is empty, skip the Packetlogger and Packetsplitter
If ServerPacket = Empty Then
GoTo TheEnd:
End If

' Call the Packetsplitter Procedure
Call SplitData(ServerPacket, "SckServer")

'Packet Logger
If Len(FrmPackets.txt_packetlogs_enc.Text) > 12000 Then
FrmPackets.txt_packetlogs_enc.Text = ""
End If
If FrmPackets.chk_pause_enc.Value = 0 Then
FrmPackets.txt_packetlogs_enc.Text = FrmPackets.txt_packetlogs_enc.Text & ServerPacket & vbNewLine & "----------------------------------------------------------" & vbNewLine
End If

' Send the Packet with SckClient to the Client
TheEnd:
If SckClient.State = sckConnected Then
SckClient.SendData ServerPacket
Else
' Call the Logout Procedure
Call LogOut
End If

Debug.Print ServerPacket

End Sub

Private Sub SckClient_Close()

' If SckClient lose the connection, close the connection
SckClient.Close
SckClient.Listen
SckServer.Close
' Call the Logout Procedure
Call LogOut

End Sub

Private Sub SckServer_Close()

' If SckServer lose the connection, close the connection
SckClient.Close
SckClient.Listen
SckServer.Close
' Call the Logout Procedure
Call LogOut

End Sub

Private Sub Test_Click()

End Sub

Private Sub Testing_Click()

End Sub

Private Sub snd_Click()
Form46.Show
End Sub

Private Sub srx_Click()
Form70.Show
End Sub

Private Sub stts_Click()
Form44.Show
End Sub

Private Sub thetool_Click()
Form100.Show
End Sub

Private Sub wparts_Click()
formwp.Show
End Sub

Private Sub wrp_Click()
Form85.Show
End Sub
