AWD平台搭建-解决flag重复提交刷分问题
作者:互联网
AWD平台搭建-解决flag重复提交刷分问题
只需在flag_server下的flag_file.php的check_time函数中添加一小段代码,添加的位置如下:
function check_time($attack_uid,$victim_uid){
global $time_file;
global $min_time_span;
global $now_time;
global $team_number;
$old_times = explode('|' , file_get_contents($time_file));
$id = $attack_uid * $team_number + $victim_uid;
添加的代码
if(old_times[$id]==0){
update_time($attack_uid,$victim_uid);
return True;
}
添加的代码
if ($now_time - $old_times[$id] < $min_time_span){
die("error: submit too quick ". ($min_time_span + $old_times[$id] - $now_time). " seconds left");
}else{
return True;
}
}
标签:刷分,old,uid,global,times,flag,file,time,AWD 来源: https://blog.csdn.net/fzu_huyk/article/details/121016921