Skip to content

Instantly share code, notes, and snippets.

@miou-gh
Created January 31, 2017 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miou-gh/1f514d25b2054a6a12f7e3d7f1e01080 to your computer and use it in GitHub Desktop.
Save miou-gh/1f514d25b2054a6a12f7e3d7f1e01080 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using PlayerIOClient;
namespace TrollBot
{
// Token: 0x02000003 RID: 3
public class Form1 : Form
{
// Token: 0x06000002 RID: 2 RVA: 0x00002164 File Offset: 0x00000364
public Form1()
{
this.InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false;
}
// Token: 0x06000005 RID: 5 RVA: 0x000022DC File Offset: 0x000004DC
private void button1_Click(object sender, EventArgs e)
{
if (this.button1.Text == "Disconnect")
{
this.button2.Enabled = false;
Form1.connection_0.Disconnect();
this.button1.Text = "Connect";
}
else if (this.textBox1.Text == "")
{
this.method_0("guest", "guest", this.textBox3.Text);
}
else
{
this.method_0(this.textBox1.Text, this.textBox2.Text, this.textBox3.Text);
}
}
// Token: 0x0600000D RID: 13 RVA: 0x000026C4 File Offset: 0x000008C4
private void button2_Click(object sender, EventArgs e)
{
this.richTextBox1.Text = "*****************" + Environment.NewLine + this.richTextBox1.Text;
this.textBox3.Enabled = false;
this.method_4();
this.button2.Enabled = false;
}
// Token: 0x0600000E RID: 14 RVA: 0x00002714 File Offset: 0x00000914
private void button3_Click(object sender, EventArgs e)
{
this.int_2 = 0;
this.int_6 = 0;
this.button2.Enabled = false;
this.textBox3.Enabled = true;
this.label6.Text = "Players Found: " + Convert.ToString(this.int_6);
this.listBox1.Items.Clear();
try
{
Form1.connection_0.Disconnect();
}
catch
{
}
}
// Token: 0x0600000F RID: 15 RVA: 0x00002078 File Offset: 0x00000278
private void button4_Click(object sender, EventArgs e)
{
this.int_2++;
this.method_4();
}
// Token: 0x06000010 RID: 16 RVA: 0x0000208E File Offset: 0x0000028E
protected override void Dispose(bool disposing)
{
if (disposing && this.icontainer_0 != null)
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x06000009 RID: 9 RVA: 0x00002076 File Offset: 0x00000276
private void Form1_Load(object sender, EventArgs e)
{
}
// Token: 0x0600000A RID: 10 RVA: 0x00002076 File Offset: 0x00000276
private void groupBox1_Enter(object sender, EventArgs e)
{
}
// Token: 0x06000011 RID: 17 RVA: 0x00002798 File Offset: 0x00000998
private void InitializeComponent()
{
this.icontainer_0 = new Container();
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form1));
this.groupBox1 = new GroupBox();
this.button1 = new Button();
this.label3 = new Label();
this.label2 = new Label();
this.label1 = new Label();
this.textBox1 = new TextBox();
this.textBox2 = new TextBox();
this.textBox3 = new TextBox();
this.label6 = new Label();
this.textBox4 = new TextBox();
this.button2 = new Button();
this.tabControl1 = new TabControl();
this.tabPage1 = new TabPage();
this.button4 = new Button();
this.linkLabel1 = new LinkLabel();
this.button3 = new Button();
this.tabPage2 = new TabPage();
this.listBox1 = new ListBox();
this.tabPage3 = new TabPage();
this.label5 = new Label();
this.richTextBox1 = new RichTextBox();
this.toolTip_0 = new ToolTip(this.icontainer_0);
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
base.SuspendLayout();
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Location = new Point(4, 2);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new Size(200, 89);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Connection";
this.groupBox1.Enter += new EventHandler(this.groupBox1_Enter);
this.button1.Location = new Point(9, 62);
this.button1.Name = "button1";
this.button1.Size = new Size(181, 23);
this.button1.TabIndex = 7;
this.button1.Text = "Connect";
this.toolTip_0.SetToolTip(this.button1, "Connect To EE Server");
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new EventHandler(this.button1_Click);
this.label3.AutoSize = true;
this.label3.Location = new Point(13, 97);
this.label3.Name = "label3";
this.label3.Size = new Size(72, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Player Name:";
this.label2.AutoSize = true;
this.label2.Location = new Point(9, 41);
this.label2.Name = "label2";
this.label2.Size = new Size(59, 13);
this.label2.TabIndex = 5;
this.label2.Text = "Password:";
this.label1.AutoSize = true;
this.label1.Location = new Point(9, 17);
this.label1.Name = "label1";
this.label1.Size = new Size(37, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Email:";
this.textBox1.Location = new Point(90, 14);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new Size(100, 22);
this.textBox1.TabIndex = 1;
this.toolTip_0.SetToolTip(this.textBox1, "EE Account Email (Leave Blank To Use Guests)");
this.textBox2.Location = new Point(90, 38);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new Size(100, 22);
this.textBox2.TabIndex = 2;
this.toolTip_0.SetToolTip(this.textBox2, "EE Account Password (Leave Blank If Using Guest");
this.textBox3.Location = new Point(94, 93);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new Size(100, 22);
this.textBox3.TabIndex = 3;
this.toolTip_0.SetToolTip(this.textBox3, "Player's Name To Search For.");
this.label6.AutoSize = true;
this.label6.Location = new Point(7, 142);
this.label6.Name = "label6";
this.label6.Size = new Size(91, 13);
this.label6.TabIndex = 13;
this.label6.Text = "Players Found: 0";
this.toolTip_0.SetToolTip(this.label6, "How Many Players The Bot Has Found");
this.textBox4.Location = new Point(94, 117);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new Size(100, 22);
this.textBox4.TabIndex = 12;
this.toolTip_0.SetToolTip(this.textBox4, "Output WorldID");
this.button2.Enabled = false;
this.button2.Location = new Point(6, 117);
this.button2.Name = "button2";
this.button2.Size = new Size(82, 22);
this.button2.TabIndex = 11;
this.button2.Text = "Scan";
this.toolTip_0.SetToolTip(this.button2, "Start Scan");
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new EventHandler(this.button2_Click);
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new Point(3, 3);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new Size(216, 212);
this.tabControl1.TabIndex = 13;
this.tabPage1.Controls.Add(this.button4);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.linkLabel1);
this.tabPage1.Controls.Add(this.button3);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.label6);
this.tabPage1.Controls.Add(this.button2);
this.tabPage1.Controls.Add(this.textBox3);
this.tabPage1.Controls.Add(this.textBox4);
this.tabPage1.Location = new Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new Padding(3);
this.tabPage1.Size = new Size(208, 186);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Login & Code";
this.tabPage1.UseVisualStyleBackColor = true;
this.button4.Location = new Point(107, 140);
this.button4.Name = "button4";
this.button4.Size = new Size(87, 23);
this.button4.TabIndex = 16;
this.button4.Text = "Next";
this.toolTip_0.SetToolTip(this.button4, "If Tool Gets Stuck, Use this.");
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new EventHandler(this.button4_Click);
this.linkLabel1.ActiveLinkColor = Color.DarkRed;
this.linkLabel1.AutoSize = true;
this.linkLabel1.Font = new Font("Segoe UI Symbol", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.linkLabel1.LinkBehavior = LinkBehavior.HoverUnderline;
this.linkLabel1.LinkColor = Color.DimGray;
this.linkLabel1.Location = new Point(90, 166);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new Size(112, 15);
this.linkLabel1.TabIndex = 15;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Made By kittco36 ©";
this.linkLabel1.VisitedLinkColor = Color.FromArgb(64, 64, 64);
this.button3.Location = new Point(6, 158);
this.button3.Name = "button3";
this.button3.Size = new Size(82, 23);
this.button3.TabIndex = 14;
this.button3.Text = "Reset";
this.toolTip_0.SetToolTip(this.button3, "Reset Tool (Sometimes Doesnt Work)");
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new EventHandler(this.button3_Click);
this.tabPage2.Controls.Add(this.listBox1);
this.tabPage2.Location = new Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new Padding(3);
this.tabPage2.Size = new Size(208, 186);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Worlds";
this.tabPage2.UseVisualStyleBackColor = true;
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new Point(6, 6);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new Size(196, 173);
this.listBox1.TabIndex = 0;
this.toolTip_0.SetToolTip(this.listBox1, "A List Of Current Online Worlds");
this.tabPage3.Controls.Add(this.label5);
this.tabPage3.Controls.Add(this.richTextBox1);
this.tabPage3.Location = new Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new Padding(3);
this.tabPage3.Size = new Size(208, 186);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Players";
this.tabPage3.UseVisualStyleBackColor = true;
this.label5.AutoSize = true;
this.label5.Location = new Point(6, 1);
this.label5.Name = "label5";
this.label5.Size = new Size(113, 13);
this.label5.TabIndex = 14;
this.label5.Text = "Username | World ID";
this.richTextBox1.BackColor = Color.Silver;
this.richTextBox1.BorderStyle = BorderStyle.None;
this.richTextBox1.Location = new Point(0, 16);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new Size(208, 170);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
this.toolTip_0.SetToolTip(this.richTextBox1, "A List Of Found Users");
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(222, 216);
base.Controls.Add(this.tabControl1);
this.Font = new Font("Segoe UI Symbol", 8.25f);
base.FormBorderStyle = FormBorderStyle.FixedSingle;
base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
base.MaximizeBox = false;
this.MaximumSize = new Size(238, 255);
base.MinimizeBox = false;
this.MinimumSize = new Size(238, 255);
base.Name = "Form1";
this.Text = "Player Finder";
base.Load += new EventHandler(this.Form1_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
base.ResumeLayout(false);
}
// Token: 0x06000003 RID: 3 RVA: 0x000021E0 File Offset: 0x000003E0
private void method_0(string string_2, string string_3, string string_4)
{
try
{
Form1.client_0 = PlayerIO.get_QuickConnect().SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", string_2, string_3);
this.roomInfo_0 = Form1.client_0.get_Multiplayer().ListRooms("Everybodyedits" + this.string_1, null, 0, 0);
int i = 0;
this.listBox1.Items.Clear();
while (i < this.roomInfo_0.Count<RoomInfo>())
{
this.listBox1.Items.Add(this.roomInfo_0[i].get_Id() + " | " + this.roomInfo_0[i].get_OnlineUsers());
i++;
}
this.button1.Text = "Disconnect";
this.button2.Enabled = true;
}
catch (PlayerIOError playerIOError)
{
MessageBox.Show("Error: " + playerIOError.Message, "Login Error!");
}
}
// Token: 0x06000004 RID: 4 RVA: 0x00002058 File Offset: 0x00000258
private void method_1(PlayerIOError playerIOError_0)
{
MessageBox.Show(playerIOError_0.Message);
this.button1.Text = "Connect";
}
// Token: 0x06000006 RID: 6 RVA: 0x0000238C File Offset: 0x0000058C
private string method_2()
{
string[] array = new string[]
{
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z"
};
string[] array2 = new string[]
{
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0"
};
Random random = new Random(Guid.NewGuid().GetHashCode());
string result;
switch (random.Next(0, 2))
{
case 0:
{
int num = random.Next(0, 26);
result = array[num];
break;
}
case 1:
{
int num = random.Next(0, 10);
result = array2[num];
break;
}
default:
result = "";
break;
}
return result;
}
// Token: 0x06000007 RID: 7 RVA: 0x00002570 File Offset: 0x00000770
private async void method_3(object object_0, Message message_0)
{
string type = message_0.get_Type();
if (type != null)
{
if (!(type == "init"))
{
if (type == "add")
{
try
{
message_0.GetInt(0u);
string var_5_62 = message_0.GetString(1u);
this.richTextBox1.Text = string.Concat(new string[]
{
var_5_62,
" | ",
this.roomInfo_0[this.int_2].get_Id(),
Environment.NewLine,
this.richTextBox1.Text
});
if (var_5_62 == this.textBox3.Text)
{
MessageBox.Show("Found Player: '" + this.textBox3.Text + "' in world: " + this.roomInfo_0[this.int_2].get_Id());
this.textBox4.Text = this.roomInfo_0[this.int_2].get_Id();
this.textBox3.Enabled = true;
this.button2.Enabled = true;
}
}
catch
{
}
this.int_6++;
this.label6.Text = "Players Found: " + Convert.ToString(this.int_6);
}
}
else
{
Form1.connection_0.Send("init2", new object[0]);
if (this.textBox3.Text == "Broadcast On")
{
Form1.connection_0.Send("say", new object[]
{
this.textBox4.Text
});
}
await Task.Delay(1500);
this.int_2++;
this.method_4();
}
}
}
// Token: 0x06000008 RID: 8 RVA: 0x000025BC File Offset: 0x000007BC
private void method_4()
{
try
{
this.listBox1.SelectedIndex = this.int_2;
}
catch
{
}
if (this.int_2 != 0)
{
Form1.connection_0.Disconnect();
}
if (this.int_2 > this.roomInfo_0.Count<RoomInfo>() - 1)
{
MessageBox.Show("All Rooms Searched.");
this.int_2 = 0;
this.textBox3.Enabled = true;
this.button2.Enabled = true;
}
else
{
try
{
Form1.connection_0 = Form1.client_0.get_Multiplayer().JoinRoom(this.roomInfo_0[this.int_2].get_Id(), null);
Form1.connection_0.add_OnMessage(new MessageReceivedEventHandler(this.method_3));
Form1.connection_0.Send("init", new object[0]);
}
catch
{
this.int_2++;
this.method_4();
}
}
}
// Token: 0x0600000B RID: 11 RVA: 0x00002076 File Offset: 0x00000276
private void method_5(object sender, EventArgs e)
{
}
// Token: 0x0600000C RID: 12 RVA: 0x00002076 File Offset: 0x00000276
private void method_6(object sender, EventArgs e)
{
}
// Token: 0x0400000B RID: 11
private bool bool_0 = true;
// Token: 0x04000018 RID: 24
private bool bool_1;
// Token: 0x04000021 RID: 33
private Button button1;
// Token: 0x04000028 RID: 40
private Button button2;
// Token: 0x0400002C RID: 44
private Button button3;
// Token: 0x0400002E RID: 46
private Button button4;
// Token: 0x04000001 RID: 1
private static Client client_0;
// Token: 0x04000002 RID: 2
private static Connection connection_0;
// Token: 0x04000004 RID: 4
public static Dictionary<int, string> dictionary_0 = new Dictionary<int, string>();
// Token: 0x04000005 RID: 5
public static Dictionary<string, string> dictionary_1 = new Dictionary<string, string>();
// Token: 0x0400000F RID: 15
private double double_0;
// Token: 0x0400001A RID: 26
private GroupBox groupBox1;
// Token: 0x04000019 RID: 25
private IContainer icontainer_0 = null;
// Token: 0x04000007 RID: 7
public int int_0;
// Token: 0x04000008 RID: 8
public int int_1;
// Token: 0x04000009 RID: 9
private int int_2 = 0;
// Token: 0x0400000A RID: 10
private int int_3 = 5;
// Token: 0x04000011 RID: 17
private int int_4;
// Token: 0x04000012 RID: 18
private int int_5;
// Token: 0x04000013 RID: 19
private int int_6 = 0;
// Token: 0x04000015 RID: 21
private int int_7;
// Token: 0x04000016 RID: 22
private int int_8;
// Token: 0x04000017 RID: 23
private int int_9;
// Token: 0x0400001D RID: 29
private Label label1;
// Token: 0x0400001C RID: 28
private Label label2;
// Token: 0x0400001B RID: 27
private Label label3;
// Token: 0x04000026 RID: 38
private Label label5;
// Token: 0x0400002B RID: 43
private Label label6;
// Token: 0x0400002D RID: 45
private LinkLabel linkLabel1;
// Token: 0x04000029 RID: 41
private ListBox listBox1;
// Token: 0x0400000C RID: 12
private Random random_0 = new Random();
// Token: 0x0400000D RID: 13
private Random random_1 = new Random();
// Token: 0x0400000E RID: 14
private Random random_2 = new Random();
// Token: 0x04000027 RID: 39
private RichTextBox richTextBox1;
// Token: 0x04000014 RID: 20
private RoomInfo[] roomInfo_0;
// Token: 0x04000003 RID: 3
private string string_0 = "[PlayerFinder]";
// Token: 0x04000010 RID: 16
private string string_1 = "219";
// Token: 0x04000022 RID: 34
private TabControl tabControl1;
// Token: 0x04000023 RID: 35
private TabPage tabPage1;
// Token: 0x04000024 RID: 36
private TabPage tabPage2;
// Token: 0x04000025 RID: 37
private TabPage tabPage3;
// Token: 0x0400001E RID: 30
private TextBox textBox1;
// Token: 0x0400001F RID: 31
private TextBox textBox2;
// Token: 0x04000020 RID: 32
private TextBox textBox3;
// Token: 0x0400002A RID: 42
private TextBox textBox4;
// Token: 0x0400002F RID: 47
private ToolTip toolTip_0;
// Token: 0x04000006 RID: 6
private static uint[,,] uint_0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment