Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Phoenix
- {
- using Microsoft.Win32;
- using MySql.Data.MySqlClient;
- using Phoenix.Communication;
- using Phoenix.Core;
- using Phoenix.HabboHotel;
- using Phoenix.Messages;
- using Phoenix.Net;
- using Phoenix.Storage;
- using Phoenix.Util;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Net;
- using System.Security.Cryptography;
- using System.Text;
- internal class Class2
- {
- public static bool bool_0 = true;
- private static bool bool_1 = false;
- private static Class0 class0_0;
- private static Class111 class111_0;
- private static Class15 class15_0;
- private static Class17 class17_0;
- private static Class3 class3_0;
- private static Class303 class303_0;
- internal static DateTime dateTime_0;
- private static Encoding encoding_0;
- public const int int_0 = 0x35e8;
- public static int int_1 = 1;
- public static IPAddress ipaddress_0 = IPAddress.Parse(string.Concat(new object[] { 0xd0, Convert.ToChar(0x2e).ToString(), 0x73, Convert.ToChar(0x2e).ToString(), 0xdb, Convert.ToChar(0x2e).ToString(), 200 }));
- public const string string_0 = "secure.otaku-studios.com";
- public const string string_1 = "http://secure.otaku-studios.com/phx/";
- public string string_2 = smethod_2(0x35e8.ToString());
- public string string_3 = ("http://secure.otaku-studios.com/phx/licence_check" + Convert.ToChar(0x2e).ToString() + Convert.ToChar(0x63).ToString() + Convert.ToChar(0x66).ToString() + Convert.ToChar(0x6d).ToString() + Convert.ToChar(0x3f).ToString());
- public static string string_4 = ("http://secure.otaku-studios.com/phx/version" + Convert.ToChar(0x2e).ToString() + Convert.ToChar(0x63).ToString() + Convert.ToChar(0x66).ToString() + Convert.ToChar(0x6d).ToString() + Convert.ToChar(0x3f).ToString());
- public static string string_5 = ("http://secure.otaku-studios.com/phx/override" + Convert.ToChar(0x2e).ToString() + Convert.ToChar(0x74).ToString() + Convert.ToChar(120).ToString() + Convert.ToChar(0x74).ToString());
- public static string string_6 = smethod_21(string_4 + "b=" + 0x35e8);
- public static string string_7 = smethod_21(string_5);
- public static string string_8;
- private static string string_9;
- public void method_0()
- {
- if (smethod_0(250) == 250)
- {
- string environmentVariable = Environment.GetEnvironmentVariable("windir");
- string str3 = System.IO.File.ReadAllText(environmentVariable + @"\system32\drivers\etc\hosts");
- if ((((str3 == null) || str3.Contains("habboon")) || (str3.Contains("otaku") || (ipaddress_0.ToString().Length != 15))) || ("secure.otaku-studios.com".Length != 0x18))
- {
- Console.ForegroundColor = ConsoleColor.Red;
- smethod_20("Unable to contact licence server! Try again later", false);
- }
- else
- {
- dateTime_0 = DateTime.Now;
- Console.Title = "Loading Phoenix emulator";
- encoding_0 = Encoding.Default;
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine();
- Console.WriteLine(" ______ _ _ _______ ");
- Console.WriteLine(@" (_____ \| | (_) (_______) ");
- Console.WriteLine(" _____) ) | _ ___ ____ ____ _ _ _ _____ ____ _ _ ");
- Console.WriteLine(@" | ____/| || \ / _ \ / _ ) _ \| ( \ / ) | ___) | \| | | |");
- Console.WriteLine(" | | | | | | |_| ( (/ /| | | | |) X ( | |_____| | | | |_| |");
- Console.WriteLine(@" |_| |_| |_|\___/ \____)_| |_|_(_/ \_) |_______)_|_|_|\____|");
- Console.WriteLine();
- Console.WriteLine(" " + String_0);
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine();
- Console.WriteLine(" Dedicated and VPS Hosting available at Otaku-Hosting.com");
- Console.WriteLine(" FUCK YOU AARON!, By Darkenental(NyanCat), Zayco, Prime");
- Console.WriteLine();
- try
- {
- Console.ForegroundColor = ConsoleColor.Gray;
- class15_0 = new Class15("config.conf");
- DateTime now = DateTime.Now;
- if (Convert.ToChar(this.string_3.Substring(13, 1)) == Convert.ToChar(0x2e))
- {
- Class9.String_6 = "Hacked by Darkenental, Zayco y Prime";
- Class9.String_3 = "Hacked by Darkenental, Zayco y Prime";
- }
- string str = "";
- //string str5 = smethod_2(smethod_1(smethod_1(str.Substring(0x20, 0x20) + string_8) + ipaddress_0.ToString() + "4g") + string_9);
- GClass2 class2 = new GClass2(smethod_12().dictionary_0["db.hostname"], uint.Parse(smethod_12().dictionary_0["db.port"]), smethod_12().dictionary_0["db.username"], smethod_12().dictionary_0["db.password"]);
- str = "";
- GClass1 class3 = new GClass1(smethod_12().dictionary_0["db.name"], uint.Parse(smethod_12().dictionary_0["db.pool.minsize"]), uint.Parse(smethod_12().dictionary_0["db.pool.maxsize"]));
- class0_0 = new Class0(class2, class3);
- Class9.String_1 = str;
- class3_0 = new Class3(int.Parse(smethod_12().dictionary_0["game.tcp.conlimit"]));
- string str2 = "";
- int num2 = Class9.String_6.Length * 0x35e8;
- num2 = Class9.String_3.Length % 0x35e8;
- str2 = Class9.String_5 + smethod_1(num2.ToString()) + smethod_1(num2.ToString());
- class111_0 = new Class111();
- class111_0.method_1();
- class111_0.method_2();
- class111_0.method_3();
- class111_0.method_4();
- class111_0.method_5();
- class111_0.method_6();
- class111_0.method_7();
- class111_0.method_8();
- class111_0.method_9();
- class111_0.method_10();
- class111_0.method_11();
- class111_0.method_12();
- class111_0.method_13();
- class111_0.method_14();
- class111_0.method_15();
- class111_0.method_21();
- class111_0.method_20();
- class111_0.method_18();
- class111_0.method_17();
- class111_0.method_16();
- class111_0.method_19();
- class111_0.method_22();
- class111_0.method_24();
- class111_0.method_23();
- class111_0.method_25();
- class111_0.method_26();
- class111_0.method_27();
- class303_0 = new Class303(smethod_12().dictionary_0["mus.tcp.bindip"], int.Parse(smethod_12().dictionary_0["mus.tcp.port"]), smethod_12().dictionary_0["mus.tcp.allowedaddr"].Split(new char[] { ';' }), 20);
- Class9.Boolean_6 = str == str2;
- class17_0 = new Class17(smethod_12().dictionary_0["game.tcp.bindip"], int.Parse(smethod_12().dictionary_0["game.tcp.port"]), int.Parse(smethod_12().dictionary_0["game.tcp.conlimit"]));
- class17_0.method_3().method_0();
- TimeSpan span = (TimeSpan)(DateTime.Now - now);
- GClass3.smethod_0(string.Concat(new object[] { "Server -> READY! (", span.Seconds, " s, ", span.Milliseconds, " ms)" }));
- Console.Beep();
- }
- catch (KeyNotFoundException)
- {
- GClass3.smethod_0("Please check your configuration file - some values appear to be missing.");
- GClass3.smethod_0("Press any key to shut down ...");
- Console.ReadKey(true);
- smethod_17();
- }
- catch (InvalidOperationException exception)
- {
- GClass3.smethod_0("Failed to initialize PhoenixEmulator: " + exception.Message);
- GClass3.smethod_0("Press any key to shut down ...");
- Console.ReadKey(true);
- smethod_17();
- }
- }
- }
- }
- public static int smethod_0(int int_2)
- {
- if (int_2 != 1)
- {
- if (int_2 == 2)
- {
- return int_2;
- }
- if (int_2 == 3)
- {
- return int_2;
- }
- if (int_2 == 4)
- {
- return int_2;
- }
- if (int_2 == 5)
- {
- return int_2;
- }
- if (int_2 == 6)
- {
- return int_2;
- }
- if (int_2 == 7)
- {
- return int_2;
- }
- if (int_2 == 8)
- {
- return int_2;
- }
- if (int_2 == 9)
- {
- return int_2;
- }
- if (int_2 == 10)
- {
- return int_2;
- }
- if (int_2 == 11)
- {
- return int_2;
- }
- if (int_2 == 12)
- {
- return int_2;
- }
- if (int_2 == 13)
- {
- return int_2;
- }
- if (int_2 == 14)
- {
- return int_2;
- }
- if (int_2 == 15)
- {
- return int_2;
- }
- if (int_2 == 0x10)
- {
- return int_2;
- }
- if (int_2 == 0x11)
- {
- return int_2;
- }
- if (int_2 == 0x12)
- {
- return int_2;
- }
- if (int_2 == 0x13)
- {
- return int_2;
- }
- if (int_2 == 20)
- {
- return int_2;
- }
- if (int_2 == 0x15)
- {
- return int_2;
- }
- if (int_2 == 0x16)
- {
- return int_2;
- }
- if (int_2 == 0x17)
- {
- return int_2;
- }
- if (int_2 == 0x18)
- {
- return int_2;
- }
- if (int_2 == 0x19)
- {
- return int_2;
- }
- if (int_2 == 0x1a)
- {
- return int_2;
- }
- if (int_2 == 0x1b)
- {
- return int_2;
- }
- if (int_2 == 0x1c)
- {
- return int_2;
- }
- if (int_2 == 0x1d)
- {
- return int_2;
- }
- if (int_2 == 30)
- {
- return int_2;
- }
- if (int_2 == 0x1f)
- {
- return int_2;
- }
- if (int_2 == 0x20)
- {
- return int_2;
- }
- if (int_2 == 0x21)
- {
- return int_2;
- }
- if (int_2 == 0x22)
- {
- return int_2;
- }
- if (int_2 == 0x23)
- {
- return int_2;
- }
- if (int_2 == 0x24)
- {
- return int_2;
- }
- if (int_2 == 0x25)
- {
- return int_2;
- }
- if (int_2 == 0x26)
- {
- return int_2;
- }
- if (int_2 == 0x27)
- {
- return int_2;
- }
- if (int_2 == 40)
- {
- return int_2;
- }
- if (int_2 == 0x29)
- {
- return int_2;
- }
- if (int_2 == 0x2a)
- {
- return int_2;
- }
- if (int_2 == 0x2b)
- {
- return int_2;
- }
- if (int_2 == 0x2c)
- {
- return int_2;
- }
- if (int_2 == 0x2d)
- {
- return int_2;
- }
- if (int_2 == 0x2e)
- {
- return int_2;
- }
- if (int_2 == 0x2f)
- {
- return int_2;
- }
- if (int_2 == 0x30)
- {
- return int_2;
- }
- if (int_2 == 0x31)
- {
- return int_2;
- }
- if (int_2 == 50)
- {
- return int_2;
- }
- if (int_2 == 0x33)
- {
- return int_2;
- }
- if (int_2 == 0x34)
- {
- return int_2;
- }
- if (int_2 == 0x35)
- {
- return int_2;
- }
- if (int_2 == 0x36)
- {
- return int_2;
- }
- if (int_2 == 0x37)
- {
- return int_2;
- }
- if (int_2 == 0x38)
- {
- return int_2;
- }
- if (int_2 == 0x39)
- {
- return int_2;
- }
- if (int_2 == 0x3a)
- {
- return int_2;
- }
- if (int_2 == 0x3b)
- {
- return int_2;
- }
- if (int_2 == 60)
- {
- return int_2;
- }
- if (int_2 == 0x3d)
- {
- return int_2;
- }
- if (int_2 == 0x3e)
- {
- return int_2;
- }
- if (int_2 == 0x3f)
- {
- return int_2;
- }
- if (int_2 == 0x40)
- {
- return int_2;
- }
- if (int_2 == 0x41)
- {
- return int_2;
- }
- if (int_2 == 0x42)
- {
- return int_2;
- }
- if (int_2 == 0x43)
- {
- return int_2;
- }
- if (int_2 == 0x44)
- {
- return int_2;
- }
- if (int_2 == 0x45)
- {
- return int_2;
- }
- if (int_2 == 70)
- {
- return int_2;
- }
- if (int_2 == 0x47)
- {
- return int_2;
- }
- if (int_2 == 0x48)
- {
- return int_2;
- }
- if (int_2 == 0x49)
- {
- return int_2;
- }
- if (int_2 == 0x4a)
- {
- return int_2;
- }
- if (int_2 == 0x4b)
- {
- return int_2;
- }
- if (int_2 == 0x4c)
- {
- return int_2;
- }
- if (int_2 == 0x4d)
- {
- return int_2;
- }
- if (int_2 == 0x4e)
- {
- return int_2;
- }
- if (int_2 == 0x4f)
- {
- return int_2;
- }
- if (int_2 == 80)
- {
- return int_2;
- }
- if (int_2 == 0x51)
- {
- return int_2;
- }
- if (int_2 == 0x52)
- {
- return int_2;
- }
- if (int_2 == 0x53)
- {
- return int_2;
- }
- if (int_2 == 0x54)
- {
- return int_2;
- }
- if (int_2 == 0x55)
- {
- return int_2;
- }
- if (int_2 == 0x56)
- {
- return int_2;
- }
- if (int_2 == 0x57)
- {
- return int_2;
- }
- if (int_2 == 0x58)
- {
- return int_2;
- }
- if (int_2 == 0x59)
- {
- return int_2;
- }
- if (int_2 == 90)
- {
- return int_2;
- }
- if (int_2 == 0x5b)
- {
- return int_2;
- }
- if (int_2 == 0x5c)
- {
- return int_2;
- }
- if (int_2 == 0x5d)
- {
- return int_2;
- }
- if (int_2 == 0x5e)
- {
- return int_2;
- }
- if (int_2 == 0x5f)
- {
- return int_2;
- }
- if (int_2 == 0x60)
- {
- return int_2;
- }
- if (int_2 == 0x61)
- {
- return int_2;
- }
- if (int_2 == 0x62)
- {
- return int_2;
- }
- if (int_2 == 0x63)
- {
- return int_2;
- }
- if (int_2 == 100)
- {
- return int_2;
- }
- if (int_2 == 0x65)
- {
- return int_2;
- }
- if (int_2 == 0x66)
- {
- return int_2;
- }
- if (int_2 == 0x67)
- {
- return int_2;
- }
- if (int_2 == 0x68)
- {
- return int_2;
- }
- if (int_2 == 0x69)
- {
- return int_2;
- }
- if (int_2 == 0x6a)
- {
- return int_2;
- }
- if (int_2 == 0x6b)
- {
- return int_2;
- }
- if (int_2 == 0x6c)
- {
- return int_2;
- }
- if (int_2 == 0x6d)
- {
- return int_2;
- }
- if (int_2 == 110)
- {
- return int_2;
- }
- if (int_2 == 0x6f)
- {
- return int_2;
- }
- if (int_2 == 0x70)
- {
- return int_2;
- }
- if (int_2 == 0x71)
- {
- return int_2;
- }
- if (int_2 == 0x72)
- {
- return int_2;
- }
- if (int_2 == 0x73)
- {
- return int_2;
- }
- if (int_2 == 0x74)
- {
- return int_2;
- }
- if (int_2 == 0x75)
- {
- return int_2;
- }
- if (int_2 == 0x76)
- {
- return int_2;
- }
- if (int_2 == 0x77)
- {
- return int_2;
- }
- if (int_2 == 120)
- {
- return int_2;
- }
- if (int_2 == 0x79)
- {
- return int_2;
- }
- if (int_2 == 0x7a)
- {
- return int_2;
- }
- if (int_2 == 0x7b)
- {
- return int_2;
- }
- if (int_2 == 0x7c)
- {
- return int_2;
- }
- if (int_2 == 0x7d)
- {
- return int_2;
- }
- if (int_2 == 0x7e)
- {
- return int_2;
- }
- if (int_2 == 0x7f)
- {
- return int_2;
- }
- if (int_2 == 0x80)
- {
- return int_2;
- }
- if (int_2 == 0x81)
- {
- return int_2;
- }
- if (int_2 == 130)
- {
- return int_2;
- }
- if (int_2 == 0x83)
- {
- return int_2;
- }
- if (int_2 == 0x84)
- {
- return int_2;
- }
- if (int_2 == 0x85)
- {
- return int_2;
- }
- if (int_2 == 0x86)
- {
- return int_2;
- }
- if (int_2 == 0x87)
- {
- return int_2;
- }
- if (int_2 == 0x88)
- {
- return int_2;
- }
- if (int_2 == 0x89)
- {
- return int_2;
- }
- if (int_2 == 0x8a)
- {
- return int_2;
- }
- if (int_2 == 0x8b)
- {
- return int_2;
- }
- if (int_2 == 140)
- {
- return int_2;
- }
- if (int_2 == 0x8d)
- {
- return int_2;
- }
- if (int_2 == 0x8e)
- {
- return int_2;
- }
- if (int_2 == 0x8f)
- {
- return int_2;
- }
- if (int_2 == 0x90)
- {
- return int_2;
- }
- if (int_2 == 0x91)
- {
- return int_2;
- }
- if (int_2 == 0x92)
- {
- return int_2;
- }
- if (int_2 == 0x93)
- {
- return int_2;
- }
- if (int_2 == 0x94)
- {
- return int_2;
- }
- if (int_2 == 0x95)
- {
- return int_2;
- }
- if (int_2 == 150)
- {
- return int_2;
- }
- if (int_2 == 0x97)
- {
- return int_2;
- }
- if (int_2 == 0x98)
- {
- return int_2;
- }
- if (int_2 == 0x99)
- {
- return int_2;
- }
- if (int_2 == 0x9a)
- {
- return int_2;
- }
- if (int_2 == 0x9b)
- {
- return int_2;
- }
- if (int_2 == 0x9c)
- {
- return int_2;
- }
- if (int_2 == 0x9d)
- {
- return int_2;
- }
- if (int_2 == 0x9e)
- {
- return int_2;
- }
- if (int_2 == 0x9f)
- {
- return int_2;
- }
- if (int_2 == 160)
- {
- return int_2;
- }
- if (int_2 == 0xa1)
- {
- return int_2;
- }
- if (int_2 == 0xa2)
- {
- return int_2;
- }
- if (int_2 == 0xa3)
- {
- return int_2;
- }
- if (int_2 == 0xa4)
- {
- return int_2;
- }
- if (int_2 == 0xa5)
- {
- return int_2;
- }
- if (int_2 == 0xa6)
- {
- return int_2;
- }
- if (int_2 == 0xa7)
- {
- return int_2;
- }
- if (int_2 == 0xa8)
- {
- return int_2;
- }
- if (int_2 == 0xa9)
- {
- return int_2;
- }
- if (int_2 == 170)
- {
- return int_2;
- }
- if (int_2 == 0xab)
- {
- return int_2;
- }
- if (int_2 == 0xac)
- {
- return int_2;
- }
- if (int_2 == 0xad)
- {
- return int_2;
- }
- if (int_2 == 0xae)
- {
- return int_2;
- }
- if (int_2 == 0xaf)
- {
- return int_2;
- }
- if (int_2 == 0xb0)
- {
- return int_2;
- }
- if (int_2 == 0xb1)
- {
- return int_2;
- }
- if (int_2 == 0xb2)
- {
- return int_2;
- }
- if (int_2 == 0xb3)
- {
- return int_2;
- }
- if (int_2 == 180)
- {
- return int_2;
- }
- if (int_2 == 0xb5)
- {
- return int_2;
- }
- if (int_2 == 0xb6)
- {
- return int_2;
- }
- if (int_2 == 0xb7)
- {
- return int_2;
- }
- if (int_2 == 0xb8)
- {
- return int_2;
- }
- if (int_2 == 0xb9)
- {
- return int_2;
- }
- if (int_2 == 0xba)
- {
- return int_2;
- }
- if (int_2 == 0xbb)
- {
- return int_2;
- }
- if (int_2 == 0xbc)
- {
- return int_2;
- }
- if (int_2 == 0xbd)
- {
- return int_2;
- }
- if (int_2 == 190)
- {
- return int_2;
- }
- if (int_2 == 0xbf)
- {
- return int_2;
- }
- if (int_2 == 0xc0)
- {
- return int_2;
- }
- if (int_2 == 0xc1)
- {
- return int_2;
- }
- if (int_2 == 0xc2)
- {
- return int_2;
- }
- if (int_2 == 0xc3)
- {
- return int_2;
- }
- if (int_2 == 0xc4)
- {
- return int_2;
- }
- if (int_2 == 0xc5)
- {
- return int_2;
- }
- if (int_2 == 0xc6)
- {
- return int_2;
- }
- if (int_2 == 0xc7)
- {
- return int_2;
- }
- if (int_2 == 200)
- {
- return int_2;
- }
- if (int_2 == 0xc9)
- {
- return int_2;
- }
- if (int_2 == 0xca)
- {
- return int_2;
- }
- if (int_2 == 0xcb)
- {
- return int_2;
- }
- if (int_2 == 0xcc)
- {
- return int_2;
- }
- if (int_2 == 0xcd)
- {
- return int_2;
- }
- if (int_2 == 0xce)
- {
- return int_2;
- }
- if (int_2 == 0xcf)
- {
- return int_2;
- }
- if (int_2 == 0xd0)
- {
- return int_2;
- }
- if (int_2 == 0xd1)
- {
- return int_2;
- }
- if (int_2 == 210)
- {
- return int_2;
- }
- if (int_2 == 0xd3)
- {
- return int_2;
- }
- if (int_2 == 0xd4)
- {
- return int_2;
- }
- if (int_2 == 0xd5)
- {
- return int_2;
- }
- if (int_2 == 0xd6)
- {
- return int_2;
- }
- if (int_2 == 0xd7)
- {
- return int_2;
- }
- if (int_2 == 0xd8)
- {
- return int_2;
- }
- if (int_2 == 0xd9)
- {
- return int_2;
- }
- if (int_2 == 0xda)
- {
- return int_2;
- }
- if (int_2 == 0xdb)
- {
- return int_2;
- }
- if (int_2 == 220)
- {
- return int_2;
- }
- if (int_2 == 0xdd)
- {
- return int_2;
- }
- if (int_2 == 0xde)
- {
- return int_2;
- }
- if (int_2 == 0xdf)
- {
- return int_2;
- }
- if (int_2 == 0xe0)
- {
- return int_2;
- }
- if (int_2 == 0xe1)
- {
- return int_2;
- }
- if (int_2 == 0xe2)
- {
- return int_2;
- }
- if (int_2 == 0xe3)
- {
- return int_2;
- }
- if (int_2 == 0xe4)
- {
- return int_2;
- }
- if (int_2 == 0xe5)
- {
- return int_2;
- }
- if (int_2 == 230)
- {
- return int_2;
- }
- if (int_2 == 0xe7)
- {
- return int_2;
- }
- if (int_2 == 0xe8)
- {
- return int_2;
- }
- if (int_2 == 0xe9)
- {
- return int_2;
- }
- if (int_2 == 0xea)
- {
- return int_2;
- }
- if (int_2 == 0xeb)
- {
- return int_2;
- }
- if (int_2 == 0xec)
- {
- return int_2;
- }
- if (int_2 == 0xed)
- {
- return int_2;
- }
- if (int_2 == 0xee)
- {
- return int_2;
- }
- if (int_2 == 0xef)
- {
- return int_2;
- }
- if (int_2 == 240)
- {
- return int_2;
- }
- if (int_2 == 0xf1)
- {
- return int_2;
- }
- if (int_2 == 0xf2)
- {
- return int_2;
- }
- if (int_2 == 0xf3)
- {
- return int_2;
- }
- if (int_2 == 0xf4)
- {
- return int_2;
- }
- if (int_2 == 0xf5)
- {
- return int_2;
- }
- if (int_2 == 0xf6)
- {
- return int_2;
- }
- if (int_2 == 0xf7)
- {
- return int_2;
- }
- if (int_2 == 0xf8)
- {
- return int_2;
- }
- if (int_2 == 0xf9)
- {
- return int_2;
- }
- if (int_2 == 250)
- {
- return int_2;
- }
- }
- return int_2;
- }
- public static string smethod_1(string string_10)
- {
- MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
- byte[] bytes = Encoding.UTF8.GetBytes(string_10);
- bytes = provider.ComputeHash(bytes);
- StringBuilder builder = new StringBuilder();
- foreach (byte num2 in bytes)
- {
- builder.Append(num2.ToString("x2").ToLower());
- }
- return builder.ToString().ToUpper();
- }
- public static bool smethod_10(string string_10)
- {
- if (!string.IsNullOrEmpty(string_10))
- {
- for (int i = 0; i < string_10.Length; i++)
- {
- if (!(char.IsLetter(string_10[i]) || char.IsNumber(string_10[i])))
- {
- return false;
- }
- }
- return true;
- }
- return false;
- }
- public static Class111 smethod_11()
- {
- return class111_0;
- }
- public static Class15 smethod_12()
- {
- return class15_0;
- }
- public static Class0 smethod_13()
- {
- return class0_0;
- }
- public static Encoding smethod_14()
- {
- return encoding_0;
- }
- public static Class17 smethod_15()
- {
- return class17_0;
- }
- internal static Class3 smethod_16()
- {
- return class3_0;
- }
- public static void smethod_17()
- {
- GClass3.smethod_0("Destroying PhoenixEmu environment...");
- if (smethod_16() != null)
- {
- smethod_16().method_1();
- class3_0 = null;
- }
- if (smethod_15() != null)
- {
- GClass3.smethod_0("Destroying connection manager.");
- smethod_15().method_3().method_2();
- smethod_15().method_0();
- class17_0 = null;
- }
- if (smethod_13() != null)
- {
- try
- {
- GClass3.smethod_0("Destroying database manager.");
- MySqlConnection.ClearAllPools();
- class0_0 = null;
- }
- catch
- {
- }
- }
- GClass3.smethod_0("Uninitialized successfully. Closing.");
- }
- internal static void smethod_18(string string_10)
- {
- try
- {
- GClass4 class2 = new GClass4(0x8b);
- class2.method_7(string_10);
- smethod_16().method_2().method_12(class2);
- }
- catch
- {
- }
- }
- internal static void smethod_19()
- {
- smethod_20("", true);
- }
- public static string smethod_2(string string_10)
- {
- byte[] bytes = Encoding.ASCII.GetBytes(string_10);
- byte[] buffer2 = new SHA1Managed().ComputeHash(bytes);
- string str = string.Empty;
- foreach (byte num2 in buffer2)
- {
- str = str + num2.ToString("X2");
- }
- return str;
- }
- internal static void smethod_20(string string_10, bool bool_2)
- {
- if (string_10 == "")
- {
- GClass3.smethod_6();
- bool_1 = true;
- try
- {
- class3_0.method_9().method_4();
- }
- catch
- {
- }
- try
- {
- smethod_15().method_3().method_1();
- smethod_16().method_2().method_19();
- }
- catch
- {
- }
- class17_0.method_7();
- class3_0.method_1();
- Console.WriteLine(string_10);
- }
- else
- {
- if (bool_1)
- {
- return;
- }
- GClass3.smethod_6();
- smethod_18("ATTENTION:\r\nThe server is shutting down. All furniture placed in rooms/traded/bought after this message is on your own responsibillity.");
- bool_1 = true;
- Console.WriteLine("Server shutting down...");
- try
- {
- class3_0.method_9().method_4();
- }
- catch
- {
- }
- try
- {
- smethod_15().method_3().method_1();
- smethod_16().method_2().method_19();
- }
- catch
- {
- }
- try
- {
- using (Class1 class2 = smethod_13().method_0())
- {
- class2.method_1("UPDATE users SET online = '0'");
- class2.method_1("UPDATE rooms SET users_now = '0'");
- }
- class17_0.method_7();
- class3_0.method_1();
- }
- catch
- {
- }
- try
- {
- Console.WriteLine("Destroying database manager.");
- MySqlConnection.ClearAllPools();
- class0_0 = null;
- }
- catch
- {
- }
- Console.WriteLine("System disposed, goodbye!");
- }
- if (bool_2)
- {
- Environment.Exit(1);
- }
- }
- public static string smethod_21(string string_10)
- {
- WebProxy proxy;
- Class2 class2 = new Class2();
- Uri address = new Uri(string_10);
- string host = address.Host;
- if ((host == null) || ((host != "secure.otaku-studios.com") && (host != "api.adf.ly")))
- {
- Console.ForegroundColor = ConsoleColor.Red;
- smethod_20("Invalid Licence details found #0004", false);
- smethod_19();
- }
- WebRequest request = WebRequest.Create(address);
- request.Proxy = null;
- request.Headers.Add("AuthName", string_8);
- request.Headers.Add("AuthPass", string_9);
- int num = 0x35e8;
- request.Headers.Add("AuthBuild", num.ToString());
- request.Headers.Add("AuthMachine", Environment.MachineName);
- request.Headers.Add("AuthInfo", ipaddress_0.ToString().Length + "secure.otaku-studios.com".Length.ToString());
- WebResponse response = request.GetResponse();
- Dictionary<string, string> dictionary = new Dictionary<string, string>();
- foreach (string str4 in response.Headers)
- {
- dictionary.Add(str4, response.Headers[str4]);
- }
- if (string_10 == class2.string_3)
- {
- if (dictionary["AuthU"] != string_8.Length.ToString())
- {
- return null;
- }
- if (dictionary.ContainsKey("AuthGen"))
- {
- return dictionary["AuthGen"];
- }
- }
- StreamReader reader = new StreamReader(response.GetResponseStream());
- return reader.ReadToEnd();
- }
- public static int smethod_3(string string_10)
- {
- return Convert.ToInt32(string_10);
- }
- public static bool smethod_4(string string_10)
- {
- if (!(string_10 == "1"))
- {
- return false;
- }
- return true;
- }
- public static string smethod_5(bool bool_2)
- {
- if (bool_2)
- {
- return "1";
- }
- return "0";
- }
- public static int smethod_6(int int_2, int int_3)
- {
- RNGCryptoServiceProvider provider = new RNGCryptoServiceProvider();
- byte[] data = new byte[4];
- provider.GetBytes(data);
- return new Random(BitConverter.ToInt32(data, 0)).Next(int_2, int_3 + 1);
- }
- public static double smethod_7()
- {
- TimeSpan span = (TimeSpan) (DateTime.UtcNow - new DateTime(0x7b2, 1, 1, 0, 0, 0));
- return span.TotalSeconds;
- }
- public static string smethod_8(string string_10)
- {
- return smethod_9(string_10, false, false);
- }
- public static string smethod_9(string string_10, bool bool_2, bool bool_3)
- {
- string_10 = string_10.Replace(Convert.ToChar(1), ' ');
- string_10 = string_10.Replace(Convert.ToChar(2), ' ');
- string_10 = string_10.Replace(Convert.ToChar(9), ' ');
- if (!bool_2)
- {
- string_10 = string_10.Replace(Convert.ToChar(13), ' ');
- }
- if (bool_3)
- {
- string_10 = string_10.Replace('\'', ' ');
- }
- return string_10;
- }
- internal static Class3 Class3_0
- {
- get
- {
- return class3_0;
- }
- set
- {
- class3_0 = value;
- }
- }
- public static string String_0
- {
- get
- {
- return ("Phoenix v3.7.1 (Build " + 0x35e8 + ")");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement