AlphAs Board

Collected works
It is currently Sun Jun 25, 2017 6:38 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: rylDatabaseChecks
PostPosted: Mon Jan 27, 2014 12:33 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Sun Sep 26, 2010 12:15 pm
Posts: 325
Location: Estonia/Tartu
Readme

Code:
          #######################################
         #               #
         #   Extra database checks for   #
         #   RYL 2 version 2xxx server   #
         #   and MS SQL 2005         #
         #               #
         #   Author: AlphA <Fusion>      #
         #   Creation date: 2.01.2008   #
         #   Version: 1.2         #
         #               #
          #######################################
               

 ###############################################################################
#   Product description                     #
 ###############################################################################


   1. What is this all about
   
      Lately there has been some hacking in ryl servers by sending false
      data back to the server by editing the client memory or just using
      high network latency. The main things that had an impact on the
      world environment were:
         1. Dagger Stack bug - a player is using high network latency
            to equip daggers mainly or any other items into non
            available slots (like in gloves or shoes slot).
         2. Skills bug - a player is editing the clients memory to learn
            unavailable class skills.
      
      These "bugs" are countered with the following solutions:
         1. FullEquipmentSetIsValid - a function that checks if the data
            that is going to be written into CharItem.Equip cell is ok.
            As if the equipped items can be positioned where they are
            set at the moment.
            If the check fails the user will be kicked from the server
            and the errornous data will be prevented from submitting.
         2. EquipmentSetIsValid - a function much like the above one with
            the difference that this check will be made against CharInfo
            table Equip cell.
         3. CharAbleToLearnSkill - as the name sais a check if the player
            is able to learn a skill. This check will be made against
            CharSkill.Skill cell and it checks all the skills the user
            has learned if they are learnable by the users class based
            on ItemScript books.
         4. DisconnectCharacter - a procedure that is used to close open
            TCP/IP channels associated with the player IP. This procedure
            will be called by all the above checks to kick the player
            from the server.
            Note that this to work the game server has to be on the same
            computer as the database server.
   
   2. Installing
   
      No installer is made for the package yet so the parts have to be
      installed manually:
         (sql files have to be edited and run inside Management Studio)
         
         1. Open Project properties page inside VS, go to Database tab
            and edit the connection string so it meets you needs
         2. Edit your itemscript location in
            DatabaseChecks\ItemscriptParser.cs file
         3. Run Setup Scripts\DatabaseSetup.sql
         4. Right click on the project in VS and click Deploy
         5. Run GetUserGMLevel.sql and GetUserID.sql
         6. Run all other sql (except DatabaseSetup.sql) scripts inside
            Setup Scripts folder
         7. ... something i forgot :)
   
   3. Testing
   
      Check Test Scripts\Test.sql out. To see a actual disconnection
      happening then thats what i do:
         Open a remote desktop connection, insert the ip im connecting
         to into the BillingDB.TblCurrentUser IP field and use the
         character i set the ip to in my tests.
      
   4. Debugging
   
      To enable CLR assembly debugging support to the database a flag
      had to be set in the database project (dont remember), also
      Team Edition or Database Edition of Visual Studio is required.



 ###############################################################################
#   Changelog                        #
 ###############################################################################


--- 7.04.2008

   - EquipmentSlotMapping finished (MorbidA)
   - Added a simple logging system
   
--- 7.03.2008

   - Added this readme
   - Added Full equipment check and trigger
   - Added Skill Check and SP altering sql code

--- 2.01.2008

   - Initial



 ###############################################################################
#   Known bugs                        #
 ###############################################################################



 ###############################################################################
#   Abbreviations used                     #
 ###############################################################################


   - SP - Stored Procedure inside SQL Server
   
   - Trigger - A trigger attached to a table which will be executed based
      on a change inside the table (update, insert or delete)
      
   - Management Studio - Microsoft SQL Server Management Studio, part of
      MS SQL Server 2005 installation (not express)
      
   - VS - Microsoft Visual Studio 2008
   
   - SQL - Standard Query Language, file extension which's content is
      written in this language
   


Attachments:
rylDatabaseChecks 1.2.zip [405.79 KiB]
Downloaded 531 times

_________________
Image
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software