I've found new crypto files. I've tested it -> Working. This code need editing etc.
Crypto.cs
HabboCrypto.csCode:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Packetlogger_Varoke { class HabboEncoders { // New Habbo Encoding by Itachi // Thanks to LittleJ // Called 'charEncode', nice name, no? // Include a easy CryptoClientMessage, enjoy! #region Habbo new Crypto: 'char Encode' by Itachi string Data; int Header; int Lenght; public string[] ExtraDatas; int e1 = 0; int e2 = 0; internal HabboEncoders(string InternalData) { Data = InternalData; string conn = Data.ToString(); conn = conn.Replace("{char0}", Convert.ToChar(0).ToString()); conn = conn.Replace("{char1}", Convert.ToChar(1).ToString()); conn = conn.Replace("{char2}", Convert.ToChar(2).ToString()); conn = conn.Replace("{char13}", Convert.ToChar(13).ToString()); string final = ""; foreach (char C in conn) { string zC = "{char" + (int)C + "}"; final += zC; } final = final.Replace("{char", ""); final = final.Substring(0, final.Length - 1); final = final.Replace("}", ";"); string[] ToSepare = final.Split(';'); int sLenght = HabboCrypto.DecodeBit8(InternalData.Substring(2, 2)); int sHeader = HabboCrypto.DecodeBit8(InternalData.Substring(4, 2)); string Extra = ""; for (int i = 6; i != ToSepare.Length; i++) { string s = Convert.ToChar(int.Parse(ToSepare[i])).ToString(); string Fs = ""; if (ToSepare.Length > i + 1) Fs = Convert.ToChar(int.Parse(ToSepare[i + 1])).ToString(); if (GeneralSystem.IsValidName(s)) { Extra += Convert.ToChar(int.Parse(ToSepare[i])); if (!GeneralSystem.IsValidName(Fs)) Extra += ";"; } else Extra += ToSepare[i] + ";"; } Header = sHeader; Lenght = sLenght; ExtraDatas = Extra.Split(';'); } internal int CharEncode_GetHeader() { return Header; } internal int CharEncode_GetLenght() { return Lenght; } internal string CharEncode_GetNextString() { while (true) { if (ExtraDatas.Length < e1) return null; if (GeneralSystem.IsValidString(ExtraDatas[e1])) return ExtraDatas[e1]; else e1++; } } internal int CharEncode_GetNextInt() { while (true) { if (ExtraDatas.Length < e1) return -1; if (GeneralSystem.IsValidInt(ExtraDatas[e1])) return int.Parse(ExtraDatas[e1]); else e1++; } } } #endregion }
ClientMessage.csCode:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Packetlogger_Varoke { class HabboCrypto { public static string EncodeBit32(string v) { return EncodeBit32(v.Length); } public static string EncodeBit32(int v) // int { string t = ""; t += (char)0; // 4 bytes t += (char)((v >> 24) & 0xFF); // 3 bytes t += (char)((v >> 16) & 0xFF); // 2 bytes t += (char)((v >> 8) & 0xFF); // 1 byte t += (char)((v) & 0xFF); return t; } public static int DecodeBit24(string v) { if ((v[0] | v[1] | v[2] | v[3]) < 0) return -1; return ((v[0] << 24) + (v[1] << 16) + (v[2] << 8) + (v[3] << 0)); } public static int DecodeBit8(string v) { if ((v[0] | v[1]) < 0) return -1; return ((v[0] << 8) + (v[1] << 0)); } } }
System.csCode:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Packetlogger_Varoke { static class HabboEncoding { public static string cypherShort(int v) // str len, packet len, packet header -- b64 { string t = ""; t += (char)((v >> 8) & 0xFF); t += (char)((v >> 0) & 0xFF); return t; } public static string cypherInt(int v) { string t = ""; t += (char)((v >> 24) & 0xFF); t += (char)((v >> 16) & 0xFF); t += (char)((v >> 8) & 0xFF); t += (char)((v >> 0) & 0xFF); return t; } public static int DecodeBit24(string v) { if ((v[0] | v[1] | v[2] | v[3]) < 0) return -1; return ((v[0] << 24) + (v[1] << 16) + (v[2] << 8) + (v[3] << 0)); } public static int DecodeBit8(string v) { if ((v[0] | v[1]) < 0) return -1; return ((v[0] << 8) + (v[1] << 0)); } } public class SClientMessage { public String oString; private String oData; public SClientMessage(string Data) { oString = Data; oData = oString.Substring(6); } public int Lenght() { return HabboEncoding.DecodeBit8(oString.Substring(2, 4)); } public int Header() { return HabboEncoding.DecodeBit8(oString.Substring(4, 6)); } public int GetNextInt() { int result = HabboEncoding.DecodeBit24(oData.Substring(0, 4)); oData = oData.Substring(4); return result; } public String GetNextString() { int len = HabboEncoding.DecodeBit8(oData.Substring(0, 2)); oData = oData.Substring(2); String Result = oData.Substring(0, len); oData = oData.Substring(len); return Result; } } class ClientMessage { public String oString; public String oData; public ClientMessage(string Data) { oData = Data.Substring(4); } public int Header() { int Header = HabboCrypto.DecodeBit8(oData.Substring(0, 2)); oData = oData.Substring(2); return Header; } public bool CanGetNextString() { try { int len = HabboCrypto.DecodeBit8(oData.Substring(0, 2)); if (len > 0) { String Result = oData.Substring(0, len); if (Result != "") return true; else return false; } else return false; } catch { return false; } } public int NewNextInt() { int result = HabboCrypto.DecodeBit24(oData.Substring(1, 4)); return result; } public int GetNextInt() { int result = HabboCrypto.DecodeBit24(oData.Substring(0, 4)); oData = oData.Substring(4); return result; } public String GetNextString() { int len = HabboCrypto.DecodeBit8(oData.Substring(0, 2)); oData = oData.Substring(2); String Result = oData.Substring(0, len); oData = oData.Substring(len); return Result; } } }
Get Packet header Example:Code:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Packetlogger_Varoke { class GeneralSystem { public static bool IsValidString(string inputStr) { if (string.IsNullOrEmpty(inputStr)) { return false; } for (int i = 0; i < inputStr.Length; i++) { string s = inputStr[i].ToString(); if (s == "." || s == "," || s == ";" || s == ":" || s == "<" || s == ">" || s == "@" || s == @"\" || s == "/") { return true; } else if (!(IsLetter(s))) { return false; } } return true; } public static bool IsValidInt(string inputStr) { if (string.IsNullOrEmpty(inputStr)) { return false; } for (int i = 0; i < inputStr.Length; i++) { string s = inputStr[i].ToString(); if (!(char.IsNumber(inputStr[i]))) { return false; } } return true; } public static bool IsValidName(string inputStr) { if (string.IsNullOrEmpty(inputStr)) { return false; } for (int i = 0; i < inputStr.Length; i++) { string s = inputStr[i].ToString(); if (s == "." || s == "," || s == ";" || s == ":" || s == "<" || s == ">" || s == "@" || s == @"\" || s == "/" || s == "#") { return true; } else if (!(IsLetter(s)) && !(char.IsNumber(inputStr[i]))) { return false; } } return true; } public static bool IsLetter(string s) { s = s.ToLower(); if (s == "a" || s == "b" || s == "c" || s == "d" || s == "e" || s == "f" || s == "g" || s == "h" || s == "i" || s == "j" || s == "k" || s == "l" || s == "m" || s == "n" || s == "ñ" || s == "o" || s == "p" || s == "q" || s == "r" || s == "s" || s == "t" || s == "u" || s == "v" || s == "w" || s == "x" || s == "y" || s == "z" || s == "¡" || s == "!" || s == "¿" || s == "?" || s == "á" || s == "é" || s == "í" || s == "ó" || s == "ú" || s == "|" || s == "#" || s == "-" || s == "_" || s == "[" || s == " " || s == "]") return true; else return false; } } }
Code:HabboCrypto.DecodeBit8(PACKETDATAHERE.Substring(4, 6));







