PlusEMU (Disconnecting client) - Packlogger.

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
Hello Devbesters,

I am using PlusEMU heavily edited by Westy, but it seems the emulator is vulnerable to "Scripters?."
I was on my hotel while some kid came along begging me for staff, I said "No send a staff application. He then responded saying really?, then my client disconnected.

Emulator logs:
Code:
Error en query:
UPDATE users SET look =  @Look, gender =  @gender WHERE id = 531
MySql.Data.MySqlClient.MySqlException (0x80004005): Data truncated for column 'gender' at row 1
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at Database_Manager.Database.Session_Details.QueryAdapter.runQuery() in c:\Users\Administrator\Desktop\Plus Emulator Youngster\Database_Manager\Database\Session_Details\QueryAdapter.cs:line 184


P.S
Does anyone out there know a fix to this problem?, if so may you please help me thank you very much!.

Emulator Info: Wondering why I added myself to Developer list?, I am not trying to steal credits the matter of the fact is, I spent 2 nights adding new commands and cleaning up the emulator. All I need is a fix for this thanks again to anyone willing to help.
39b02de47f297703dbc62763a061de7a.png

Image - May help you guys who wanna help me understand.
cb984b94e78c2d5009dcb24119fff6b8.png
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Hello Devbesters,

I am using PlusEMU heavily edited by Westy, but it seems the emulator is vulnerable to "Scripters?."
I was on my hotel while some kid came along begging me for staff, I said "No send a staff application. He then responded saying really?, then my client disconnected.

Emulator logs:
Code:
Error en query:
UPDATE users SET look =  @Look, gender =  @gender WHERE id = 531
MySql.Data.MySqlClient.MySqlException (0x80004005): Data truncated for column 'gender' at row 1
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at Database_Manager.Database.Session_Details.QueryAdapter.runQuery() in c:\Users\Administrator\Desktop\Plus Emulator Youngster\Database_Manager\Database\Session_Details\QueryAdapter.cs:line 184


P.S
Does anyone out there know a fix to this problem?, if so may you please help me thank you very much!.

Emulator Info: Wondering why I added myself to Developer list?, I am not trying to steal credits the matter of the fact is, I spent 2 nights adding new commands and cleaning up the emulator. All I need is a fix for this thanks again to anyone willing to help.
39b02de47f297703dbc62763a061de7a.png

Image - May help you guys who wanna help me understand.
cb984b94e78c2d5009dcb24119fff6b8.png
Is the ID 531 yours?
 

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
Is the ID 531 yours?
No it's his user ID, he told me he is using a packet logger from Kali Linux or something like that and he mentioned my RS4 that he is cracking it or something.

That's what he told one of my users.
 
Last edited:

Brad

Well-Known Member
Jun 5, 2012
2,320
993
No it's his user ID, he told me he is using a packet logger from Kali Linux or something like that and he mentioned my RS4 that he is cracking it or something.

021aca0490907a5f6983b8731997e064.jpg

64ab7924d4ba18cdd46087349355f454.jpg


That's what he told one of my users.
strange, never happened to me even when running it on a 70+ hotel. I'll take a look into it.
 

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
Try adding this to your client.php
Code:
"hotelview.banner.url" : "{url}/game/gamedata/rs4.php",
Alright I'll try that when I'm home. The skid is still doing it and my users are pissed because they're trying to make a room. But I thought adding that in the client was only for the older R63B version?
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Alright I'll try that when I'm home. The skid is still doing it and my users are pissed because they're trying to make a room. But I thought adding that in the client was only for the older R63B version?
It is but it has something to do with your prime + Generator keys which is both needed for the RSA algorithm, I doubt it will fix it but just try it anyway lol.
I will look more into it though.
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Ok here should be a fix for the figure.
Goto PlusEnvironment and find
Code:
Internal static string FilterFigure(string figure)
Replace it with
Code:
internal static string FilterFigure(string figure)
        {
            return figure.Any(character => !IsValid(character))
                ? "lg-3023-1335.hr-828-45.sh-295-1332.hd-180-4.ea-3168-89.ca-1813-62.ch-235-1332"
                : figure;
        }
Then add this to the bottom of the page
Code:
private static bool IsValid(char c)
        {
            return char.IsLetterOrDigit(c) || allowedSpecialChars.Contains(c);
        }
then add this below
Code:
private static readonly HashSet<char> allowedSpecialChars = new HashSet<char>(new[]
       {
            '-', '.', ' ', 'Ã', '©', '¡', '', 'º', '³', 'Ã', '‰', '_'
        });
 
Also forgot.

goto habbohotel/misc/antimutan.cs and replace it with this.
Code:
using System.Collections.Generic;
using System.Linq;


namespace Plus.HabboHotel.Misc
{
   
    internal class AntiMutant
    {
        
        private readonly Dictionary<string, Dictionary<string, Figure>> _parts;

       
        public AntiMutant()
        {
            _parts = new Dictionary<string, Dictionary<string, Figure>>();
        }

        
        private string GetLookGender(string look)
        {
            var figureParts = look.Split('.');

            foreach (string part in figureParts)
            {
                var tPart = part.Split('-');
                if (tPart.Count() < 2)
                    continue;
                var partName = tPart[0];
                var partId = tPart[1];
                if (partName != "hd")
                    continue;
                return _parts.ContainsKey(partName) && _parts[partName].ContainsKey(partId)
                    ? _parts[partName][partId].Gender
                    : "U";
            }
            return "U";
        }
    }
}

Then create a new cs in the same folder called figure.cs Then add this to it.

Code:
namespace Plus.HabboHotel.Misc
{
  
    internal struct Figure
    {
        
        internal string Part;

        
        internal string PartId;

       
        internal string Gender;

      
        internal string Colorable;

    
        public Figure(string part, string partId, string gender, string colorable)
        {
            Part = part;
            PartId = partId;
            Gender = gender;
            Colorable = colorable;
        }
    }
}
 

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
Ok here should be a fix for the figure.
Goto PlusEnvironment and find
Code:
Internal static string FilterFigure(string figure)
Replace it with
Code:
internal static string FilterFigure(string figure)
        {
            return figure.Any(character => !IsValid(character))
                ? "lg-3023-1335.hr-828-45.sh-295-1332.hd-180-4.ea-3168-89.ca-1813-62.ch-235-1332"
                : figure;
        }
Then add this to the bottom of the page
Code:
private static bool IsValid(char c)
        {
            return char.IsLetterOrDigit(c) || allowedSpecialChars.Contains(c);
        }
then add this below
Code:
private static readonly HashSet<char> allowedSpecialChars = new HashSet<char>(new[]
       {
            '-', '.', ' ', 'Ã', '©', '¡', '', 'º', '³', 'Ã', '‰', '_'
        });
 
Also forgot.

goto habbohotel/misc/antimutan.cs and replace it with this.
Code:
using System.Collections.Generic;
using System.Linq;


namespace Plus.HabboHotel.Misc
{
 
    internal class AntiMutant
    {
      
        private readonly Dictionary<string, Dictionary<string, Figure>> _parts;

     
        public AntiMutant()
        {
            _parts = new Dictionary<string, Dictionary<string, Figure>>();
        }

      
        private string GetLookGender(string look)
        {
            var figureParts = look.Split('.');

            foreach (string part in figureParts)
            {
                var tPart = part.Split('-');
                if (tPart.Count() < 2)
                    continue;
                var partName = tPart[0];
                var partId = tPart[1];
                if (partName != "hd")
                    continue;
                return _parts.ContainsKey(partName) && _parts[partName].ContainsKey(partId)
                    ? _parts[partName][partId].Gender
                    : "U";
            }
            return "U";
        }
    }
}

Then create a new cs in the same folder called figure.cs Then add this to it.

Code:
namespace Plus.HabboHotel.Misc
{

    internal struct Figure
    {
      
        internal string Part;

      
        internal string PartId;

     
        internal string Gender;

    
        internal string Colorable;

  
        public Figure(string part, string partId, string gender, string colorable)
        {
            Part = part;
            PartId = partId;
            Gender = gender;
            Colorable = colorable;
        }
    }
}
I did it but now I get this.
58d387a11e8c6d100306950b8689304d.png


P.S
Could you just give me the .cs files I need since we are using the same emulator it should work then?
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
I did it but now I get this.
58d387a11e8c6d100306950b8689304d.png


