Example #1
0
function France($tel)
{
    //Telephone en Array, si un valide passer à ok la validation des fiches =)
    if ($tel == "sans") {
        return $tel;
    }
    $tel = ToNumber($tel);
    $D4 = substr($tel, 0, 4);
    $D2 = substr($tel, 0, 2);
    if (Preg_match("~12345|643322031|65035676|010101|020202|010203|060606|0000|15151|202020|6677|7788|6699|8877~", $tel, $t) or strlen($tel) < 8) {
        G2('tel', $t);
        return "¤{$tel}";
    }
    #
    if (in_array($D4, array('0032', '0033', '0034', '0049', '0041'))) {
        return $tel;
    }
    //internationnaux authorisés
    if (in_array($D2, array('01', '02', "03", "04", "05", "06", "07", "08", "09", "41", "49", "33"))) {
        return $tel;
    }
    //Si un ok, return direct =)
    return "¤{$tel}";
    #si aucun n'est bon au final =)
}
Example #2
0
function ggtracker()
{
    rem($ref, $_ENV['yt']['ref'], refe);
    #.refe  Car déjà enregistré
    $files = "ico|eot|ttf|js|css|htc|woff|swf|xml|gif|png|bmp|flv|mp(3|4)|exe|jpe?g|aspx?";
    #bad extensions
    $bp = "~\\?(jsr?|css|rss)|Final|visuall|zsimu|contact2?\\.php|suivi|s74.fr|4Test|(zsimu|2001|admin|intranet|sql)/|z/\\!|/!|/y/|\\.({$files})\$~i";
    #bad url
    $bR = "~(a74|xzxzx|dc10)\\.fr|frontaliers\\.info|yahooapi|url=|\\.(s?html|{$files})\$~i";
    #bad referer : can't be the referer,ex:referal spam
    #shall be recorded on first step !
    if (stripos(' ' . $ref . refe, '<a href')) {
        Block(array('badref', $ref . refe));
    } elseif (h == 'cli') {
        $x = 'cli';
    } elseif (bots) {
        $x = 'bots';
    } elseif (!$GLOBALS['tracker']) {
        $x = '!tracker';
    } elseif ($GLOBALS['notracker']) {
        $x = 'notracker';
    } elseif ($_ENV['yt']['lw'] + 600 > now) {
        $x = 'lw<600';
    } elseif (Preg_Match('~SID|css|js|jsr~is', q)) {
        $x = 'badq';
    } elseif (Preg_Match("~\\.({$files})\$~is", u)) {
        $x = 'badfiletype';
    } elseif (Preg_Match("~yandsearch|saihm|seoheap|internesdedijon|(a74|xzxzxz)\\.fr~is", REFE . Q . $ref)) {
        $x = 'badref';
    } elseif (Preg_Match("~(Tag|2|zsimu|qform|contact2?)\\.php|Final|dev3|/(3p|mut|!r|\\?|sql|2001|intranet)~is", u)) {
        $x = 'badurl';
    } elseif (Preg_Match($bp, $ref, $t)) {
        $x = 'ref:badpat(u)';
    } elseif (Preg_Match($bp, u, $t2)) {
        $x = 'url:badpat';
    } elseif (Preg_Match($bR, refe . $ref, $t3)) {
        $x = 'ref:badpat(R)';
    } elseif (preg_match("~\\.(php|s?html?)\$~", u)) {
        $x = 11;
    } elseif (strpos(substr($v, -5), '.') > -1) {
        $x = 'is not php or shtml : other filetype';
    } else {
        $x = 12;
    }
    #unknown
    if (!is_numeric($x)) {
        null;
    } else {
        G2('k1');
        #si le fichier existe déjà sur le serveur, cette valeur est récupérée, puis inserée de nouveau pour marquer l'autre site avec le meme mot clés
        #$y=Preg_replace('`&(babsrc|affid|mntrid|channel|client|clientcop|source|gs_rfai|ei|btng|spell|resnum|sourceid|channel|filetype|vertical|_iceurlflag|_iceurl)=([^&]+)`is','',$y);
        $y = str_replace(array('search/z/results/', '/fr/results/index/q/', 'search/', 'search?w=tot', 'as_q=', 'custom&q=', '&aqa=', '&aqp=', '/web/', 'rdata=', 'lts/&q='), '&q=', $ref);
        $y = str_replace(array('search/srpcache', 'linkdoctor', 'toggle=1', 'sa=n', 'ei=', 'prmd=mc', 'hl=fr', 'rls=', 'org.mozilla:fr', ':official', 'firefox-a', 'http://', 'www.', 'fr.', 'search.', 'aq=', 'oq=', 'aqi=', 'fkt=', 'fsdt=', 'fr=yfp-t-703', 'meta=lr', 'source=hp', 'aql=', 'hs=', 'tbo=s', 'rlz=', 'searchal', 'utf-8', 'ie=', 'oe=', 'sourceid=', 'nabclient', 'gfns=', '/bottomnavigation', '/relevance', '%22', 'recherche google', 'ved=', 'ct=', 'sa=x', 'oi=spell', 'rlz=', 'hl=fr', 'oq=', 'linkdoctor', 'safari', 'redir_esc=', 'ie=', 'oe=', 'utf-8', 'aq=', 'rls=', 'org.mozilla:', 'fr:official', 'meta=', 'gs_rfai=', 'aqi=', 'ql=', 'navclient', 'usg=', 'vc=', 'safe=', 'active', 'com.microsoft', 'en-gb', 'searchbox', 'ecofree.org/search.php', 'pid=', 'search.daum.net', 'results&', 'itag=ody', 'search&', '&hl=fr', 'topnavigation/', 'relevance/', 'iq=true/', 'zoom=off/', '=7', '&oq=', '&aq=', '&cx=', 'partner-', 'mb-', 'pub-'), '&', $y);
        $y = trim(Preg_replace("~[&]{2,}~", '&', $y), ' &');
        $mots = kwd($y);
        #travaux de nettoyage du referrer =)
        if ($mots && !strpos($mots, 'provided') && !in_Array($mots, array('', ':'))) {
            $mots = Tridecoder($mots);
            $mots = Preg_replace("~((google|yahoo|bing|yandex|gooofullcom|vizzeo|.?chiadah|find\\.eu|ke\\.voila|voila|seexie|askpeter|iadah|yougoo|yhs4|ecosia)\\.|search;|cx=|goooful|(\\.fr)?iadah\\.com).*|\\.it\$~is", '', $mots);
            $trop = explode(',', "_,</a>,< a>,<a href=,refineobj:video,google.ca,google.ci,google.co.uk ,url ,google.fr ,google.com ,search ,hl=en,sa=t,spider.htm");
            $mots = trim(str_replace($trop, '', $mots));
            #synchronisation des bibliothècas,maintenance
            if (preg_match("~^.(ttp&%2f%2f|ttp:)~is", $mots) or strlen($mots) < 3) {
                Null;
            } elseif ($_ENV['yt']['mots'] == $mots || $_ENV['yt']['fmt']['kw'] + 600 > NOW) {
                null;
            } else {
                #Nouveau mot clé
                if (preg_match("~q=([^&]+)~is", $mots, $t)) {
                    $mots = $t[1];
                }
                if (Preg_Match_ALL("~" . BKW . "~i", $mots, $t)) {
                    Block($t[0], $mots);
                }
                #blockage de l'IP et throw 404
                if (Preg_Match("~bestof~is", U)) {
                    $mots = '';
                }
                #cancel
                if ($mots) {
                    #if(!$_ENV['yt']){$_ENV['yt']=Array();DBM('!yt',"<pre>".STARTER."-$mots</pre>",'a6');}$i=$_ENV['yt'];
                    $yt2 = array('lw' => NOW, 'date' => date("Y/m/d H:i:s"), 'mots' => $mots, array('fmt' => array('kw' => NOW)));
                    if ($_ENV['yt']['mots']) {
                        $yt2['mots-1'] = $_ENV['yt']['mots'];
                    }
                    #DBM('ggt',"<pre>$mots,".print_r($_ENV['yt'],1).'</pre>','gg9');
                    if (Preg_Match("~gclid=|aclk\\?~is", $_ENV['yt']['ref'])) {
                        $yt2['adwords'] = $mots;
                    } elseif (0) {
                        #insertions sql //todo:file_append puis écriture en lots
                        $x2 = sql5("UPDATE CSF set site='" . H . "',hits=hits+1,ip='" . IP . "',time=" . NOW . ",date=now(),Ref=\"{$ref}\" {$s1} where url=\"" . SU . "\" and keyword=\"{$mots}\" order by id ASC limit 1");
                        if ($x2 < 1) {
                            sql5("INSERT INTO CSF(ip,Ref,site,keyword,url,position,time,date)VALUES('" . IP . "',\"{$ref}\",'" . H . "',\"{$mots}\",\"" . SU . "\",'{$pos}'," . NOW . ",NOW())");
                        }
                        #INSERT INTO CSF SET key = 'key', generation = 'generation' ON DUPLICATE KEY UPDATE key = 'key', generation = (generation + 1);
                    }
                    #$_SESSION['st1']=$magic;#$_SESSION['mots']=$mots;
                    $magic = "{$mots};" . $_ENV['yt']['dlp'] . ";" . $_ENV['yt']['ref'];
                    setcookie('kw', $mots, 1484045758);
                    setcookie('dlp', $magic, 1484045758);
                }
            }
            if (is_array($yt2)) {
                $_ENV['yt'] = Array_merge($_ENV['yt'], $yt2);
                FAP(IPF, $_ENV['yt']);
            }
            redef('motcle', $mots);
        }
    }
}
Example #3
0
function IsMail($mail, $ck = 0)
{
    if ($_ENV['nomailcheck'] || e('nomailcheck', 1) || $mail == ADMINEMAIL || strpos($mail, '@a74.fr')) {
        return 1;
    }
    $mail = strtolower(trim($mail));
    if (!$mail or !preg_match('~^[[:alnum:]]([-_.]?[[:alnum:]])*@[[:alnum:]]([-_.]?[[:alnum:]])*\\.([a-z]{2,4})$~', $mail)) {
        G2('mail0');
        return;
    }
    if (preg_match("~votreemail|@machin|dldl@|votrenom|@mail.com|@example.com|bob@|xxx@|sss@|aaa@|essai@|monnom@|qfq@|azerty|qwerty|@toto.com|@htm.com|test@|dudul@|sdf@|@lkj|@abc|@sdf|@hhh|@yan|fgfs@|@ff.|@1ERE.fr|@truc|gouv@~", $mail, $t)) {
        G2('mail1', $t);
        return;
    }
    list($user, $dm) = explode("@", $mail);
    if (strlen($mail) < 9 or strlen($dm) < 6 or strlen($user) < 3 or is_numeric($user)) {
        G2('mail2');
        return;
    }
    if (Preg_match("~\\|'|\\.(html|php)~i", $mail, $t)) {
        G2('mail3', $t);
        return;
    }
    #christian.frossard@free.fr
    if (Preg_Match("~[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}~", $mail)) {
        G2('mail4');
        return;
    }
    ###
    if ($ck) {
        $x = @checkdnsrr($dm, "MX");
        if (!$x) {
            G2('mail5');
            return;
        }
    }
    if (strpos($mail, '@') > 1) {
        return 1;
    }
    $badmail = "~@(truc|mail|example|machin|toto|htm|lkj|abc|sdf|hhh|yan).\\.(com|fr|info)|WHACK,|(xxx|bob|sss|aaa|essai|monnom|qfq|dldl|test|dudul|sdf|fgfs|gouv)@|@\\.|@@|mailer|gpm.neuf.ld|postmaster|fre.fr|neu.fr|@phx.gbl|kundenserver|portail-patri|cgp-inve|votrenom|azerty|qwerty|@ff.|@1ERE.fr~i";
    if (Preg_match($badmail, $mail) or strlen($mail) > 44 or strlen($mail) < 9 or !Preg_Match("~@(.*)\\.~", $mail) or Preg_Match("~.*@.*@|&|;| ~", $mail)) {
        return;
    }
    return $mail;
}