$_ENV['castings'][$v] = 'id'; } #,'lot','client_entite', foreach (['statut', 'type'] as $v) { $_ENV['castings'][$v] = 'nom'; } #foreach(['user'] as $v)$_ENV['castings'][$v]='username'; foreach (['formbuilder', 'last_result', '__initializer__', '__cloner__', '__isinitialized__', 'enfants', 'enfant', 'debug'] as $v) { $_ENV['castings'][$v] = 'unset'; } } $params = ['PRIV' => chr(0) . chr(42) . chr(0), 'CLEANULL' => 1, 'CLEANEMPTYARRAYS' => 1, 'PERSISTENTCOLL' => 1, 'MAXTIME' => 5, 'MAXIT' => 9900, 'DEPTH' => 8, 'STRLEN' => 250, 'WIDTH' => 200, 'MAXOUTPUTSIZE' => 20000, 'MAXRAM' => 100, 'MAXTIMEPEROBJ' => 1, 'STRIPNAMESPACE' => 'mcBundle\\Entity\\', 'FILTERS' => strtolower('_read,#undefined,*_paramSources,reflectionclass,reflectionproperty,abstracthydrator,_initializer,_cloner,EntityManager,DebugHandler,:owner,:association,\\MetadataBag,\\ClassMetadata,\\ArrayCache,:loadedAnnotations,AttributeBag,\\FlashBag,\\FormFactory,\\HeaderBag,Hydration,ObjectHydrator,ReflectionClass,ReflectionProperty,AbstractHydrator,Closure,FrozenParameterBag,ORM\\Mapping,EntityManager\\conn,Validator\\Constraints,maxMessage,exactMessage,minMessage,FormTypeValidatorExtension,ContainerAwareEventManager,Constraints\\Length,DocParser\\lexer,AnnotationReader,Constraints\\UniqueEntity,Product:children,proxyClassTemplate,SubsidiaryadvancedProductPages,Navigationsubsidiaries,NavigationcreatedBy,NavigationmodifiedBy,PersistentCollectionem,PersistentCollectionowner,PersistentCollectionassociation,parameterbag,_connections')]; # if (in_array($classname, ['request', 'parameterbag']))return $var; #ArrayCollection foreach ($params as $k => $v) { redef($k, $v); } class Debug { static $instance; public static function i() { //singleton if (!self::$instance) { self::$instance = new self(); } return self::$instance; } static function d($debug, $cond = 1, $dies = 0, $file = 0) { #returns single instance from static context to be used as an object : Debug::d($debug);
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); } } }
<?php redef('ADMIN_USERNAME', 'user'); redef('ADMIN_PASSWORD', 'pass'); if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']) && $_SERVER['PHP_AUTH_USER'] == ADMIN_USERNAME && $_SERVER['PHP_AUTH_PW'] == ADMIN_PASSWORD) { } elseif (1) { Header("WWW-Authenticate: Basic realm=\"racetrack\""); Header("HTTP/1.0 401 Unauthorized"); die; } else { #ask password with session && form session_start(); if (!$_SESSION['logged']) { if ($_POST['login'] && $_POST['pass'] && $_POST['login'] == ADMIN_USERNAME && $_POST['pass'] == ADMIN_PASSWORD) { $_SESSION['logged'] = 1; } else { die("<form method=post><input name=login><input name=pass><input type=submit></form>"); } } }
<?php $_ENV['keyw'] = $_ENV['desc'] = $_ENV['titre'] = 'racetrack :: contact'; if ($_SERVER["HTTP_X_FORWARDED_FOR"]) { redef('IP', $_SERVER["HTTP_X_FORWARDED_FOR"]); } elseif ($_SERVER["REMOTE_ADDR"]) { redef('IP', $_SERVER["REMOTE_ADDR"]); } new fun(); extract($_GET); $mail = $from = $dest = $de = $exp = ADMINEMAIL; ##not as permitted sender .... dns records $subject = "Racetrack Contact Form"; $s = "\r\n"; #$x=wmail(ADMINEMAIL,'subject','msg',$headers); if ($_POST) { if ($_POST['city'] or $_POST['adress'] or $_POST['mail'] or $_POST['zip']) { die('mail sent'); } #false confirmation :) $_POST = Array_Map('stripslashes', $_POST); extract($_POST, EXTR_SKIP, 'u'); if (in_array($email, ['*****@*****.**'])) { block('scanner'); r404(); die; } Adds($nom); Adds($tel); Adds($email); Adds($ms); Adds($k);
<?php $D = array('BL' => ''); foreach ($D as $k => $v) { redef($k, $v, 1); } $key404 = '$гд*╡∙%!з';
$x = $uncompressed; } return json_decode($x, 1); #igbinary_unserialize } function igbwz($file, $data) { $data = json_encode($data); #igbinary_serialize if (strlen($data) > 4000) { $data = gzcompress($data, 2); } fpc1($file, $data); } #$x=sql6(['cd'=>'/web/sqlcache/','con'=>['127.0.0.1','root','a'],'sql'=>"select * from bo.products where id_subsidiary=312",'iP'=>['invalidation1','products:idsub:312']]);print_r($x);die; redef(THRESHOLD, 0.001); #ms to declenche cache function sql6($p) { #todo:;mysqli //better use disk cache, cuz memory will autoload it when heavily accessed using LFU algorythmn ! static $conns; $cd = TMP . 'sqlcache/'; $x = null; $result = []; extract($p); if ($suppr) { $pl = $suppr; } if ($pl) { #indexes to remove, according to invalidations
function defin($a, $b = ',', $c = '', $d = '', $e = '', $f = '', $g = '', $h = '', $i = '', $j = '') { if (strpos($a, ',')) { $a = explode(',', $a); } elseif (!is_array($a)) { $a = array($a); } #pat($a,$b,$c,$d); if (!is_array($b)) { $b = array($b, $c, $d, $e, $f, $g, $h, $i, $j); } $b = array_map('trim', $b); $b = array_filter($b); $b = array_shift($b); foreach ($a as $v) { redef($v, $b, 1); } return $b; $a = re($a, $b, $c, $d, $e, $f, $g, $h, $i, $j); #newer:caution a is an array:multiple values passed }
redef('RT', __DIR__ . '/'); #replaces all define redef('CWD', getcwd() . '/'); #script_path redef('DR', $_SERVER['DOCUMENT_ROOT'] . '/'); #script_path $a['root'] = RT; $f = RT . 'local.php'; if (is_file($f)) { require_once $f; } #+redef if (!defined(__FILE__)) { redef(__FILE__, 1); #avoids auto prepend + requires several times redef('TMP', __DIR__ . '/../tmp/'); #always used in mios before kernel loads .. function args($x, $c = 0) { #kernel.php e equivalent $k = 'args'; $match = 0; if (strpos($_ENV[$k], $x) !== false) { $match++; } elseif (!$c) { $_ENV[$k] .= $x; } return $match; } $null = ['HTTP_REFERER', 'HTTPS', 'REMOTE_USER', 'REMOTE_HOST', 'REDIRECT_QUERY_STRING', 'REDIRECT_STATUS']; foreach ($null as $k) {
if (!function_exists('sys_getloadavg')) { function sys_getloadavg() { return array(1, 0, 0); } } # date_default_timezone_set('Europe/Paris'); rem($a['preload'], '0=autoloader.php,1=fun.php,2=debug53.php,3=fundev1.php'); #&1=deprecated.php&2=ksv1-div.php&3=ksv1-auto.php&4=crypt.php&5=autor301.php&6=ggtracker.php&7=css.php $a['vars'] = "root=/l/debshared/racetrack&logs/l/debshared/racetrack&l2=/l/debshared/racetrack&obstart=1&cacheinit=0&starter=0&tracker=0"; $erlogs = '/l/debshared/racetrack/er.logs'; #die(dr.'adm/local.s3db'); redef('LOGLEVEL', 6); #6:écrire tout les petits fichiers redef('SHELL', 'shell.php'); Rem($DB, [$_GET['ho'], 'ben', DR . 'adm/local.s3db']); #localhost,Y:/web/www/ $thumbsh = array(80); #$thumbsw=array(120);#genérer chaque miniature.. $ga = 'UA-939697-14'; #'''google analytics code ::: $adwordstag = "<img height=1 width=1 src='http://www.googleadservices.com/pagead/conversion/989090452/?label=gtPZCKzJsQzIQlKXR1&value=31&guid=ON&script=0'>"; $def = array('titre' => 'titre défault', 'desc' => 'desc défault', 'keyw' => 'mots clés défault'); #l'ordre est décisif !!! #obstart=1&cacheinit=1&session=1 $ftp = array('ftphost', 'ftpuser', 'ftppass'); #for backups #$_ENV['c']['sql']['127.0.0.1']=Array('localhost','root',''); $_ENV['c']['mem2defaultdb'] = R . 'z/serializedpath.db'; $_ENV['c']['smtp']['efe'] = 'smtp.1und1.de,25,info@-.ch,-,-.info,E-o';
$D = ['SN' => $a['SCRIPT_NAME'], 'SFN' => $a['SCRIPT_FILENAME'], 'H' => str_replace(array(':81', ':80'), '', strtolower($a['HTTP_HOST'])), 'DR' => str_replace('Program Files', 'Progra~1', $a['DOCUMENT_ROOT']), 'nu' => substr($a['SCRIPT_NAME'], 1), 'u' => substr(Preg_replace("~(\\?|&)(go=|gclid=).*|www\\.~is", '', $a['REQUEST_URI']), 1), 'cwd' => str_replace('/home/www', '/z', getcwd()) . '/', 'server' => $a['ip'], 'sip' => $a['ip'], 'sa' => $a['ip'], 'status' => $a['REDIRECT_STATUS'], 'rs' => $a['REDIRECT_STATUS'], 'rqs' => $a['REDIRECT_QUERY_STRING'], 'rh' => $a['REMOTE_HOST'], 'host' => $a['REMOTE_HOST'], 'q' => $a['QUERY_STRING'], 'ru' => $a['REMOTE_USER'], 'ip' => $a['REMOTE_ADDR'], 'ua' => $a['HTTP_USER_AGENT'], 'refe' => strtolower($a['HTTP_REFERER']), 'now' => time(), 'DATE' => date('YmdHis')]; foreach ($D as $k => $v) { redef($k, $v, 1); } $d = array('args', 'DB', 'root', 'tracker', 'starter', 'obstart', 'REDIRECT_QUERY_STRING', 'REDIRECT_STATUS', 'REMOTE_HOST', 'REMOTE_USER', 'HTTP_REFERER'); foreach ($d as $k) { if (!isset($a[$k])) { $a[$k] = null; } } #set to null if not set redef('PATHANOT', TMP . 'anot/' . str_replace('/', '-', H . SN) . '.igb'); $anotations = []; redef('SR', 'http' . ($a['HTTPS'] ? 's' : '') . '://' . H . '/', 1); redef('SURL', SR . U, 1); redef('SU', SR . U, 1); if (is_file(PATHANOT)) { $anotations = igbinary_unserialize(file_get_contents(PATHANOT)); if ($anotations['vars']) { extract($anotations['vars']); } if ($r304) { $max = 1; foreach ($r304 as &$time) { if (!is_numeric($time) && is_file($time)) { $time = filemtime($time); } if (!is_numeric($time)) { continue; } if ($time > $max) {