We could.. but still it will bring nothing more then a new paid seafight bot..Quote:
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
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;
}
}
}
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)));
}
}
}