Full Firewind source

Status
Not open for further replies.
everest - Full Firewind source - RaGEZONE Forums
 
Last edited:
I were just playing around and found this little command. But there's something that makes us not get it.
It's check if something is "IsHabin" (?). Well play with it :D :

if (FirewindEnvironment.IsHabin) {
bool result;
using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor())
{
dbClient.setQuery("SELECT id FROM users WHERE (hpo = '1' OR hpo = '1' OR hds = '1' OR hmg = '1' OR hmb = '1') AND username = @name");
dbClient.addParameter("name", Session.GetHabbo().Username);
result = dbClient.findsResult();
string command = parsedCommand[0].Substring(1);
// **** this command system, we make our own!
switch (command)
{
case "relationship":
if (!result)
{
Session.SendMOTD("Du må være medlem av Mafia eller Police for å ha kommandoene til forhold.");
break;
}
dbClient.setQuery("SELECT sender_id FROM users_relationships WHERE (recipent_id = @myid OR sender_id = @myid) AND accepted = '0'");
dbClient.addParameter("myid", Session.GetHabbo().Id);
if (dbClient.findsResult())
{
Session.SendMOTD("Du har allerede spurt om et forhold med denne personen, vennligst vent på et svar.");
return;
}
dbClient.setQuery("SELECT id FROM users WHERE username = @name");
dbClient.addParameter("name", parsedCommand[1]);
int id = dbClient.getInteger();


dbClient.setQuery("INSERT IGNORE INTO users_relationships(sender_id,recipent_id) VALUES(@myid,@hisid)");
dbClient.addParameter("myid", Session.GetHabbo().Id);
dbClient.addParameter("hisid", id);
dbClient.runQuery();


Session.SendMOTD("Du har sendt en forespørsel til " + parsedCommand[1]);
return;


case "mystatus":
if (!result)
{
Session.SendMOTD("Du må være medlem av Mafia eller Police for å ha kommandoene til forhold.");
break;
}
if (false)
{
Session.SendMOTD("Du er i et forhold med {0}, vil du avslutte forholdet skriv :remove {0}");
return;
}
StringBuilder statusMessage = new StringBuilder();
statusMessage.AppendLine("Du har følgende forespørsler:");
dbClient.setQuery("SELECT sender_id FROM users_relationships WHERE accepted = '0' AND recipent_id = @myid LIMIT 6");
dbClient.addParameter("myid", Session.GetHabbo().Id);
DataTable table = dbClient.getTable();
foreach (DataRow row in table.Rows)
{
statusMessage.AppendLine(FirewindEnvironment.getHabboForId(Convert.ToUInt32(row[0])).Username);
}
statusMessage.AppendLine("Du kan maks ha 6 forespørsler på en gang.");
statusMessage.AppendLine("Skriv :accept navn for å akseptere en forespørsel.");
Session.SendMOTD(statusMessage.ToString());
return;


case "accept":
if (!result)
{
Session.SendMOTD("Du må være medlem av Mafia eller Police for å ha kommandoene til forhold.");
break;
}
dbClient.setQuery("SELECT sender_id FROM users_relationships WHERE (recipent_id = @myid OR sender_id = @myid) AND accepted = '1'");
dbClient.addParameter("myid", Session.GetHabbo().Id);
if (dbClient.findsResult())
{
Session.SendMOTD("Du er allerede i et forhold!");
return;
}
dbClient.setQuery("UPDATE users_relationships SET accepted = '1' WHERE sender_id = @sid AND recipent_id = @myid LIMIT 1");
dbClient.addParameter("myid", Session.GetHabbo().Id);
dbClient.addParameter("sid", FirewindEnvironment.getHabboForName(parsedCommand[1]).Id);
dbClient.runQuery();
Session.SendMOTD("Du er nå i et forhold med " + parsedCommand[1]);
return;


case "decline":
if (!result)
{
Session.SendMOTD("Du må være medlem av Mafia eller Police for å ha kommandoene til forhold.");
break;
}
dbClient.setQuery("DELETE FROM users_relationships WHERE sender_id = @sid AND recipent_id = @myid AND accepted = '0' LIMIT 1");
dbClient.addParameter("myid", Session.GetHabbo().Id);
dbClient.addParameter("sid", FirewindEnvironment.getHabboForName(parsedCommand[1]).Id);
dbClient.runQuery();
Session.SendMOTD("Du har avslått " + parsedCommand[1]);
return;


case "declineall":
if (!result)
{
Session.SendMOTD("Du må være medlem av Mafia eller Police for å ha kommandoene til forhold.");
break;
}
dbClient.setQuery("DELETE FROM users_relationships WHERE recipent_id = @myid AND accepted = '0' LIMIT 1");
dbClient.addParameter("myid", Session.GetHabbo().Id);
dbClient.runQuery();
Session.SendMOTD("Du har avslått alle.");
return;


case "status":
uint userID = FirewindEnvironment.getHabboForName(parsedCommand[1]).Id;
dbClient.setQuery("SELECT sender_id,recipent_id FROM users_relationships WHERE (recipent_id = @userid OR sender_id = @userid) AND accepted = '1' LIMIT 1");
dbClient.addParameter("userid", userID);
DataRow resultRow = dbClient.getRow();


if (resultRow == null)
Session.SendMOTD(parsedCommand[1] + " er singel.");
else
{
bool isSender = Convert.ToUInt32(resultRow[0]) == userID;
Session.SendMOTD(parsedCommand[1] + " er i et forhold med " + (isSender ? FirewindEnvironment.getHabboForId(Convert.ToUInt32(resultRow[1])).Username : FirewindEnvironment.getHabboForId(Convert.ToUInt32(resultRow[0])).Username));
}
return;


case "removerelationship":
if (!result)
{
Session.SendMOTD("Du må være medlem av Mafia eller Police for å ha kommandoene til forhold.");
break;
}
dbClient.setQuery("DELETE FROM users_relationships WHERE accepted = '1' AND (recipent_id = @myid OR sender_id = @myid) LIMIT 1");
dbClient.addParameter("myid", Session.GetHabbo().Id);
dbClient.runQuery();
Session.SendMOTD("Du er ikke lenger i noen forhold.");
return;
}
}
}
}
Really awesome if someone could get it in the commands. its some role play commands i guess.
 
