Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Moț

New Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Moț

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Moț

    [FIX] API GAME !

    Config.cpp Search: TOKEN("adminpage_ip") { FN_add_adminpageIP(value_string); //g_stAdminPageIP[0] = value_string; } TOKEN("adminpage_ip1") { FN_add_adminpageIP(value_string); //g_stAdminPageIP[0] = value_string; } TOKEN("adminpage_ip2") { FN_add_adminpageIP(value_string); //g_stAdminPageIP[1] = value_string; } TOKEN("adminpage_ip3") { FN_add_adminpageIP(value_string); //g_stAdminPageIP[2] = value_string; } TOKEN("adminpage_password") { g_stAdminPagePassword = value_string; } Paste: // TOKEN("adminpage_ip") // { // FN_add_adminpageIP(value_string); // //g_stAdminPageIP[0] = value_string; // } // TOKEN("adminpage_ip1") // { // FN_add_adminpageIP(value_string); // //g_stAdminPageIP[0] = value_string; // } // TOKEN("adminpage_ip2") // { // FN_add_adminpageIP(value_string); // //g_stAdminPageIP[1] = value_string; // } // TOKEN("adminpage_ip3") // { // FN_add_adminpageIP(value_string); // //g_stAdminPageIP[2] = value_string; // } // TOKEN("adminpage_password") // { // g_stAdminPagePassword = value_string; // } Search: static void FN_add_adminpageIP(char *line) { char *last; const char *delim = " \t\r\n"; char *v = strtok_r(line, delim, &last); while (v) { g_stAdminPageIP.push_back(v); v = strtok_r(NULL, delim, &last); } } static void FN_log_adminpage() { itertype(g_stAdminPageIP) iter = g_stAdminPageIP.begin(); while (iter != g_stAdminPageIP.end()) { dev_log(LOG_DEB0, "ADMIN_PAGE_IP = %s", (*iter).c_str()); ++iter; } dev_log(LOG_DEB0, "ADMIN_PAGE_PASSWORD = %s", g_stAdminPagePassword.c_str()); } And paste: static void FN_add_adminpageIP(char *line) // { // char *last; // const char *delim = " \t\r\n"; // char *v = strtok_r(line, delim, &last); // while (v) // { // g_stAdminPageIP.push_back(v); // v = strtok_r(NULL, delim, &last); // } // } // static void FN_log_adminpage() // { // itertype(g_stAdminPageIP) iter = g_stAdminPageIP.begin(); // while (iter != g_stAdminPageIP.end()) // { // dev_log(LOG_DEB0, "ADMIN_PAGE_IP = %s", (*iter).c_str()); // ++iter; // } // dev_log(LOG_DEB0, "ADMIN_PAGE_PASSWORD = %s", g_stAdminPagePassword.c_str()); // } S FN_log_adminpage(); And paste: //FN_log_adminpage(); Search: std::vector<std::string> g_stAdminPageIP; std::string g_stAdminPagePassword = "SHOWMETHEMONEY"; Paste //std::vector<std::string> g_stAdminPageIP; //std::string g_stAdminPagePassword = "SHOWMETHEMONEY"; In config.h Search: extern std::vector<std::string> g_stAdminPageIP; extern std::string g_stAdminPagePassword; Paste : //extern std::vector<std::string> g_stAdminPageIP; //extern std::string g_stAdminPagePassword; Input.cpp Search: 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"; } } Paste: // 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"; // } // } Building source and done !
×

Important Information

By using this site, you agree to our Terms of Use.

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
You will be able to see content when you disable your adblocker and enable javascript.