Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

PlusEMU - Habboon Edit - PRODUCTION-201601012205-226667486

Status
Not open for further replies.
Newbie Spellweaver
Joined
Sep 7, 2015
Messages
25
Reaction score
15
dude he has a own retro.
Can you tell me why he dont use it ?
He uses Comet, that's why. Which is a Java emulator that was previously leaked by "Johno". If you don't trust his mirror website then don't own a hotel or download from there, simples. Johno owns xHosts.uk, so you say you can't trust him?! When he gets peoples logins and 1000's of requests per day and real money flowing around sooo yeah. Johno is 110% Trustworthy.
 
Junior Spellweaver
Joined
Nov 5, 2013
Messages
147
Reaction score
57
When are you guys going to realize this was never the emulator that was used on Habboon... This is not even close to being as stable as Habboon hotel this emu has so much bugs.
I'm not sure but...
It's the same emulator, same bugs, but some settings differences in habboon's vps and others vps.
 
Experienced Elementalist
Joined
Jun 7, 2012
Messages
288
Reaction score
250
I find it odd that every time you make a database query, you connect to the database. Wouldn't this cause huge latency issues since every query will need to open a connection to the database? I don't also see where you ever disconnect from the database. Wouldn't you essentially flood the database by never closing the connections? Why isn't there a database manager which instantiates one connection to the database? I see this in every emulator out there. I remember a time at work when somebody did the exact same thing and I ended up fixing it by just instantiating it just once. The queries ended up being 300% faster at the end.

nG4AZeG - PlusEMU - Habboon Edit - PRODUCTION-201601012205-226667486 - RaGEZONE Forums

I was just reading this post so thats why I'm replying to a old reply..
But it's not true what you are saying The mysql.data .net adapter handles that for you by pooling.
That is also the reason why you have a min-poolsize and a max-poolsize The min poolsize is the minium connections that are open and the max poolsize is the maximum connections that are open.

The .net adapter holds this connections open untill a timeout so you can query it fast and so you don't have to reconnect all the time. But its nice that you think about something like that because if the mysql.net adapter didnt do that then it would pretty pretty slow.
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Apr 22, 2016
Messages
12
Reaction score
0
Hello :( I have a problem, the ads_background don't work. I put the link in & he don't save the link in memory. Any idea of my problem ? :) Thank you
 
Newbie Spellweaver
Joined
Oct 19, 2010
Messages
58
Reaction score
16
PlusEmu Build Version: PRODUCTION-201601012205-226667486

ads_background is 100% work and saved

is from retroripper.com :D

check your Database :p

 
Newbie Spellweaver
Joined
Apr 22, 2016
Messages
12
Reaction score
0
PlusEmu Build Version: PRODUCTION-201601012205-226667486

ads_background is 100% work and saved

is from retroripper.com :D

check your Database :p


Can you send me the link of your retro ?
Thx
 
Newbie Spellweaver
Joined
Oct 19, 2010
Messages
58
Reaction score
16
PlusEmu version: 3.4.3.0

Horse Saddle saved in bots_petdata.sql dont loaded, reload the Room is Horse Saddle deleted -.-

fixed codes dont work from retroripper.com o_O

here is my Beta Test Hotel -->
 
Joined
Jul 29, 2010
Messages
720
Reaction score
515
Warning!

There is a way to log in on all accounts without password, also there's a way to flood unlimited times in a room. This all is possible with Tanji.

Goodluck with fixing/find out how. :love:

 
Experienced Elementalist
Joined
Jun 7, 2012
Messages
288
Reaction score
250
Warning!

There is a way to log in on all accounts without password, also there's a way to flood unlimited times in a room. This all is possible with Tanji.

Goodluck with fixing/find out how. :love:

Don't belive that you can login to all users without a password because of the limit 1 but its true that you can login to accounts some accounts because the set of the auth_ticket after login.

