Anchor [V3] [MySQL - C#] [Edit protocol without source]

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
AnchorV3

Introduction

Well I am here just to introduce something new to these forums, a new approach, or idea if I must say. I recently saw on my videos which had , I unfortunately lost the source and the database which rendered AnchorV2 useless and ended up being abandoned and unheard from. This is why I shall resurrect Anchor up from the dead and give people new ideas.

Why is it V3? I haven't seen V2 or V1?

The previous versions were just a fail and should be forgotten. That is all I'm saying. :001_cool:

Features

Add in the database what you receive and what you send back along with the data (or contents). And what type it is, if it's normal or an SSO login.

If you add {username} in the contents, it will replace {username} with the clients logged in name.

  • MySQL Connection
  • Fancy Logging class
  • Easily add own protocol to database
  • Caches all new packets in from the database so no more mysql query mayhem
  • More than 1 packet can be sent after receiving a packet
  • Asnychronous sockets.
  • SSO/Login already coded
  • Created for the pre-shuffle client.

Packet database

BHNKcG.png


Snippets

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Anchor.Util;

namespace Anchor.Packets.Recieve
{
    class Send
    {
        public PacketType Type;
        public int SendId;
        public String EncodeId;
        public String RecId;
        public String Contents;

        public Send(String RecId, String EncodeId, int Type, String Contents)
        {
            this.RecId = RecId;
            this.EncodeId = EncodeId;
            this.SendId = HabboEncoding.decodeB64(EncodeId);

            if (Type == 1)
                this.Type = PacketType.SSO;
            else if (Type == 2)
                this.Type = PacketType.LOGIN;
            else if (Type == 3)
                this.Type = PacketType.NORMAL;
            this.Contents = Contents;

            Program.GetLogging().Write(ConsoleColor.Magenta, "Added packet header [ " + SendId + " ]");
        }
    }
}
In-client screenies

qk6qIV.png


Database

Code:
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 13, 2012 at 06:54 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `anchor_flash`
--

-- --------------------------------------------------------

--
-- Table structure for table `packets_send`
--

CREATE TABLE IF NOT EXISTS `packets_send` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `recid` varchar(2) NOT NULL,
  `sendback` varchar(2) NOT NULL,
  `type` enum('1','2','3') NOT NULL COMMENT '1 = sso, 2 = login, 3 = normal',
  `contents` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `packets_send`
--

INSERT INTO `packets_send` (`id`, `recid`, `sendback`, `type`, `contents`) VALUES
(1, 'CN', 'DA', '3', 'H'),
(2, 'F_', '@C', '1', ''),
(3, 'F_', 'Lj', '3', 'IHello {username}!\r\n\r\nWelcome to the test server of AnchorV3.');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(30) NOT NULL,
  `username` varchar(30) NOT NULL,
  `password` varchar(30) NOT NULL,
  `ssoticket` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`, `ssoticket`) VALUES
(1, 'Quackster', 'cake', 'cake');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

How to install?

1) Set config details in /bin/Debug/Anchor.ini
2) Load up your r63 post-shuffle client with your ssoticket and make sure the host and port are correct!

Download



Credits

- Ion/Deltar for the encoding/client message classes
 

Users who are viewing this thread

Top