I were just playing around and found this little command. But there's something that makes us not get it.
It's check if something is "IsHabin" (?). Well play with it :D :

Really awesome if someone could get it in the commands. its some role play commands i guess.

Yep its some simple role play commands. It was developed in hope for people to buy police rank at the pilot hotel, but it kinda failed.
 
I were just playing around and found this little command. But there's something that makes us not get it.
It's check if something is "IsHabin" (?). Well play with it :D :

Really awesome if someone could get it in the commands. its some role play commands i guess.
Where did you find it?
 
A commit has been pushed by Awa:

Does this look suspicious to anyone? Go back a few weeks and you will find a comment stating it is a backdoor, it's pretty obvious anyways.

Code:
        public byte[] GetBytes()
        {
            List<byte> Final = new List<byte>();
            Final.AddRange(BitConverter.GetBytes(Message.Count)); // packet len
            Final.Reverse();
            Final.AddRange(Message); // Add Packet

            if (Message.Count > 131072) // this will crash the client!
            {
                Logging.LogDebug(string.Format("Message was too long, ID: {0} and length is {1}", MessageId, Message.Count));
            }
            if (Message.Count < 2) // this will crash the client!
            {
                Logging.LogDebug(string.Format("Message was too short, ID: {0} and length is {1}", MessageId, Message.Count));
            }
            return Final.ToArray();
        }



:closedeyes:

It appears I made a mistake, It's safe.
 
Last edited:
A commit has been pushed by Awa:

Does this look suspicious to anyone?

Code:
        public byte[] GetBytes()
        {
            List<byte> Final = new List<byte>();
            Final.AddRange(BitConverter.GetBytes(Message.Count)); // packet len
            Final.Reverse();
            Final.AddRange(Message); // Add Packet

            if (Message.Count > 131072) // this will crash the client!
            {
                Logging.LogDebug(string.Format("Message was too long, ID: {0} and length is {1}", MessageId, Message.Count));
            }
            if (Message.Count < 2) // this will crash the client!
            {
                Logging.LogDebug(string.Format("Message was too short, ID: {0} and length is {1}", MessageId, Message.Count));
            }
            return Final.ToArray();
        }



:closedeyes:
At least somebody who understands <3

Bai ~~
 
A commit has been pushed by Awa:

Does this look suspicious to anyone? Go back a few weeks and you will find a comment stating it is a backdoor, it's pretty obvious anyways.

Code:
        public byte[] GetBytes()
        {
            List<byte> Final = new List<byte>();
            Final.AddRange(BitConverter.GetBytes(Message.Count)); // packet len
            Final.Reverse();
            Final.AddRange(Message); // Add Packet

            if (Message.Count > 131072) // this will crash the client!
            {
                Logging.LogDebug(string.Format("Message was too long, ID: {0} and length is {1}", MessageId, Message.Count));
            }
            if (Message.Count < 2) // this will crash the client!
            {
                Logging.LogDebug(string.Format("Message was too short, ID: {0} and length is {1}", MessageId, Message.Count));
            }
            return Final.ToArray();
        }



:closedeyes:

Nice find. :)


Edit:
If you wan't the habin commands it's pretty simple. Go to users and add a column named hpo. :)
 
Original of the first post.. Another mirror to keep the emulator alive.. This has a 1 Gb/s connection from the Amsterdam - including... Dark Fiber..

 
I don't see how the snippet by AWA could be harmful. Of course if it lacks the full length prefix at the start it won't parse correctly and vise-versa if the packet is too big.

But it shouldn't crash, otherwise that's just **** error handling. I don't see how it should crash anyway by looking at the source. :laugh:
 
Status
Not open for further replies.
Back