You can fix that simply by replacing the SSOTICKET EVENT:
Code:
   public class SSOTicketEvent : IPacketEvent
    {
        public void Parse(GameClient Session, ClientPacket Packet)
        {
            string ticket;
            if (Session?.RC4Client == null || Session.GetHabbo() != null || string.IsNullOrEmpty((ticket = Packet.PopString())))
                return;

            Session.TryAuthenticate(ticket);
        }
    }
I don't see anything special by the mute time so I doubt the legitime of this post (It could also be clientside so it looked like he bypassed the flood times)

If your hotel got hacked with this method and you are sure of that just pm me then we look togheter I like mysteries :p
 
Joined
Jul 29, 2010
Messages
720
Reaction score
515
Don't belive that you can login to all users without a password because of the limit 1 but its true that you can login to accounts some accounts because the set of the auth_ticket after login.

You can fix that simply by replacing the SSOTICKET EVENT:
Code:
   public class SSOTicketEvent : IPacketEvent
    {
        public void Parse(GameClient Session, ClientPacket Packet)
        {
            string ticket;
            if (Session?.RC4Client == null || Session.GetHabbo() != null || string.IsNullOrEmpty((ticket = Packet.PopString())))
                return;

            Session.TryAuthenticate(ticket);
        }
    }
I don't see anything special by the mute time so I doubt the legitime of this post (It could also be clientside so it looked like he bypassed the flood times)

If your hotel got hacked with this method and you are sure of that just pm me then we look togheter I like mysteries :p
Nice, but still easy to bypass. I recommend to create a check which check if the connection IP and user IP are the same if not destroy/disconnect the connection.

I also recommend to create a table for the user tickets just like Butterfly emu.
 
Last edited:
Experienced Elementalist
Joined
Jun 7, 2012
Messages
288
Reaction score
250
Nice, but still easy to bypass. I recommend to create a check which check if the connection IP and user IP are the same if not destroy/disconnect the connection.

I also recommend to create a table for the user tickets just like Butterfly emu.

Its not easy to bypass because it is possible to login to users without a authticket because of this qeury after the login:
Code:
                 dbClient.RunQuery("UPDATE `users` SET `online` = '1', `auth_ticket` = '' WHERE `id` = '" + UserId + "' LIMIT 1");
but yeah it is a idea to add a check of the ip is the same but it is not needed
I also don't think you can do much with this bug because it is so random wich user you get.
 
Last edited:
Newbie Spellweaver
Joined
Mar 24, 2016
Messages
6
Reaction score
0
My clients loading to 59% then im getting disconnected any help ?
 
Newbie Spellweaver
Joined
Jan 1, 2016
Messages
25
Reaction score
8
Its not easy to bypass because it is possible to login to users without a authticket because of this qeury after the login:
Code:
                 dbClient.RunQuery("UPDATE `users` SET `online` = '1', `auth_ticket` = '' WHERE `id` = '" + UserId + "' LIMIT 1");
but yeah it is a idea to add a check of the ip is the same but it is not needed
I also don't think you can do much with this bug because it is so random wich user you get.

Wouldn't it be possible to delete the SET auth_ticket = '' too, so that it will never become empty and so the security issue is solved?
 
Newbie Spellweaver
Joined
Sep 10, 2013
Messages
15
Reaction score
0
Thanks for the release only I have some problems with the database can you help me with this?



Thanks in advance!
 
Experienced Elementalist
Joined
Jun 7, 2012
Messages
288
Reaction score
250
Wouldn't it be possible to delete the SET auth_ticket = '' too, so that it will never become empty and so the security issue is solved?
No not really because it is a "bot" protection because it is empty they need to do a new request to get the auth ticket and if you have cloudflare with a browser check is that much harder to do.

But I don't think also that it is really a big exploit because it is pretty random wich account you get.
 
Newbie Spellweaver
Joined
Apr 29, 2014
Messages
89
Reaction score
59
For a better more secure Authenticate you can leave the contents in "SSOTicketEvent.cs" as they are (the check for the empty string wont be needed, but you can keep it if you choose to).

In UserDataFactory.cs look for the function:
Code:
public static UserData GetUserData(string SessionTicket, out byte errorCode)

