Jump to content

Accept shutdown p2p command from


Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You have to become admin to send those commands. If you're using a weak password, everyone can guess that password and access to your server.

  1. Try to use a strong password for adminpage.
  2. Make a log system for those commands in input.cpp.

If that guy send SHUTDOWN_ONLY, you can see a log in log.sql ~ It's called "SHUTDOWN". (It's only make sure about it's coming from p2p or gm commands)

Kind Regards ~ Ken

Do not be sorry, be better.

Link to comment
Share on other sites

ok?

config.cpp

new password

 

std::string    g_stAdminPagePassword = "2eOW2E34f5O4E1";

 

 

input.cpp

       

 //else if (!stBuf.compare("SHOWMETHEMONEY"))

	        else if (stBuf == g_stAdminPagePassword)

	        {

	            if (!IsEmptyAdminPage())

	            {

	                if (!IsAdminPage(inet_ntoa(d->GetAddr().sin_addr)))

	                {

	                    char szTmp[64];

	                    snprintf(szTmp, sizeof(szTmp), "WEBADMIN : Wrong Connector : %s", inet_ntoa(d->GetAddr().sin_addr));

	                    stResult += szTmp;

	                }

	                else

	                {

	                    d->SetAdminMode();

	                    stResult = "UNKNOWN";

	                }

	            }

	            else

	            {

	                d->SetAdminMode();

	                stResult = "UNKNOWN";

	            }

	        }

 
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.