09-03-2007, 03:57 PM
Introduction
This is very basic, what it will do is upon login. It will send a code with that packet checking if that code is the same on the client as on the server. The code can be as long as you wish it to be.
Do not use the same security code as on this example.
Client Side
Find:
Then add this part to it:
So it eventually look like this:
Server Side
Inside:
Just below:
Add:
Yes I know it's very basic. But it's always something.
This is very basic, what it will do is upon login. It will send a code with that packet checking if that code is the same on the client as on the server. The code can be as long as you wish it to be.
Do not use the same security code as on this example.
Client Side
Find:
Code:
Sub SendLogin(ByVal Name As String, ByVal Password As String)
Dim Packet As String
Packet = "login" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & App.Major & SEP_CHAR & App.Minor & SEP_CHAR & App.Revision & SEP_CHAR & END_CHAR
Call SendData(Packet)
End Sub
Code:
& SEP_CHAR & "code35FO36F"
Code:
Sub SendLogin(ByVal Name As String, ByVal Password As String)
Dim Packet As String
Packet = "login" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & App.Major & SEP_CHAR & App.Minor & SEP_CHAR & App.Revision & SEP_CHAR & "code35FO36F" & SEP_CHAR & END_CHAR
Call SendData(Packet)
End Sub
Server Side
Inside:
Code:
' ::::::::::::::::::
' :: Login packet ::
' ::::::::::::::::::
If LCase(Parse(0)) = "login" Then
Code:
If IsMultiAccounts(Name) Then
Call AlertMsg(Index, "Multiple account logins is not authorized.")
Exit Sub
End If
Code:
If Trim$(Parse$(6)) "code35FO36F" Then
Call AlertMsg(Index, "Your client do not match the servers security code.")
Exit Sub
End If