Problem

Results 1 to 1 of 1
  1. #1
    Novice Binx93 is offline
    MemberRank
    Mar 2014 Join Date
    3Posts

    Problem

    I have a big problem, I can not get started on bot Here is the configuration I made :

    Program.cs

    using System;using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;


    namespace Axed
    {
    class Program
    {
    public static Random random = new Random();
    public static List<Connection> Connections = new List<Connection>();
    public static int RoomId;


    static void Main(string[] args)
    {
    Console.Title = "Axed: Phoenix Bot Program";


    Console.WriteLine("##################");
    Console.WriteLine("## Axed ##");
    Console.WriteLine("##################");
    Console.WriteLine("## By Quackster ##");
    Console.WriteLine("##################");
    Console.WriteLine();


    Console.WriteLine("Loading SSO tickets");
    SSOTickets.Load();


    int i = 0;


    RoomId = 146967;//random.Next(1000, 4000);


    foreach (String sso in SSOTickets.Accounts)
    {
    Connection connection = new Connection(i++, sso);


    Connections.Add(connection);


    Thread thread = new Thread(new ThreadStart(connection.Load));
    thread.Start();
    }


    Thread walker = new Thread(new ThreadStart(Walk));
    walker.Start();




    Console.Read();
    }


    public static void Walk()
    {
    while (true)
    {
    foreach (Connection connection in Connections)
    {
    if (!connection.inRoom)
    continue;


    connection.Send("AK" + Encoder.encodeInt(random.Next(0, 30)) + Encoder.encodeInt(random.Next(0, 30)));


    if (random.Next(100) % 2 == 0)
    {
    String message = "POOLS CLOSED DUE TO AIDS";
    connection.Send(Encoder.encodeLength(55) + Encoder.encodeLength(message.Length) + message);
    }
    else
    {
    String message = "WE ARE THE /B/BROTHERS OF 4CHAN";
    connection.Send(Encoder.encodeLength(55) + Encoder.encodeLength(message.Length) + message);
    }
    }


    Thread.Sleep(2000);
    }
    }
    }
    }

    Connection.cs

    using System;using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Net.Sockets;


    namespace Axed
    {
    class Connection
    {
    public Random random;
    private int Count;
    private string SSO;
    private Socket mSocket;
    public bool inRoom;


    public Connection(int count, string sso)
    {
    this.random = new Random();
    this.Count = count;
    this.SSO = sso;
    }


    public void Load()
    {
    try
    {
    this.mSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    this.mSocket.Connect("93.7.114.133", 50769);


    this.Send("F_" + Encoder.encodeLength(this.SSO.Length) + this.SSO);


    inRoom = false;


    this.ListenThread();
    }
    catch { }


    Console.ReadLine();
    }


    public void ListenThread()
    {
    int mRead;
    byte[] mBuffer = new byte[512];


    while (true)
    {
    mRead = 0;


    try
    {
    mRead = mSocket.Receive(mBuffer, 0, 512, SocketFlags.None);
    }
    catch
    {
    break;
    }


    if (mRead == 0)
    {
    break;
    }


    string mString = Encoding.UTF8.GetString(mBuffer, 0, mRead);


    // Console.WriteLine(string.Format("REC >> {0}", mString));


    if (mString.Contains("@BJJ"))
    {
    Send("@L");


    Console.WriteLine("Logged in woo!");




    Send(Encoder.encodeLength(391) + Encoder.encodeInt(Program.RoomId) + Encoder.encodeInt(0) + Encoder.encodeInt(0));
    }


    if (mString.StartsWith("@S"))
    {
    Send("FA" + Encoder.encodeInt(Program.RoomId));
    }


    if (mString.StartsWith("GF"))
    {
    Send(Encoder.encodeLength(390));
    inRoom = true;


    String figure = "hd-180-5.lg-270-64.sh-300-64.hr-110-45.cc-260-62.ch-210-66";
    Send(Encoder.encodeLength(44) + Encoder.encodeLength("M".Length) + "M" + Encoder.encodeLength(figure.Length) + figure);
    }


    if (mString.StartsWith("J|"))
    {
    Send("FA" + Encoder.encodeInt(Program.RoomId));
    }
    }
    Load();
    }


    public void Send(string data)
    {
    try
    {
    data = "@" + Encoder.encodeLength(data.Length) + data;


    //Console.WriteLine(string.Format("SENT << {0}", data));


    byte[] buffer = Encoding.Default.GetBytes(data);
    mSocket.Send(buffer, 0, buffer.Length, SocketFlags.None);
    }
    catch { }
    }


    public void SendRaw(string data)
    {
    byte[] buffer = Encoding.Default.GetBytes(data);
    mSocket.Send(buffer, 0, buffer.Length, SocketFlags.None);
    }
    }
    }

    When is the problem ?




Advertisement