P.S
Could you just give me the .cs files I need since we are using the same emulator it should work then?
replace your changeLook() with this
Code:
 internal void ChangeLook()
        {
            string text = this.Request.PopFixedString().ToUpper();
            string text2 = this.Request.PopFixedString();
            text2 = PlusEnvironment.FilterFigure(text2);
            text2 = PlusEnvironment.FilterInjectionChars(text2);


         

            PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(this.Session, QuestType.PROFILE_CHANGE_LOOK, 0u);
            Session.GetHabbo().Look = text2;
            Session.GetHabbo().Gender = text.ToLower();
            this.Session.GetHabbo().Gender = text.ToLower();


            using (IQueryAdapter queryreactor = PlusEnvironment.GetDatabaseManager().getQueryreactor())
            {
                queryreactor.setQuery("UPDATE users SET look =  @Look, gender =  @gender WHERE id = " + this.Session.GetHabbo().Id);
                queryreactor.addParameter("look", text2);
                queryreactor.addParameter("gender", text);
                queryreactor.runQuery();
            }
            PlusEnvironment.GetGame().GetAchievementManager().ProgressUserAchievement(this.Session, "ACH_AvatarLooks", 1, false);
            if (this.Session.GetHabbo().Look.Contains("ha-1006"))
            {
                PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(this.Session, QuestType.WEAR_HAT, 0u);
            }
            this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateAvatarAspectMessageComposer);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Look);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Gender.ToUpper());
            this.Session.GetMessageHandler().SendResponse();
            this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserDataMessageComposer);
            this.Session.GetMessageHandler().GetResponse().AppendInt32(-1);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Look);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Gender.ToLower());
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Motto);
            this.Session.GetMessageHandler().GetResponse().AppendInt32(this.Session.GetHabbo().AchievementPoints);
            this.Session.GetMessageHandler().SendResponse();
            if (this.Session.GetHabbo().InRoom)
            {
                Room currentRoom = this.Session.GetHabbo().CurrentRoom;
                if (currentRoom == null)
                {
                    return;
                }
                RoomUser roomUserByHabbo = currentRoom.GetRoomUserManager().GetRoomUserByHabbo(this.Session.GetHabbo().Id);
                if (roomUserByHabbo == null)
                {
                    return;
                }
                ServerMessage serverMessage = new ServerMessage(Outgoing.UpdateUserDataMessageComposer);
                serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
                serverMessage.AppendString(this.Session.GetHabbo().Look);
                serverMessage.AppendString(this.Session.GetHabbo().Gender.ToLower());
                serverMessage.AppendString(this.Session.GetHabbo().Motto);
                serverMessage.AppendInt32(this.Session.GetHabbo().AchievementPoints);
                currentRoom.SendMessage(serverMessage);
            }
        }
 

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
replace your changeLook() with this
Code:
 internal void ChangeLook()
        {
            string text = this.Request.PopFixedString().ToUpper();
            string text2 = this.Request.PopFixedString();
            text2 = PlusEnvironment.FilterFigure(text2);
            text2 = PlusEnvironment.FilterInjectionChars(text2);


        

            PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(this.Session, QuestType.PROFILE_CHANGE_LOOK, 0u);
            Session.GetHabbo().Look = text2;
            Session.GetHabbo().Gender = text.ToLower();
            this.Session.GetHabbo().Gender = text.ToLower();


            using (IQueryAdapter queryreactor = PlusEnvironment.GetDatabaseManager().getQueryreactor())
            {
                queryreactor.setQuery("UPDATE users SET look =  @Look, gender =  @gender WHERE id = " + this.Session.GetHabbo().Id);
                queryreactor.addParameter("look", text2);
                queryreactor.addParameter("gender", text);
                queryreactor.runQuery();
            }
            PlusEnvironment.GetGame().GetAchievementManager().ProgressUserAchievement(this.Session, "ACH_AvatarLooks", 1, false);
            if (this.Session.GetHabbo().Look.Contains("ha-1006"))
            {
                PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(this.Session, QuestType.WEAR_HAT, 0u);
            }
            this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateAvatarAspectMessageComposer);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Look);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Gender.ToUpper());
            this.Session.GetMessageHandler().SendResponse();
            this.Session.GetMessageHandler().GetResponse().Init(Outgoing.UpdateUserDataMessageComposer);
            this.Session.GetMessageHandler().GetResponse().AppendInt32(-1);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Look);
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Gender.ToLower());
            this.Session.GetMessageHandler().GetResponse().AppendString(this.Session.GetHabbo().Motto);
            this.Session.GetMessageHandler().GetResponse().AppendInt32(this.Session.GetHabbo().AchievementPoints);
            this.Session.GetMessageHandler().SendResponse();
            if (this.Session.GetHabbo().InRoom)
            {
                Room currentRoom = this.Session.GetHabbo().CurrentRoom;
                if (currentRoom == null)
                {
                    return;
                }
                RoomUser roomUserByHabbo = currentRoom.GetRoomUserManager().GetRoomUserByHabbo(this.Session.GetHabbo().Id);
                if (roomUserByHabbo == null)
                {
                    return;
                }
                ServerMessage serverMessage = new ServerMessage(Outgoing.UpdateUserDataMessageComposer);
                serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
                serverMessage.AppendString(this.Session.GetHabbo().Look);
                serverMessage.AppendString(this.Session.GetHabbo().Gender.ToLower());
                serverMessage.AppendString(this.Session.GetHabbo().Motto);
                serverMessage.AppendInt32(this.Session.GetHabbo().AchievementPoints);
                currentRoom.SendMessage(serverMessage);
            }
        }
