How to fix the gold exploit on your server
go to
Server>Credits>Add.cs
replace the WHOLE thing with:
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);
}
}
}
)


![=]](/forum/images/emotions/=].gif)
