[PACKETBOT] Why it is still possible!

09/01/2013 10:27 Maurice#31
Quote:
Originally Posted by Golden|Power View Post
Why you 3 don't make a packet bot together ? You are all smart for this :D Come on, make a team and help all the people who don't want to pay for sf anymore :D

-GP
We could.. but still it will bring nothing more then a new paid seafight bot..
Didn't do much yet, got other project's to.. but I'll start on the encrypt/decrypt func's.

EDIT:

Just started with the encrypt/decrypt function's & (Again) recoded IncomingBotResponse Class (Renamed: OutgoingBotReq.cs).

OutgoingBotReq.cs (The helper class)
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MiscUtil.Conversion;
using MiscUtil.IO;
using System.IO;

namespace wBot___SeafightEdit.Utilities
{
    public class OutgoingBotReq
    {
        public byte[] arr;
        public EndianBinaryReader reader;
        public OutgoingBotReq(byte[] iArray)
        {
            try
            {
                var converter = new BigEndianBitConverter();
                var stream = new MemoryStream(iArray);
                reader = new EndianBinaryReader(converter, stream);
            }
            catch { }
        }
        public EndianBinaryReader getReader()
        {
            return reader;
        }

        public byte[] arr;
        public EndianBinaryWriter writer;
        public OutgoingBotReq(byte[] iArray)
        {
            try
            {
                var converter = new BigEndianBitConverter();
                var stream = new MemoryStream(iArray);
                writer = new EndianBinaryWriter(converter, stream);
            }
            catch { }
        }
        public EndianBinaryWriter getWriter()
        {
            return writer;
        }
    }
}
OutgoingBotRequest.cs (The main class)
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;

namespace wBot___SeafightEdit.Utilities
{
    public class OutgoingBotRequest
    {
        public byte[] Arr;
        public Socket _SFSock;
        public OutgoingBotRequest(byte[] arr, Socket _iSFSock)
        {
            try
            {
                Arr = arr;
                _SFSock = _iSFSock;
            }
            catch { }
        }

        #region "SendRequest()"
        public bool SendRequest()
        {
            try
            {
                if (_SFSock == null)
                    return false;
                _SFSock.Send(Arr);
                return true;
            }
            catch
            {
                return false;
            }
        }
        #endregion

    }

    public class OutgoingRequest
    {
        public byte[] arr;
        public Socket _iSock;
        public int _version = 0;
        public int duration = 0;
        public OutgoingRequest()
        {
            try
            {

            }
            catch { }
        }
        public void decrypt_function(OutgoingBotReq param1)
        {
            this._version = param1.getReader().ReadInt16();
            this._version = 65535 & ((65535 & this._version) << 16 % 16 | (65535 & this._version) >> 16 - 16 % 16);
            this._version = this._version > 32767 ? this._version - 65536 : this._version;
            this.duration = param1.getReader().ReadInt16();
            this.duration = 65535 & ((65535 & this.duration) >> 15 % 16 | (65535 & this.duration) << 16 - 15 % 16);
            this.duration = this.duration > 32767 ? this.duration - 65536 : this.duration;
        }

        public void encrypt_function(OutgoingBotReq param1)
        {
            param1.getWriter().Write((short)-7998);
            param1.getWriter().Write((short)(65535 & ((65535 & 0) >> 16 % 16 | (65535 & 0) << 16 - 16 % 16)));
            param1.getWriter().Write((short)(65535 & ((65535 & this.duration) << 15 % 16 | (65535 & this.duration) >> 16 - 15 % 16)));
        }
    }
}
09/01/2013 14:33 general_lolichdissdich#32
Also note that PBDO has overcome this changing packet id's problem too. For that you will need to dive deeper into Flash/AS3/Compilers and stuff. As this is no new information, here is a link to a tool that will help you with the packet ids:
[Only registered and activated users can see links. Click Here To Register...]
On another note though: I would guess if packet bots would become a problem for seafight, I guess they would start doing stuff that they did with DO, which will add a lot more complexity.

HF & GL
09/01/2013 15:01 Maurice#33
RABCDAsm is a known tool to get the AS3 bytecode.. but this isn't the solution!

There is an SWF Decompiler what uses RABCDAsm for bytecode and then recreate's the AS3 Syntax of the bytecode.. (FFDec)

Also got the packet sending working for a part.. Receiving isn't working properly..
09/02/2013 13:21 general_lolichdissdich#34
Quote:
Originally Posted by Willie Wortel View Post
RABCDAsm is a known tool to get the AS3 bytecode.. but this isn't the solution!
You obviously didnt get it. look closer & try harder
09/02/2013 14:07 Maurice#35
Quote:
Originally Posted by general_lolichdissdich View Post
You obviously didnt get it. look closer & try harder
Obviously you don't get it.. RABCDAsm isn't needed, as I said, ByteCode is to hard to handle by searching specific thing's..

And FFDec does use RABCDAsm to get the bytecode of the SWF then recreate's a AS3 Syntax of it.. Which allow's me/other's to search for specific thing's in the "Search all AS3".

Got back in the seafight scene's as I still have some feeling there might be some good coder's around... maybe to shy to try..

In the next few day's I'll get an look on the SWF's again, and sniff some new packet's in-case there might be any change lately..

Allready have some idea's how Seafight handles their stuff within JAVA (See: Reversed ByteArray & IDataInput/Output @ SWF)

Stay tuned (:
10/14/2013 04:19 alpkarizma#36
can you make that like seabot
10/14/2013 11:50 mechanikzsz#37
maybe this help you... :pimp:


10/15/2013 15:43 _Creator_#38
Quote:
Originally Posted by mechanikzsz View Post
maybe this help you... :pimp:


I have no idea from where and how you got your hands on this, but it's worth pure gold.. so have my thanks.

Btw, got the logger to work - which makes things alot easier, since you know what's going on at any time, and therefore (more or less) know what's inside the packet.

[Only registered and activated users can see links. Click Here To Register...]
10/23/2013 17:27 dani1414#39
anything new ?
10/23/2013 18:48 _Creator_#40
I'll just leave this here.. :)


[Only registered and activated users can see links. Click Here To Register...]
10/23/2013 19:10 trolleras9#41
so what that means?
10/24/2013 18:13 jonmikeltxu#42
Quote:
Originally Posted by _Creator_ View Post
I'll just leave this here.. :)


[Only registered and activated users can see links. Click Here To Register...]
That mean that you have decrypted all packets?