From 5fe24621932711ee2150197399a92fffcabd0323 Mon Sep 17 00:00:00 2001 From: Maverick Motherfucker Date: Thu, 2 Jun 2011 23:16:35 -0700 Subject: [PATCH 1/7] Fixed exploit where cheaters can send chat as other people --- TShockAPI/TShock.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 1dac0977..85630089 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -212,6 +212,19 @@ namespace TShockAPI Tools.HandleCheater(ply); } } + else if (e.MsgID == 0x19) + { + byte ply; + using (var br = new BinaryReader(new MemoryStream(e.Msg.readBuffer, e.Index, e.Length))) + { + ply = br.ReadByte(); + } + if (e.Msg.whoAmI != ply) + { + //fuck you faggot + Tools.HandleCheater(ply); + } + } } void OnGreetPlayer(int who, HandledEventArgs e) From 6726c497a9b26830c56a56d7191b9cde4f63c657 Mon Sep 17 00:00:00 2001 From: Maverick Motherfucker Date: Thu, 2 Jun 2011 23:19:24 -0700 Subject: [PATCH 2/7] Dont fucking remove that --- TShockAPI/TShockAPI.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TShockAPI/TShockAPI.csproj b/TShockAPI/TShockAPI.csproj index 11aebcc5..d9987db5 100644 --- a/TShockAPI/TShockAPI.csproj +++ b/TShockAPI/TShockAPI.csproj @@ -69,8 +69,7 @@ - - + $(SolutionDir)\myass.bat