How to fix the gold exploit on your server

Posts 1–11 of 11 · Page 1 of 1
How to fix the gold exploit on your server
go to

Server>Credits>Add.cs

replace the WHOLE thing with:

Code:
using System.Collections.Specialized;
using System.Net;
using System.Text;
using System.Web;
using db;
using MySql.Data.MySqlClient;

namespace server.credits
{
    internal class add : IRequestHandler
    {
        public void HandleRequest(HttpListenerContext context)
        {
            string status;
            using (var db = new Database())
            {
                NameValueCollection query = HttpUtility.ParseQueryString(context.Request.Url.Query);

                MySqlCommand cmd = db.CreateQuery();
                cmd.CommandText = "SELECT id FROM accounts WHERE uuid=@uuid";
                cmd.Parameters.AddWithValue("@uuid", query["guid"]);
                object id = cmd.ExecuteScalar();

                if (id != null)
                {
                    try
                    {
                        status = "purchasing gold is disabled";
                    }
                    catch
                    {
                        status = "purchasing gold is disabled";
                    }
                }
                else
                {
                    status = "purchasing gold is disabled";
                }
                db.Dispose();
            }

            byte[] res = Encoding.UTF8.GetBytes(
                @"<html>
    <head>
        <title>Haha</title>
        <script>window.close();</script>
    </head>
    <body style='background: #333333'>
        <h1 style='color: #EEEEEE; text-align: center'>
            " + status + @"
        </h1>
    </body>
</html>");
            context.Response.OutputStream.Write(res, 0, res.Length);
        }
    }
}
Thank you :3 Good tutorial )
Y u do dis
Quote Originally Posted by Black View Post
Y u do dis
what xD //10 chars
Quote Originally Posted by Transferred View Post
what xD //10 chars
he prob didnt want people knowing so he can secretly exploit gold on every current/upcoming server lol
Quote Originally Posted by Riigged View Post
he prob didnt want people knowing so he can secretly exploit gold on every current/upcoming server lol
shhh.

Oh well, it was fun while it lasted.
Quote Originally Posted by Black View Post
shhh.

Oh well, it was fun while it lasted.
there is loads of other exploits you can discover
Quote Originally Posted by Transferred View Post
there is loads of other exploits you can discover
Intriguing. Care to shed some light on said exploits?
Quote Originally Posted by Black View Post
Intriguing. Care to shed some light on said exploits?
if i did that then everyone would use them
and i would have to post tutorial on patching them ;3
Quote Originally Posted by Transferred View Post
if i did that then everyone would use them
and i would have to post tutorial on patching them ;3
Circle of life
You needn't worry about leaks if you PM it to me
nice 10chars, been lookin for a way to do that
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?