Change the first query:
Code:
dbClient.SetQuery("SELECT `id`,`username`,`rank`,`motto`,`look`,`gender`,`last_online`,`credits`,`activity_points`,`home_room`,`block_newfriends`,`hide_online`,`hide_inroom`,`vip`,`account_created`,`vip_points`,`machine_id`,`volume`,`chat_preference`,`focus_preference`, `pets_muted`,`bots_muted`,`advertising_report_blocked`,`last_change`,`gotw_points`,`ignore_invites`,`time_muted`,`allow_gifts`,`friend_bar_state`,`disable_forced_effects`,`allow_mimic`,`rank_vip` FROM `users` WHERE `auth_ticket` = @sso LIMIT 1");

To this:
Code:
dbClient.SetQuery(
    "SELECT users.id,users.username,users.rank,users.motto,users.look,users.gender,users.last_online,users.credits,users.activity_points,users.home_room,users.block_newfriends,users.hide_online,users.hide_inroom,users.vip,users.account_created,users.vip_points,users.machine_id,users.volume,users.chat_preference,users.focus_preference,users.pets_muted,users.bots_muted,users.advertising_report_blocked,users.last_change,users.gotw_points,users.ignore_invites,users.time_muted,users.allow_gifts,users.friend_bar_state,users.disable_forced_effects,users.allow_mimic,users.rank_vip " + 
    "FROM users " +
    "JOIN user_auth_ticket " +
    "ON users.id = user_auth_ticket.user_id " +
    "WHERE user_auth_ticket.auth_ticket = @sso " +
    "LIMIT 1"
);

Then further down look for:
Code:
dbClient.RunQuery("UPDATE `users` SET `online` = '1', `auth_ticket` = '' WHERE `id` = '" + UserId + "' LIMIT 1");

and change it to:
Code:
dbClient.RunQuery("UPDATE `users` SET `online` = '1' WHERE `id` = '" + UserId + "' LIMIT 1");
dbClient.RunQuery("DELETE FROM `user_auth_ticket` WHERE `user_id` = '" + UserId + "' LIMIT 1");


Inside PlusEnviroment.cs look for this function:
Code:
public static void PerformShutDown()

Change:
Code:
dbClient.RunQuery("UPDATE `users` SET online = '0', `auth_ticket` = NULL");

To:
Code:
dbClient.RunQuery("TRUNCATE `user_auth_ticket`");
dbClient.RunQuery("UPDATE `users` SET online = '0'");

