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



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.