mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-03-26 22:41:44 +01:00
re-enable cf block
This commit is contained in:
parent
2f44dd2dde
commit
a9565b88e8
@ -58,13 +58,11 @@
|
||||
$dlCounter = $redis->get($hashKey);
|
||||
if($dlCounter != FALSE) {
|
||||
if($dlCounter >= _DL_CAPTCHA * 2){
|
||||
/*$cfbk = 'VC:CF:BLOCK';
|
||||
$cfbk = 'VC:CF:BLOCK';
|
||||
if(_CLOUDFLARE_API_KEY != 'API_KEY' && $redis->sIsMember($cfbk, _UIP) == False){
|
||||
$redis->sadd($cfbk, _UIP);
|
||||
include_once('cloudflare.php');
|
||||
AddFirewallRule(_UIP);
|
||||
}*/
|
||||
header('location: /');
|
||||
}
|
||||
exit();
|
||||
}else if($dlCounter >= _DL_CAPTCHA){
|
||||
//redirect for captcha check
|
||||
|
@ -216,7 +216,7 @@
|
||||
}
|
||||
|
||||
function ga_event($cat, $act) {
|
||||
GACollect(array(
|
||||
ga_collect(array(
|
||||
"t" => "event",
|
||||
"ec" => $cat,
|
||||
"ea" => $act
|
||||
@ -331,7 +331,7 @@
|
||||
'target' => 'ip',
|
||||
'value' => $ip
|
||||
),
|
||||
'notes' => 'void.cat auto block'
|
||||
'notes' => 'blocked by: ' . $_SERVER['SERVER_NAME']
|
||||
);
|
||||
|
||||
$ch = curl_init();
|
||||
@ -350,11 +350,9 @@
|
||||
$cfr = json_decode($result, true);
|
||||
|
||||
if($cfr['success'] == True){
|
||||
$discord_data = array("content" => "[IP BLOCKED] " . $ip);
|
||||
include_once("discord.php");
|
||||
send_discord_msg(array("content" => "[IP BLOCKED] " . $ip));
|
||||
}else {
|
||||
$discord_data = array("content" => "[IP BLOCK ERROR] " . $ip . "\n```json\n" . $result . "\n```");
|
||||
include_once("discord.php");
|
||||
send_discord_msg(array("content" => "[IP BLOCK ERROR] " . $ip . "\n```json\n" . $result . "\n```"));
|
||||
}
|
||||
|
||||
return $cfr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user