define('wpadtiddos_seconds_limit_GET',1);
define('wpadtiddos_seconds_limit_XHR',3);
class wp_antiddos
{
var $enable = true;
var $hits_limit_GET = 3; // hits limit for GET requests (per wpadtiddos_seconds_limit_GET second)
var $hits_limit_XHR = 3; // hits limit for XHR requests (per wpadtiddos_seconds_limit_XHR second)
var $seconds_limit_POST = 3; // seconds limit for POST requests
var $seconds_limit_AUTH = 3; // seconds limit for AUTH (Password) requests
var $visitor; // status of visitor = raw|cool|warm|hot
var $warm_level; // number of hits for last $seconds_limit seconds that cause visitor`s status turn to warm
var $auto = true; // block visitors by AntiDDOS
var $delay_time = 30; // seconds of delay of blocked visitors
var $block_cnet = true; // block all C class net.
var $cloudflare = true; // convert Cloudflare HTTP_CF_CONNECTING_IP to REMOTE_ADDR
var $send_header = false; // send "WP_AntiDDOS: yes" header for debug purposes
var $only_params_enabled = false; // Only Params feature enabled
var $only_params = 's'; // the only GET/POST params that trigger checkup
var $status, $error_msg;
var $conn; // mysql connection
var $hits = false; // actual hits number for current IP
var $cookie = ''; // wpantiddos cookie value that prevents anti DDOS processing
var $table_name = '';
var $pass_param = 'pwd'; // name of POST parameter that indentify Login (AUTH) request
var $delay_message = 'Our server is currently overloaded, your request will be repeated automatically in %s seconds';
var $delay_message_auth = 'Our server is currently overloaded, your request will be repeated automatically in %s seconds';
public function __construct()
{
if (isset($GLOBALS['wp_antiddos_instance']))
return;
else
$GLOBALS['wp_antiddos_instance'] = &$this;
if ($_SERVER['REMOTE_ADDR']=='127.0.0.1')
return;
$this->conn = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD);
$ok = mysqli_select_db($this->conn,DB_NAME);
if (!$ok) return false;
$this->get_options();
// plugin disabled
if (!$this->enable) return;
// current request is admin's one
if (isset($_COOKIE['wpantiddos']) && $_COOKIE['wpantiddos']==$this->cookie) return;
if ($this->only_params_enabled)
if (!$this->only_param_detected())
return;
// detect request type and limits
if ($this->xhr_request())
{
if ($this->hits_limit_XHR=='ANY') return;
$request_type = 'xhr';
$hits_limit = $this->hits_limit_XHR;
$seconds_limit = wpadtiddos_seconds_limit_XHR;
}
elseif ($_POST && isset($_POST[$this->pass_param]) )
{
if ($this->seconds_limit_AUTH=='ANY') return;
$request_type = 'auth';
$seconds_limit = $this->seconds_limit_AUTH;
$this->only_params .= ' '.$this->pass_param;
$hits_limit = 1;
}
elseif ($_POST)
{
if ($this->seconds_limit_POST=='ANY') return;
$request_type = 'post';
$hits_limit = 1;
$seconds_limit = $this->seconds_limit_POST;
}
else
{
if ($this->hits_limit_GET=='ANY') return;
$request_type = 'get';
$hits_limit = $this->hits_limit_GET;
$seconds_limit = wpadtiddos_seconds_limit_GET;
}
if ($this->send_header)
header("WP_AntiDDOS: yes");
if ($this->cloudflare)
{
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
$this->ip = $_SERVER['REMOTE_ADDR'];
if ($this->block_cnet)
$this->ip = substr($this->ip,0,strrpos($this->ip,'.')+1);
$this->warm_level = ceil($hits_limit/2);
try
{
$res = mysqli_query($this->conn,"SELECT count(*) kount FROM $this->table_name WHERE ip='".addslashes($this->ip)."' AND tstamp>".(time()-$seconds_limit)." AND type='$request_type'");
$row = mysqli_fetch_assoc($res);
if (!$row)
$this->error_msg = 'Error detected';
$this->hits = @$row['kount']+1; // consider current request too
if ($this->hits==0) // if no hits from this IP
$this->visitor = "new";
elseif ($this->hits>$hits_limit)
$this->visitor = "hot";
elseif ($this->hits>=$this->warm_level)
$this->visitor = "warm";
else
$this->visitor = "cool";
// add current hit
mysqli_query($this->conn,"INSERT INTO $this->table_name SET ip='$this->ip', type='$request_type', tstamp=".time());
// cleanup ip list
$clear_time = max($this->delay_time,$seconds_limit);
mysqli_query($this->conn,"DELETE FROM $this->table_name WHERE tstamp<".(time()-$clear_time));
}
catch(Exception $e)
{
$this->error_msg = $e->getString();
$this->status = 'error';
mysqli_close($this->conn);
return;
}
mysqli_close($this->conn);
if (!empty($this->error_msg) )
{
$this->status = 'error';
}
if ($this->auto && $this->visitor=='hot')
{
header('HTTP/1.0 503 Service Unavailable');
header('Status: 503 Service Unavailable');
header("Retry-After: ".($this->delay_time+1)); // submit form first if POST request
if (!$_POST)
print "
",$this->delay_time);
die();
}
}
function xhr_request()
{
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']))
{
if ($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')
return true;
}
else
{
$headers = getallheaders();
if (isset($headers['X-Requested-With']) && $headers['X-Requested-With']=='XMLHttpRequest')
return true;
}
return false;
}
public function get_options()
{
global $table_prefix;
$result = mysqli_query($this->conn,"SELECT option_name, option_value FROM {$table_prefix}options WHERE option_name LIKE 'Wpantiddos_Plugin_%'");
while ($row = mysqli_fetch_assoc($result)) {
$name = str_replace('Wpantiddos_Plugin_','',$row['option_name']);
$value = $row['option_value'];
if ($value==='Yes') $value = true;
if ($value==='No') $value = false;
if (isset($this->$name))
$this->$name = $value;
}
}
public function only_param_detected()
{
$acual = array_merge(array_keys($_GET),array_keys($_POST));
$found = array_intersect($acual,explode(' ',trim($this->only_params)));
return $found;
}
function array_to_fields($fields, $prefix = '') {
$form_html = '';
foreach ($fields as $name => $value) {
if ( ! is_array($value)) {
if ( ! empty($prefix)) {
$name = $prefix . '[' . $name . ']';
}
// generate the hidden field
$form_html .= "\n";
} else {
if ( ! empty($prefix)) {
$subprefix = $prefix . '[' . $name . ']';
} else {
$subprefix = $name;
}
$form_html .= array_to_fields($value, $subprefix);
}
}
return $form_html;
}
}
?>
1.0Films Antimicrobienshttps://www.film-antimicrobien.frpurezonehttps://www.film-antimicrobien.fr/author/purezone/Virus Protect, votre label Hygiène Certifiée pour votre entreprise - Films Antimicrobiensrich600338<blockquote class="wp-embedded-content" data-secret="8y9FRn2DvE"><a href="https://www.film-antimicrobien.fr/virus-protect-votre-label-hygiene-certifiee-pour-votre-entreprise/">Virus Protect, votre label Hygiène Certifiée pour votre entreprise</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://www.film-antimicrobien.fr/virus-protect-votre-label-hygiene-certifiee-pour-votre-entreprise/embed/#?secret=8y9FRn2DvE" width="600" height="338" title="« Virus Protect, votre label Hygiène Certifiée pour votre entreprise » — Films Antimicrobiens" data-secret="8y9FRn2DvE" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script type="text/javascript">
/*! This file is auto-generated */
!function(c,d){"use strict";var e=!1,o=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},c.wp.receiveEmbedMessage);else if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(!t);else if(!(t.secret||t.message||t.value));else if(/[^a-zA-Z0-9]/.test(t.secret));else{for(var r,s,a,i=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),l=0;l<n.length;l++)n[l].style.display="none";for(l=0;l<i.length;l++)if(r=i[l],e.source!==r.contentWindow);else{if(r.removeAttribute("style"),"height"===t.message){if(1e3<(s=parseInt(t.value,10)))s=1e3;else if(~~s<200)s=200;r.height=s}if("link"===t.message)if(s=d.createElement("a"),a=d.createElement("a"),s.href=r.getAttribute("src"),a.href=t.value,!o.test(a.protocol));else if(a.host===s.host)if(d.activeElement===r)c.top.location.href=t.value}}},e)c.addEventListener("message",c.wp.receiveEmbedMessage,!1),d.addEventListener("DOMContentLoaded",t,!1),c.addEventListener("load",t,!1);function t(){if(o);else{o=!0;for(var e,t,r,s=-1!==navigator.appVersion.indexOf("MSIE 10"),a=!!navigator.userAgent.match(/Trident.*rv:11\./),i=d.querySelectorAll("iframe.wp-embedded-content"),n=0;n<i.length;n++){if(!(r=(t=i[n]).getAttribute("data-secret")))r=Math.random().toString(36).substr(2,10),t.src+="#?secret="+r,t.setAttribute("data-secret",r);if(s||a)(e=t.cloneNode(!0)).removeAttribute("security"),t.parentNode.replaceChild(e,t);t.contentWindow.postMessage({message:"ready",secret:r},"*")}}}}(window,document);
</script>
https://www.film-antimicrobien.fr/wp-content/uploads/2020/06/virus-protect.jpg550350Forte de son expérience dans la pose de revêtements adhésifs depuis 2015, la société Virus Communication lance son label Virus Protect. La désinfection rémanente, ça existe depuis longtemps ! Et pourtant, cela n’intéressait personne avant la pandémie actuelle qui touche tous les secteurs d’activités. Devenu un enjeu majeur, le maintien de l’hygiène stricte sur les surfaces touchées est généralement effectué par de la désinfection temporaire (nettoyage à la main, nébulisation, fumigation…). Il existe aujourd’hui des techniques de désinfection permanente et c’est ce que Virus Communication propose avec Virus Protect : Protection par recouvrement de film adhésif antimicrobien Pure Zone Hexis : ce film se pose sur les surfaces planes telles que comptoirs, tables, bureaux, écrans… les ions argent encapsulés à l’intérieur agissent sur le métabolisme des bactéries et les tuent. Efficace 5 ans, Pure Zone permet de protéger des surfaces à fort trafic.En savoir plus ici Protection par application de liquide Safe Touch + avec technologie Liquid Guard : le liquide permet de protéger des surfaces sur lesquelles il n’est pas possible de poser du film tels que claviers, TPE, tissus, poignées, objets de formes complexes… Brevet issu de la nanotechnologie, Safe Touch + garde son efficacité un an garanti.En savoir plus ici Protégez dès aujourd’hui votre entreprise et affichez le label Virus Protect qui garantit que des solutions de désinfections permanentes ont été installées sur les surfaces de contact. Chaque intervention inclue la remise des certificats et des fiches de sécurité des produits utilisés. Contactez nous au 09 83 38 56 25 ou sur www.virus-communication.com