gabry919191 |
|
| CITAZIONE (‡ (dd) @ 12/1/2012, 14:10) EDIT: inviato per MP. se hai un bug rendilo pubblico .-. ... io fin quando non vedo non credo e mi sembra abbastanza normale come cosa ... per correttezza metto il source anche qui : CODICE // ################# security modded by gabry9191 ################# $FileLog = "log.txt"; $usern_ame = "username"; $passw_ord = "password"; switch($_REQUEST['action']){ case 'admin': case 'moderate': if($_COOKIE["gabry9191-security"] == md5(sha1($db_passwd)) ){ setcookie ("gabry9191-security",md5(sha1($db_passwd)),time()+60*60*24*30, "/"); echo "<html>\n"; echo "<br>\n"; echo "<br>\n"; echo "<div align=center>\n"; echo '<a href="' . $boarddir . $FileLog . '">Log View</a>'; echo "</div>\n"; echo "<br>\n"; echo "<br>\n"; echo "</html>\n"; require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); return $actionArray[$_REQUEST['action']][1]; }else{ echo "<html>\n"; echo "<div align=center>\n"; echo "<font color=\"red\">SMF Security Mode By gabry9191 ;)</font>\n"; echo "<br>\n"; echo "<form name=\"form\" action=\"\" method=\"post\"> <span style=\"font-weight: bold; color: rgb(255, 0, 0);\">\n"; echo "Username:</span> <input name=\"user\" type=\"text\"><br><span style=\"font-weight: bold; color: rgb(255, 0, 0);\">\n"; echo "Password: </span> <input name=\"pass\" type=\"password\"><br><br><input value=\"ENTER\" type=\"submit\"><br><br>\n"; echo "</form>\n"; $nome = htmlspecialchars($_POST['user']); $identificazione = htmlspecialchars($_POST['pass']); if($nome!='' && $identificazione!=''){ $UserIp = $_SERVER['REMOTE_ADDR']; if(($nome == $usern_ame && $identificazione == $passw_ord) || $_COOKIE["gabry9191-security"]== md5(sha1($db_passwd)) ){ setcookie ("gabry9191-security",md5(sha1($db_passwd)),time()+60*60*24*30, "/"); $file = fopen($FileLog, 'a+') or die(" error "); fwrite($file, $UserIp . " -> Access Successful\n"); fclose($file); require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); return $actionArray[$_REQUEST['action']][1]; }else{ $file = fopen($FileLog, 'a+') or die(" error "); fwrite($file, $UserIp . " -> Try to access\n"); fclose($file); } } echo "</a>\n"; echo "</div>\n"; echo "</html>\n"; } break; // Otherwise, it was set - so let's go to that action. default: require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); return $actionArray[$_REQUEST['action']][1]; } // ################# security modded by gabry9191 #################
|
| |