Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Sir rafa95123,
strikes again with amazing fix's.
Keep these coming buddy
and you will earn yourself a Popsicle.
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Your code for chatlogs not save the PM and whisper...
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by
Sefyu41
Your code for chatlogs not save the PM and whisper...
He said that the code is incomplete, is the part 1 .. he don't send the rest, wait a bit.. :D
Sorry my English, u.u
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 30/07]
Quote:
Originally Posted by
Marlon Colhado
To fix SQL Injection in Navigator, I think it's more or less this:
In Navigator.cs search:
internal ServerMessage SerializeSearchResults(string SearchQuery)
And replace all this, by:
[C]internal ServerMessage SerializeSearchResults(string SearchQuery)
{
string ProtectedSearch = ButterflyEnvironment.FilterInjectionChars(SearchQuery);
DataTable table = new DataTable();
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
if (SearchQuery.Length > 0)
{
if (SearchQuery.StartsWith("owner:"))
{
adapter.setQuery("SELECT * FROM rooms WHERE owner LIKE '" + ProtectedSearch.Replace("owner:", "") + "' ORDER BY id DESC LIMIT 50");
}
else if (adapter.dbType == DatabaseType.MySQL)
{
adapter.setQuery("SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE owner = @query AND roomtype = 'private' UNION ALL SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE caption = @query AND roomtype = 'private' ORDER BY active_users DESC LIMIT 50");
}
else
{
adapter.setQuery("SELECT TOP 50 rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE owner = @query AND roomtype = 'private' UNION ALL SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE caption = @query AND roomtype = 'private' ORDER BY active_users DESC");
}
adapter.addParameter("query", ProtectedSearch);
table = adapter.getTable();
}
}
List<RoomData> list = new List<RoomData>();
if (table != null)
{
foreach (DataRow row in table.Rows)
{
RoomData item = ButterflyEnvironment.GetGame().GetRoomManager().FetchRoomData(Convert.ToUInt32(row["id"]), row);
list.Add(item);
}
}
ServerMessage message = new ServerMessage(Outgoing.NavigatorPacket);
message.AppendInt32(8);
message.AppendString(SearchQuery);
message.AppendInt32(list.Count);
foreach (RoomData data2 in list)
{
data2.Serialize(message, false);
}
message.AppendBoolean(false);
return message;
}[/PHP]
I think this prevents the use of SQL Injection, no?
:D
You have forgotten 2 } in your code ^^, I have edited it:
Code:
internal ServerMessage SerializeSearchResults(string SearchQuery)
{
string ProtectedSearch = ButterflyEnvironment.FilterInjectionChars(SearchQuery);
DataTable table = new DataTable();
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
if (SearchQuery.Length > 0)
{
if (SearchQuery.StartsWith("owner:"))
{
adapter.setQuery("SELECT * FROM rooms WHERE owner LIKE '" + ProtectedSearch.Replace("owner:", "") + "' ORDER BY id DESC LIMIT 50");
}
else if (adapter.dbType == DatabaseType.MySQL)
{
adapter.setQuery("SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE owner = @query AND roomtype = 'private' UNION ALL SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE caption = @query AND roomtype = 'private' ORDER BY active_users DESC LIMIT 50");
}
else
{
adapter.setQuery("SELECT TOP 50 rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE owner = @query AND roomtype = 'private' UNION ALL SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE caption = @query AND roomtype = 'private' ORDER BY active_users DESC");
}
adapter.addParameter("query", ProtectedSearch);
table = adapter.getTable();
}
}
List<RoomData> list = new List<RoomData>();
if (table != null)
{
foreach (DataRow row in table.Rows)
{
RoomData item = ButterflyEnvironment.GetGame().GetRoomManager().FetchRoomData(Convert.ToUInt32(row["id"]), row);
list.Add(item);
}
}
ServerMessage message = new ServerMessage(Outgoing.NavigatorPacket);
message.AppendInt32(8);
message.AppendString(SearchQuery);
message.AppendInt32(list.Count);
foreach (RoomData data2 in list)
{
data2.Serialize(message, false);
}
message.AppendBoolean(false);
return message;
}
}
}
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Well people, I decided to make a "Hotel", to show the progress of my work "LIVE"..
So... It's a simple Hotel, if you want to see the fix's and the progress of my work, acess:
Hebbo Hotel - Project 2.0
If you want help me in the project with fix's or whatever.. Contact me in Skype: helpiiii or helpi95@live.com
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 30/07]
Quote:
Originally Posted by
Innorman
You have forgotten 2 } in your code ^^, I have edited it:
Code:
internal ServerMessage SerializeSearchResults(string SearchQuery)
{
string ProtectedSearch = ButterflyEnvironment.FilterInjectionChars(SearchQuery);
DataTable table = new DataTable();
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
if (SearchQuery.Length > 0)
{
if (SearchQuery.StartsWith("owner:"))
{
adapter.setQuery("SELECT * FROM rooms WHERE owner LIKE '" + ProtectedSearch.Replace("owner:", "") + "' ORDER BY id DESC LIMIT 50");
}
else if (adapter.dbType == DatabaseType.MySQL)
{
adapter.setQuery("SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE owner = @query AND roomtype = 'private' UNION ALL SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE caption = @query AND roomtype = 'private' ORDER BY active_users DESC LIMIT 50");
}
else
{
adapter.setQuery("SELECT TOP 50 rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE owner = @query AND roomtype = 'private' UNION ALL SELECT rooms.*, room_active.active_users FROM rooms LEFT JOIN room_active ON (room_active.roomid = rooms.id) WHERE caption = @query AND roomtype = 'private' ORDER BY active_users DESC");
}
adapter.addParameter("query", ProtectedSearch);
table = adapter.getTable();
}
}
List<RoomData> list = new List<RoomData>();
if (table != null)
{
foreach (DataRow row in table.Rows)
{
RoomData item = ButterflyEnvironment.GetGame().GetRoomManager().FetchRoomData(Convert.ToUInt32(row["id"]), row);
list.Add(item);
}
}
ServerMessage message = new ServerMessage(Outgoing.NavigatorPacket);
message.AppendInt32(8);
message.AppendString(SearchQuery);
message.AppendInt32(list.Count);
foreach (RoomData data2 in list)
{
data2.Serialize(message, false);
}
message.AppendBoolean(false);
return message;
}
}
}
Well, thank you for correcting the code.
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by
rafa95123
Hello
Rage!
I'm creating this thread to help some people to fix's basics bug's in Swift Emulator... Well if you want put one fix here, just post in this thread and i'll put in the main thread :D
Let's begin the fix's!
#1# Command :givecrystal
Well it's simple.. He don't give the crystals and don't update the purse of crystals...
--------------------------------------------------------------------------------------
#2# Command :refreshnavigator
Well many people wish this command, and here it is :)
#3# RelationShip...
#4# Horse Fix
Well.. Here a improving of "
Filter Words"... Put this and you will not have problems with filter!
#5# FilterWord
Well people need of chatlog i'll post the 1° part of it... I have not finished the code of chatlog on modtools.. but you will see this with your cms until i post the 2° part!
#6# Chatlog (Not Finished) 1° Part
Well people, I decided to make a "
Hotel", to show the progress of my work "
LIVE"..
So... It's a simple Hotel, if you want to see the fix's and the progress of my work, acess:
Hebbo Hotel - Project 2.0
Obs: If you have fixed the modtools share with us.. Remember I am new in Projects of "
C#" so don't push me, i'll make my best for bring the bests fix's for everyone :x
IF HAVE ANY PROBLEM, QUESTION, OR OTHER THING POST HERE:
Habbo Help - Habbo Development - RaGEZONE forums
ANY PROBLEM POSTED HERE WILL NOT BE ANSWERED!
I'll post more things when i fix... If you want more help.. Add: helpiiii or
helpi95@live.com
Like if you like ! :p
Yah !
fix game center please thanks working Fast Food :)
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by
MichaeelS
fix game center please thanks working Fast Food :)
To fix the Fast Food, I would need to run another emulator specifically for the game, had a version that had this system .. if someone is If anyone has it, give me .. for thus it is easier, having a base.
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
REPORTING BUGS LIST ----
#1 If you buy a bot, place it in a room, then reload the client it goes back to your inventory and you get another bot free. Could just be me not sure.
#2 Horses (Not sure if all animals) when placed in a room, if you then reload the client will appear back in your inventory.
#3 Group rugs does not save items when place on top of it. IE If you place a chair on it, then reload the room it will be in a different spot.
#4 If I apply the fix for your "Room added to staff pick" 1. Rooms do not load correctly, even if I delete all rooms from the db and what not. (Tbe the character does not load and it throws errors) And everytime you load a room it says "Room added to staff picks" And you can't edit the room, ie place furni, edit room settings...
#5 Group management will not show up for a official group home room unless the emulator is restarted. (might be if the person logs out and back in, but positive it's when you restart the server.)
Other then that I am still looking deeply for bugs, messing around with wired and noticed it doesn't work properly with group furni ex; if you teleport to a group furni chair you won't be sitting you will be standing.. Don't know if this records errors, if it does I'll update my post with it. SO PLEASE NOTE I AM NOT ASKING FOR HELP, I AM STATING SOME MAJOR BUGS I HAVE FOUND.
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Important fix:
1)The new WIRED furni ( i know it s hard)
2)Football
3) this wired 100%
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Haha , I wanna thank you for the list.. this help me very much to indentify the bugs...
So, I'll try my best to bring these fixs for you guys :)
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
You should continue what AKllX did
Even though, this thread is very helpful and you should carry on
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Quote:
Originally Posted by
rafa95123
Haha , I wanna thank you for the list.. this help me very much to indentify the bugs...
So, I'll try my best to bring these fixs for you guys :)
No problems, I'll update my post if I find anymore bugs. Agreed with Otto you might need to have a look at wired, seems to be a bit glitchy.
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
Does anyone have a fix for fixing the categories on Mod action?
Re: [SwiftEmu] Fix's for NewCrypto! [UPDATED 01/08]
The profiles doesn't work and the groups are not 100% fixed , they have not the badge and the color of the furni is not the real , but always grey and purple.