Finally run this database query:
Code:
-- ----------------------------
-- Table structure for `user_auth_ticket`
-- ----------------------------
DROP TABLE IF EXISTS `user_auth_ticket`;
CREATE TABLE `user_auth_ticket` (
  `user_id` int(11) NOT NULL,
  `auth_ticket` varchar(60) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

This way you'll only be creating a session ticket when the user connects to the hotel and removing it straight after (not setting the ticket to null or empty), thus making it impossible to "randomly" sign in onto other users accounts, unless you manually set the ticket ofc :love:

All you need to do is change how your SSO tickets get created to insert them into that table and you're good to go.

Hopefully this helped.
 
Last edited:
Junior Spellweaver
Joined
Jul 9, 2010
Messages
132
Reaction score
14
If anyone of you plan on using the above thing Damien has so kindly given to us all
go to class.users.php and search for the Create SSO auth_ticket section and replace it all with this
PHP:
final public function createSSO($k)  
 {    
  global $engine; 
  $sessionKey = 'RevCMS-' . rand(9, 9999999).'/'.substr(sha1(time()).'/'.rand(9,9999999).'/'.rand(9,9999999).'/'.rand(9,9999999),0,33);
   
  if($engine->num_rows("SELECT * FROM user_auth_ticket WHERE user_id = '" . $k . "' LIMIT 1") > 0) {
   $engine->query("UPDATE user_auth_ticket SET auth_ticket = '" . $sessionKey . "' WHERE user_id = '" . $k . "'");
  } else {
   $engine->query("INSERT INTO user_auth_ticket (user_id, auth_ticket) VALUES ('" . $k . "', '" . $sessionKey ."')");
  }
  
  return $sessionKey;
  unset($sessionKey);
 }
Then go to your class.core.php and look for the case "client";
and replace it with this
PHP:
$users->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']);
$template->setParams('sso', $users->createSSO($_SESSION['user']['id']));
 
Newbie Spellweaver
Joined
Oct 19, 2013
Messages
36
Reaction score
11
For a better more secure Authenticate you can leave the contents in "SSOTicketEvent.cs" as they are (the check for the empty string wont be needed, but you can keep it if you choose to).

In UserDataFactory.cs look for the function:
Code:
public static UserData GetUserData(string SessionTicket, out byte errorCode)

Change the first query:
Code:
dbClient.SetQuery("SELECT `id`,`username`,`rank`,`motto`,`look`,`gender`,`last_online`,`credits`,`activity_points`,`home_room`,`block_newfriends`,`hide_online`,`hide_inroom`,`vip`,`account_created`,`vip_points`,`machine_id`,`volume`,`chat_preference`,`focus_preference`, `pets_muted`,`bots_muted`,`advertising_report_blocked`,`last_change`,`gotw_points`,`ignore_invites`,`time_muted`,`allow_gifts`,`friend_bar_state`,`disable_forced_effects`,`allow_mimic`,`rank_vip` FROM `users` WHERE `auth_ticket` = @sso LIMIT 1");

To this:
Code:
dbClient.SetQuery(
    "SELECT users.id,users.username,users.rank,users.motto,users.look,users.gender,users.last_online,users.credits,users.activity_points,users.home_room,users.block_newfriends,users.hide_online,users.hide_inroom,users.vip,users.account_created,users.vip_points,users.machine_id,users.volume,users.chat_preference,users.focus_preference,users.pets_muted,users.bots_muted,users.advertising_report_blocked,users.last_change,users.gotw_points,users.ignore_invites,users.time_muted,users.allow_gifts,users.friend_bar_state,users.disable_forced_effects,users.allow_mimic,users.rank_vip " + 
    "FROM users " +
    "JOIN user_auth_ticket " +
    "ON users.id = user_auth_ticket.user_id " +
    "WHERE user_auth_ticket.auth_ticket = @sso " +
    "LIMIT 1"
);

Then further down look for:
Code:
dbClient.RunQuery("UPDATE `users` SET `online` = '1', `auth_ticket` = '' WHERE `id` = '" + UserId + "' LIMIT 1");

and change it to:
Code:
dbClient.RunQuery("UPDATE `users` SET `online` = '1' WHERE `id` = '" + UserId + "' LIMIT 1");
dbClient.RunQuery("DELETE FROM `user_auth_ticket` WHERE `user_id` = '" + UserId + "' LIMIT 1");


Inside PlusEnviroment.cs look for this function:
Code:
public static void PerformShutDown()

Change:
Code:
dbClient.RunQuery("UPDATE `users` SET online = '0', `auth_ticket` = NULL");

To:
Code:
dbClient.RunQuery("TRUNCATE `user_auth_ticket`");
dbClient.RunQuery("UPDATE `users` SET online = '0'");

Finally run this database query:
Code:
-- ----------------------------
-- Table structure for `user_auth_ticket`
-- ----------------------------
DROP TABLE IF EXISTS `user_auth_ticket`;
CREATE TABLE `user_auth_ticket` (
  `user_id` int(11) NOT NULL,
  `auth_ticket` varchar(60) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

This way you'll only be creating a session ticket when the user connects to the hotel and removing it straight after (not setting the ticket to null or empty), thus making it impossible to "randomly" sign in onto other users accounts, unless you manually set the ticket ofc :love:

All you need to do is change how your SSO tickets get created to insert them into that table and you're good to go.

Hopefully this helped.

Awesome and outstanding developer, glad to be hes partner and learn from him!
 
Status
Not open for further replies.
Back
Top