Skip to content

Commit

Permalink
Merge pull request #934 from zhblue/poison_robots
Browse files Browse the repository at this point in the history
Poison robots
  • Loading branch information
zhblue authored Apr 17, 2023
2 parents ac3dd07 + aa4605a commit c2673d2
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 8 deletions.
5 changes: 4 additions & 1 deletion trunk/web/lang/cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,7 @@
// sourcecompare.php
$MSG_Source_Compare="源代码对比";
$MSG_BACK="返回上一页";
?>

//email
$MSG_SYS_WARN="系统警告!";
$MSG_IS_ROBOT="疑似机器人,注意封禁!";
4 changes: 3 additions & 1 deletion trunk/web/lang/cnt.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,4 +417,6 @@
// sourcecompare.php
$MSG_Source_Compare ="源代碼對比";
$MSG_BACK ="返回上一頁";
?>
//email
$MSG_SYS_WARN="系統警告!";
$MSG_IS_ROBOT="疑似機器人,註意封禁!";
4 changes: 3 additions & 1 deletion trunk/web/lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,6 @@
// sourcecompare.php
$MSG_Source_Compare="Source Code Comparation";
$MSG_BACK="Return to Last Page";
?>
//email
$MSG_SYS_WARN="System Warning!";
$MSG_IS_ROBOT="could be a robot , verify and disable it !";
4 changes: 3 additions & 1 deletion trunk/web/lang/fa.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,6 @@
// sourcecompare.php
$MSG_Source_Compare="Source Code Comparation";
$MSG_BACK="Return to Last Page";
?>
//email
$MSG_SYS_WARN="System Warning!";
$MSG_IS_ROBOT="could be a robot , verify and disable it !";
4 changes: 3 additions & 1 deletion trunk/web/lang/ko.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,4 +405,6 @@
// sourcecompare.php
$MSG_Source_Compare="Source Code Comparation";
$MSG_BACK="Return to Last Page";
?>
//email
$MSG_SYS_WARN="System Warning!";
$MSG_IS_ROBOT="could be a robot , verify and disable it !";
4 changes: 3 additions & 1 deletion trunk/web/lang/ru.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,4 +417,6 @@
//sourcecompare.php
$MSG_Source_Compare = " сравнение исходного кода ";
$MSG_BACK = " Вернуться на предыдущую страницу ";
?>
//email
$MSG_SYS_WARN="System Warning!";
$MSG_IS_ROBOT="could be a robot , verify and disable it !";
4 changes: 3 additions & 1 deletion trunk/web/lang/th.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,6 @@
// sourcecompare.php
$MSG_Source_Compare="Source Code Comparation";
$MSG_BACK="Return to Last Page";
?>
//email
$MSG_SYS_WARN="System Warning!";
$MSG_IS_ROBOT="could be a robot , verify and disable it !";
4 changes: 3 additions & 1 deletion trunk/web/lang/ug.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,4 +416,6 @@
// sourcecompare.php
$MSG_Source_Compare="Source Code Comparation";
$MSG_BACK="Return to Last Page";
?>
//email
$MSG_SYS_WARN="System Warning!";
$MSG_IS_ROBOT="could be a robot , verify and disable it !";
4 changes: 4 additions & 0 deletions trunk/web/submit.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php session_start();
require_once "include/db_info.inc.php";
require_once "include/my_func.inc.php";
require_once "include/email.class.php";

if(isset($OJ_CSRF) && $OJ_CSRF && $OJ_TEMPLATE=="bs3" && !isset($_SESSION[$OJ_NAME.'_'.'http_judge']))
require_once(dirname(__FILE__)."/include/csrf_check.php");
Expand Down Expand Up @@ -365,6 +366,9 @@
$time=rand(100,2000);
$sql="update solution set memory=?,time=? where solution_id=?";
pdo_query($sql,$memory,$time,$insert_id);
if( $OJ_ADMIN != "root@localhost" ){
email($OJ_ADMIN,$MSG_SYS_WARN,"$DOMAIN $MSG_USER $user_id $MSG_IS_ROBOT");
}
}
/* //prepare system ready for even worse robots
if($count>=$OJ_POISON_BOT_COUNT*2){
Expand Down

0 comments on commit c2673d2

Please sign in to comment.