Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- using System.Net.Sockets;
- using System.Text;
- using MaverickClient.Forms;
- // Token: 0x02000004 RID: 4
- namespace MaverickClient {
- public sealed class GClass1 {
- private NetworkStream networkStream;
- private readonly TcpClient tcpClient = new TcpClient();
- // Token: 0x06000009 RID: 9 RVA: 0x000029D0 File Offset: 0x00000BD0
- public GClass1()
- {
- Console.Title = "Dynamic Logs Logs";
- Console.WriteLine("Logging Process Initiated");
- Console.WriteLine("Client Started");
- method_0();
- Console.WriteLine("Forum Connection Starting...");
- }
- // Token: 0x0600000A RID: 10 RVA: 0x00002068 File Offset: 0x00000268
- private void method_0() {
- tcpClient.NoDelay = true;
- tcpClient.Connect("94.23.27.204", 6969);
- Console.WriteLine("Socket Connected");
- }
- // Token: 0x0600000B RID: 11 RVA: 0x00002A1C File Offset: 0x00000C1C
- public string method_1() {
- if (!tcpClient.Connected) method_0();
- method_14();
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var result = GClass14.smethod_0(tcpClient, "Request=Version");
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- return result;
- }
- // Token: 0x0600000C RID: 12 RVA: 0x00002A88 File Offset: 0x00000C88
- public bool method_2(out byte[] byte_0) {
- byte_0 = new byte[0];
- if (!tcpClient.Connected) method_0();
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- networkStream = tcpClient.GetStream();
- var bytes = Encoding.UTF8.GetBytes("Request=Updater");
- var bytes2 = BitConverter.GetBytes(bytes.Length);
- Console.WriteLine(string.Concat("Raw Data: ", BitConverter.ToInt32(bytes2, 0), " -> ",
- Encoding.UTF8.GetString(bytes)));
- networkStream.Write(bytes2, 0, bytes2.Length);
- networkStream.Write(bytes, 0, bytes.Length);
- networkStream.Flush();
- var array = new byte[4];
- networkStream.Read(array, 0, array.Length);
- Console.WriteLine("ExpectedSize: " + BitConverter.ToInt32(array, 0));
- var download = new Download(networkStream, BitConverter.ToInt32(array, 0));
- download.ShowDialog();
- bool result;
- if (download.bool_0) {
- byte_0 = download.list_0.ToArray();
- Console.WriteLine(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = true;
- }
- else {
- Console.WriteLine("Download Failed: Update.zip -> Size: " + array);
- result = false;
- }
- return result;
- }
- // Token: 0x0600000D RID: 13 RVA: 0x00002BF8 File Offset: 0x00000DF8
- public string method_3(string string_0, out string string_1) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string_1 = string.Empty;
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient,
- "Request=OAuth_Finish&PrivateKey=" + string_0 + "&HWID=" + GClass7.smethod_0());
- string result;
- if (!(text.Split('-')[0] == "Login Found")) {
- GClass12.smethod_0("Error: Login not Found -> " + text);
- result = text;
- }
- else {
- string_1 = text.Split('-')[1];
- GClass12.smethod_0("Login Found: " + string_1);
- result = "Login Found";
- }
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- return result;
- }
- // Token: 0x0600000E RID: 14 RVA: 0x00002CDC File Offset: 0x00000EDC
- public string method_4(string string_0, string string_1, out string string_2) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string_2 = string.Empty;
- string result;
- if (GClass3.smethod_0(string_0) && GClass3.smethod_0(string_1)) {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient,
- string.Concat("Request=Login&Username=", string_0, "&Password=", string_1, "&HWID=",
- GClass7.smethod_0()));
- string text2;
- if (!(text.Split('-')[0] == "Login Found")) {
- GClass12.smethod_0("Error: Login not Found -> " + text);
- text2 = text;
- }
- else {
- string_2 = text.Split('-')[1];
- GClass12.smethod_0(string.Concat("Login Found: ", string_0, " -> ", string_1, " -> ", string_2));
- text2 = "Login Found";
- }
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = text2;
- }
- else {
- if (!GClass3.smethod_0(string_0))
- GClass12.smethod_0("Prepare Failed: Username=" + string_0);
- else if (!GClass3.smethod_0(string_1)) GClass12.smethod_0("Prepare Failed: Password=" + string_1);
- result = "Empty Credentials";
- }
- return result;
- }
- // Token: 0x0600000F RID: 15 RVA: 0x00002E54 File Offset: 0x00001054
- public string method_5(string string_0, bool bool_0) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string result;
- if (GClass3.smethod_0(string_0)) {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient,
- "Request=Products&Token=" + string_0 + "&StreamImages=" + (bool_0 ? "true" : "false"));
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = text;
- }
- else {
- if (!GClass3.smethod_0(string_0)) GClass12.smethod_0("Prepare Failed: Token=" + string_0);
- result = "Empty Token";
- }
- return result;
- }
- // Token: 0x06000010 RID: 16 RVA: 0x00002F04 File Offset: 0x00001104
- public string method_6(string string_0) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string result;
- if (GClass3.smethod_0(string_0)) {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient, "Request=Newsfeed&Token=" + string_0);
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = text;
- }
- else {
- if (!GClass3.smethod_0(string_0)) GClass12.smethod_0("Prepare Failed: Token=" + string_0);
- result = "Empty Token";
- }
- return result;
- }
- // Token: 0x06000011 RID: 17 RVA: 0x00002FA0 File Offset: 0x000011A0
- public string method_7(string string_0) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string result;
- if (GClass3.smethod_0(string_0)) {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient, "Request=SupportTickets&Token=" + string_0);
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = text;
- }
- else {
- if (!GClass3.smethod_0(string_0)) GClass12.smethod_0("Prepare Failed: Token=" + string_0);
- result = "Empty Token";
- }
- return result;
- }
- // Token: 0x06000012 RID: 18 RVA: 0x0000303C File Offset: 0x0000123C
- public string method_8(string string_0, bool bool_0) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string result;
- if (!GClass3.smethod_0(string_0)) {
- if (!GClass3.smethod_0(string_0)) GClass12.smethod_0("Prepare Failed: Token=" + string_0);
- result = "Empty Token";
- }
- else {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient,
- "Request=GetNotifications&Token=" + string_0 + "&UnReadOnly=" + (bool_0 ? "true" : "false"));
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = text;
- }
- return result;
- }
- // Token: 0x06000013 RID: 19 RVA: 0x000030EC File Offset: 0x000012EC
- public string method_9(string string_0, int int_0) {
- if (!tcpClient.Connected) method_0();
- method_14();
- string result;
- if (GClass3.smethod_0(string_0)) {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient,
- string.Concat("Request=ReadNotifications&Token=", string_0, "&ID=", int_0));
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = text;
- }
- else {
- if (!GClass3.smethod_0(string_0)) GClass12.smethod_0("Prepare Failed: Token=" + string_0);
- result = "Empty Token";
- }
- return result;
- }
- // Token: 0x06000014 RID: 20 RVA: 0x000031A4 File Offset: 0x000013A4
- public bool method_10(string string_0, string string_1, int int_0, out byte[] byte_0) {
- byte_0 = new byte[0];
- if (!tcpClient.Connected) method_0();
- method_14();
- bool result;
- if (GClass3.smethod_0(string_0)) {
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- networkStream = tcpClient.GetStream();
- var bytes = Encoding.UTF8.GetBytes(string.Concat("Request=Download&Token=", string_0, "&ProductID=",
- int_0));
- var bytes2 = BitConverter.GetBytes(bytes.Length);
- GClass12.smethod_0(string.Concat("Raw Data: ", BitConverter.ToInt32(bytes2, 0), " -> ",
- Encoding.UTF8.GetString(bytes)));
- networkStream.Write(bytes2, 0, bytes2.Length);
- networkStream.Write(bytes, 0, bytes.Length);
- networkStream.Flush();
- var array = new byte[4];
- networkStream.Read(array, 0, array.Length);
- GClass12.smethod_0("ExpectedSize: " + BitConverter.ToInt32(array, 0) + " No bytesFrom (Download)");
- var num = BitConverter.ToInt32(array, 0);
- var download = new Download(networkStream, num);
- download.ShowDialog();
- if (!download.bool_0) {
- GClass12.smethod_0(string.Concat("Download Failed: ", string_1, " -> Size: ", num));
- result = false;
- }
- else {
- byte_0 = download.list_0.ToArray();
- GClass12.smethod_0(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- result = true;
- }
- }
- else {
- if (!GClass3.smethod_0(string_0)) GClass12.smethod_0("Prepare Failed: Username=" + string_0);
- result = false;
- }
- return result;
- }
- // Token: 0x06000015 RID: 21 RVA: 0x00003390 File Offset: 0x00001590
- public bool method_11() {
- if (!tcpClient.Connected) method_0();
- method_14();
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient, "Request=APICheck");
- Console.WriteLine("Request: APICheck -> Response: " + text);
- Console.Write(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- bool result;
- if (text != "Authenticated") {
- Console.WriteLine("Authentication Failed");
- result = false;
- }
- else {
- result = true;
- }
- return result;
- }
- // Token: 0x06000016 RID: 22 RVA: 0x00003428 File Offset: 0x00001628
- public bool method_12(string string_0, string string_1, string string_2, string string_3) {
- if (!tcpClient.Connected) method_0();
- method_14();
- var stopwatch = new Stopwatch();
- stopwatch.Start();
- var text = GClass14.smethod_0(tcpClient,
- string.Concat("Request=Log&LogProcess=", string_0, "&LogType=", string_1, "&LogID=", string_2,
- "&LogMessage=", string_3));
- Console.WriteLine("Request: APICheck -> Response: " + text);
- Console.Write(stopwatch.Elapsed.TotalMilliseconds + "ms");
- stopwatch.Reset();
- bool result;
- if (text == "Log Inserted") {
- result = true;
- }
- else {
- Console.WriteLine(text);
- result = false;
- }
- return result;
- }
- // Token: 0x06000017 RID: 23 RVA: 0x00002095 File Offset: 0x00000295
- public void method_13() {
- if (tcpClient.Connected) tcpClient.Close();
- }
- // Token: 0x06000018 RID: 24 RVA: 0x000034F4 File Offset: 0x000016F4
- private void method_14() {
- if (!tcpClient.Connected) method_0();
- if (networkStream != null) {
- Console.WriteLine("Cleaning Stream");
- var array = new byte[4096];
- while (networkStream.DataAvailable) {
- Console.WriteLine("Cleared Data");
- networkStream.Read(array, 0, array.Length);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement