Class4.cs
À propos du fichier
- Type de fichier
- Fichier CS de 19 Ko (text/plain)
- Confidentialité
- Fichier public, envoyé le 3 août 2013 à 22:16, depuis l'adresse IP 213.111.x.x (France)
- Sécurité
- Ne contient aucun Virus ou Malware connus - Dernière vérification: 3 jours
- Statistiques
- La présente page de téléchargement a été vue 830 fois depuis l'envoi du fichier
- Page de téléchargement
-
Aperçu du fichier
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 Class4
{
public static bool bool_0 = false;
private static bool bool_1 = false;
private static Class110 class110_0;
private static Class14 class14_0;
private static Class16 class16_0;
private static Class2 class2_0;
private static Class310 class310_0;
private static Class5 class5_0;
internal static DateTime dateTime_0;
private static Encoding encoding_0;
public const int int_0 = 0x3722;
public static int int_1 = 0;
public const string string_0 = "otaku-studios.com";
public const string string_1 = "http://otaku-studios.com/phx/";
public string string_2 = smethod_1(0x3722.ToString());
public string string_3 = ("http://otaku-studios.com/phx/licence" + Convert.ToChar(0x2e).ToString() + "php" + Convert.ToChar(0x3f).ToString());
public static string string_4 = ("http://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_5 = smethod_20(string_4);
public static string string_6;
private static string string_7;
public void method_0()
{
string environmentVariable = Environment.GetEnvironmentVariable("windir");
if(1 == 1)
{
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(" Cracked by AmirZ");
Console.WriteLine(" Pwned :)");
Console.WriteLine();
try
{
Console.ForegroundColor = ConsoleColor.Gray;
class14_0 = new Class14("config.conf");
DateTime now = DateTime.Now;
string_6 = smethod_11().dictionary_0["Otaku-Studios.username"];
string_7 = smethod_11().dictionary_0["Otaku-Studios.password"];
int num = string_6.Length * string_7.Length;
if (1 == 1)
{
Class19.String_6 = string_6;
Class19.String_3 = string_7;
if (1 == 1)
{
string str6 = smethod_0(num.ToString());
if (1 == 1)
{
GClass2 class2 = new GClass2(smethod_11().dictionary_0["db.hostname"], uint.Parse(smethod_11().dictionary_0["db.port"]), smethod_11().dictionary_0["db.username"], smethod_11().dictionary_0["db.password"]);
GClass1 class3 = new GClass1(smethod_11().dictionary_0["db.name"], uint.Parse(smethod_11().dictionary_0["db.pool.minsize"]), uint.Parse(smethod_11().dictionary_0["db.pool.maxsize"]));
class2_0 = new Class2(class2, class3);
Class19.String_1 = "";
class5_0 = new Class5(int.Parse(smethod_11().dictionary_0["game.tcp.conlimit"]));
string str4 = "";
int num2 = Class19.String_6.Length * 0x3722;
num2 = Class19.String_3.Length % 0x3722;
str4 = Class19.String_5 + smethod_0(num2.ToString()) + smethod_0(num2.ToString());
if(1 == 1)
{
if (1 == 1)
{
class110_0 = new Class110();
class110_0.method_1();
class110_0.method_2();
class110_0.method_3();
class110_0.method_4();
class110_0.method_5();
class110_0.method_6();
class110_0.method_7();
class110_0.method_8();
class110_0.method_9();
class110_0.method_10();
class110_0.method_11();
class110_0.method_12();
class110_0.method_13();
class110_0.method_14();
class110_0.method_15();
class110_0.method_21();
class110_0.method_20();
class110_0.method_18();
class110_0.method_17();
class110_0.method_16();
class110_0.method_19();
class110_0.method_22();
class110_0.method_24();
class110_0.method_23();
class110_0.method_25();
class110_0.method_26();
class110_0.method_27();
}
class310_0 = new Class310(smethod_11().dictionary_0["mus.tcp.bindip"], int.Parse(smethod_11().dictionary_0["mus.tcp.port"]), smethod_11().dictionary_0["mus.tcp.allowedaddr"].Split(new char[] { ';' }), 20);
Class19.Boolean_7 = true;
class16_0 = new Class16(smethod_11().dictionary_0["game.tcp.bindip"], int.Parse(smethod_11().dictionary_0["game.tcp.port"]), int.Parse(smethod_11().dictionary_0["game.tcp.conlimit"]));
class16_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_16();
}
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_16();
}
}
}
public static string smethod_0(string string_8)
{
MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
byte[] bytes = Encoding.UTF8.GetBytes(string_8);
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 string smethod_1(string string_8)
{
byte[] bytes = Encoding.ASCII.GetBytes(string_8);
byte[] buffer2 = new SHA1Managed().ComputeHash(bytes);
string str = string.Empty;
foreach (byte num2 in buffer2)
{
str = str + num2.ToString("X2");
}
return str;
}
public static Class110 smethod_10()
{
return class110_0;
}
public static Class14 smethod_11()
{
return class14_0;
}
public static Class2 smethod_12()
{
return class2_0;
}
public static Encoding smethod_13()
{
return encoding_0;
}
public static Class16 smethod_14()
{
return class16_0;
}
internal static Class5 smethod_15()
{
return class5_0;
}
public static void smethod_16()
{
GClass3.smethod_0("Destroying PhoenixEmu environment...");
if (smethod_15() != null)
{
smethod_15().method_1();
class5_0 = null;
}
if (smethod_14() != null)
{
GClass3.smethod_0("Destroying connection manager.");
smethod_14().method_3().method_2();
smethod_14().method_0();
class16_0 = null;
}
if (smethod_12() != null)
{
try
{
GClass3.smethod_0("Destroying database manager.");
MySqlConnection.ClearAllPools();
class2_0 = null;
}
catch
{
}
}
GClass3.smethod_0("Uninitialized successfully. Closing.");
}
internal static void smethod_17(string string_8)
{
try
{
GClass4 class2 = new GClass4(0x8b);
class2.method_7(string_8);
smethod_15().method_2().method_12(class2);
}
catch
{
}
}
internal static void smethod_18()
{
smethod_19("", true);
}
internal static void smethod_19(string string_8, bool bool_2)
{
if (string_8 != "")
{
if (bool_1)
{
return;
}
GClass3.smethod_6();
smethod_17("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
{
class5_0.method_9().method_4();
}
catch
{
}
try
{
smethod_14().method_3().method_1();
smethod_15().method_2().method_20();
}
catch
{
}
try
{
using (Class1 class2 = smethod_12().method_0())
{
class2.method_1("UPDATE users SET online = '0'");
class2.method_1("UPDATE rooms SET users_now = '0'");
}
class16_0.method_7();
class5_0.method_1();
}
catch
{
}
try
{
Console.WriteLine("Destroying database manager.");
MySqlConnection.ClearAllPools();
class2_0 = null;
}
catch
{
}
Console.WriteLine("System disposed, goodbye!");
}
else
{
GClass3.smethod_6();
bool_1 = true;
try
{
class5_0.method_9().method_4();
}
catch
{
}
try
{
smethod_14().method_3().method_1();
smethod_15().method_2().method_20();
}
catch
{
}
try
{
class16_0.method_7();
}
catch { }
try
{
class5_0.method_1();
}
catch { }
Console.WriteLine(string_8);
}
if (bool_2)
{
Environment.Exit(1);
}
}
public static int smethod_2(string string_8)
{
return Convert.ToInt32(string_8);
}
public static string smethod_20(string string_8)
{
Class4 class2 = new Class4();
Uri address = new Uri(string_8);
string host = address.Host;
WebRequest request = WebRequest.Create(address);
request.Proxy = null;
request.Headers.Add("AuthName", string_6);
request.Headers.Add("AuthPass", string_7);
int num = 0x3722;
request.Headers.Add("AuthBuild", num.ToString());
request.Headers.Add("AuthMachine", Environment.MachineName);
request.Headers.Add("AuthServer", "Phoenix");
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_8 == class2.string_3)
{
if (dictionary["AuthU"] != string_6.Length.ToString())
{
return null;
}
if (dictionary.ContainsKey("MinBuild"))
{
int_1 = Convert.ToInt16(dictionary["MinBuild"]);
if (int_1 <= 0x3722)
{
bool_0 = true;
}
else if (int_1 > 0x3722)
{
bool_0 = false;
}
}
if (dictionary.ContainsKey("AuthGen"))
{
return dictionary["AuthGen"];
}
}
StreamReader reader = new StreamReader(response.GetResponseStream());
return reader.ReadToEnd();
}
public static bool smethod_21(int int_2, int int_3)
{
return ((int_2 % int_3) == 0);
}
public static bool smethod_3(string string_8)
{
return (string_8 == "1");
}
public static string smethod_4(bool bool_2)
{
if (!bool_2)
{
return "0";
}
return "1";
}
public static int smethod_5(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_6()
{
TimeSpan span = (TimeSpan) (DateTime.UtcNow - new DateTime(0x7b2, 1, 1, 0, 0, 0));
return span.TotalSeconds;
}
public static string smethod_7(string string_8)
{
return smethod_8(string_8, false, false);
}
public static string smethod_8(string string_8, bool bool_2, bool bool_3)
{
string_8 = string_8.Replace(Convert.ToChar(1), ' ');
string_8 = string_8.Replace(Convert.ToChar(2), ' ');
string_8 = string_8.Replace(Convert.ToChar(9), ' ');
if (!bool_2)
{
string_8 = string_8.Replace(Convert.ToChar(13), ' ');
}
if (bool_3)
{
string_8 = string_8.Replace('\'', ' ');
}
return string_8;
}
public static bool smethod_9(string string_8)
{
if (string.IsNullOrEmpty(string_8))
{
return false;
}
for (int i = 0; i < string_8.Length; i++)
{
if (!(char.IsLetter(string_8[i]) || char.IsNumber(string_8[i])))
{
return false;
}
}
return true;
}
internal static Class5 Class5_0
{
get
{
return class5_0;
}
set
{
class5_0 = value;
}
}
public static string String_0
{
get
{
return ("Phoenix v3.8.0 (Build " + 0x3722 + ")");
}
}
}
}
Partager le fichier Class4.cs sur le Web et les réseaux sociaux:
Télécharger le fichier Class4.cs