diff --git a/incl_external_flag.php b/incl_external_flag.php index bcd00dd..07237aa 100644 --- a/incl_external_flag.php +++ b/incl_external_flag.php @@ -58,6 +58,11 @@ $proj=$tid2proj_l[$tid]; $pf=realpath(__DIR__."/".$proj["path"]."/handle_external_flag.php"); if(!is_readable($pf)) { + $pf1=realpath(__DIR__."/".$proj["path"]."/automake_attachment.php"); + if(is_readable($pf1)) { + gen_error_404("challange ".$proj["name"]." has been found, but the entry handle_external_flag.php does not exist. However, the entry automake_attachment.php was found. ARE YOU SURE this challenge is EXTERNAL?"); + exit; + } gen_error_500("challange ".$proj["name"]." has been found, but the entry handle_external_flag.php does not exist."); exit; } diff --git a/phplib/libcustomerrorgen.php b/phplib/libcustomerrorgen.php index 07943bc..a8436d7 100644 --- a/phplib/libcustomerrorgen.php +++ b/phplib/libcustomerrorgen.php @@ -2,7 +2,7 @@ function gen_error_400($reason="") { http_response_code(400); - echo "bad request: "; + echo "400 bad request: "; echo $reason; echo "\n"; echo "٩(๑`^´๑)۶你对这个小程序做了什么哇..."; @@ -12,6 +12,7 @@ function gen_error_400($reason="") { function gen_error_404($reason="") { http_response_code(404); + echo "404 resource not found: "; echo $reason; echo "\n"; echo "(⊙.⊙)这...这不对吧..."; @@ -21,6 +22,7 @@ function gen_error_404($reason="") { function gen_error_405($reason="") { http_response_code(405); + echo "405 method not allowed: "; echo $reason; echo "\n"; echo "(/‵Д′)/~ ╧╧你到底在干什么啊"; @@ -30,7 +32,7 @@ function gen_error_405($reason="") { function gen_error_500($reason="") { http_response_code(500); - echo "internal error: "; + echo "500 internal error: "; echo $reason; echo "\n"; echo "(✘Д✘๑ )哇啊!服务器居然出错惹...呜呜...。゚ヽ(゚´Д`)ノ゚。";