Alright that fixed the Changelooks, Thanks. Now the only thing I have left is this:
1f2b2f473bb59601654f1ff50810cbc6.png

4abc79ded75fee04593d60c120be9aac.png

 
Jut use silverwave man Plus R2 FOR LIFE BABY
I'm good, Westy edit is good!, just need to fix it. So I can keep editing.
 

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
Xens emu is good but how is it good if kids are scripting u guys
I see what you're saying but sometimes you have to find a fix instead of ditching something you've put time into and other people have.
 
also add using System.Linq; to the top of PlusEnvironment.cs
Ok it worked, but now when I load the client it doesn't connect it shows 1 user online. and logs a error.
Code:
Bug during user login: System.NotImplementedException: The method or operation is not implemented.
   at Plus.HabboHotel.Misc.AntiMutant.RunLook(String p) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Misc\AntiMutant.cs:line 43
   at Plus.HabboHotel.Users.Habbo..ctor(UInt32 Id, String Username, String RealName, UInt32 Rank, String Motto, String Look, String Gender, Int32 Credits, Int32 ActivityPoints, Double LastActivityPointsUpdate, Boolean Muted, UInt32 HomeRoom, Int32 Respect, Int32 DailyRespectPoints, Int32 DailyPetRespectPoints, Boolean HasFriendRequestsDisabled, UInt32 currentQuestID, Int32 currentQuestProgress, Int32 achievementPoints, Int32 RegTimestamp, Int32 LastOnline, Boolean AppearOffline, Boolean HideInRoom, Boolean VIP, Double CreateDate, Boolean Online, String Citizenship, Int32 BelCredits, HashSet`1 Groups, UInt32 FavId, Int32 LastChange, Boolean TradeLocked, Int32 TradeLockExpire, Boolean NUXPassed, Boolean NewUser, Boolean DevMode, Int32 SeaShells) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Users\Habbo.cs:line 231
   at Plus.HabboHotel.Users.Authenticator.HabboFactory.GenerateHabbo(DataRow dRow, DataRow mRow, HashSet`1 group) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Users\Authenticator\HabboFactory.cs:line 52
   at Plus.HabboHotel.Users.UserDataManagement.UserDataFactory.GetUserData(String sessionTicket, String ip, Byte& errorCode) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Users\UserDataManagement\UserDataFactory.cs:line 348
   at Plus.HabboHotel.GameClients.GameClient.tryLogin(String AuthTicket) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\GameClients\GameClient.cs:line 160
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
I see what you're saying but sometimes you have to find a fix instead of ditching something you've put time into and other people have.
 

Ok it worked, but now when I load the client it doesn't connect it shows 1 user online. and logs a error.
Code:
Bug during user login: System.NotImplementedException: The method or operation is not implemented.
   at Plus.HabboHotel.Misc.AntiMutant.RunLook(String p) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Misc\AntiMutant.cs:line 43
   at Plus.HabboHotel.Users.Habbo..ctor(UInt32 Id, String Username, String RealName, UInt32 Rank, String Motto, String Look, String Gender, Int32 Credits, Int32 ActivityPoints, Double LastActivityPointsUpdate, Boolean Muted, UInt32 HomeRoom, Int32 Respect, Int32 DailyRespectPoints, Int32 DailyPetRespectPoints, Boolean HasFriendRequestsDisabled, UInt32 currentQuestID, Int32 currentQuestProgress, Int32 achievementPoints, Int32 RegTimestamp, Int32 LastOnline, Boolean AppearOffline, Boolean HideInRoom, Boolean VIP, Double CreateDate, Boolean Online, String Citizenship, Int32 BelCredits, HashSet`1 Groups, UInt32 FavId, Int32 LastChange, Boolean TradeLocked, Int32 TradeLockExpire, Boolean NUXPassed, Boolean NewUser, Boolean DevMode, Int32 SeaShells) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Users\Habbo.cs:line 231
   at Plus.HabboHotel.Users.Authenticator.HabboFactory.GenerateHabbo(DataRow dRow, DataRow mRow, HashSet`1 group) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Users\Authenticator\HabboFactory.cs:line 52
   at Plus.HabboHotel.Users.UserDataManagement.UserDataFactory.GetUserData(String sessionTicket, String ip, Byte& errorCode) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\Users\UserDataManagement\UserDataFactory.cs:line 348
   at Plus.HabboHotel.GameClients.GameClient.tryLogin(String AuthTicket) in c:\Users\Venom\Desktop\Plus Emulator Youngster\HabboHotel\GameClients\GameClient.cs:line 160
undo the antimutant and the Changelook()
 

Users who are viewing this thread

Top