CC 发包工具 siege 安装与使用

Siege是一款开源的压力测试工具,设计用于评估WEB应用在压力下的承受能力。可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。

说白了,用到正处就是测试服务器压力的,用到坏处就是 CC 发包攻击服务器。

大佬们别打我,我自己测试过自己的服务器,一打就 502 Bad Gateway。

安装方法:

yum install gcc
wget http://download.joedog.org/siege/siege-4.0.5.tar.gz
tar -zxf siege-4.0.5.tar.gz
cd siege-4.0.5
./configure
make
make install

使用 siege 来查看是否真的安装成功了

siege

如果看到如下信息,则说明安装成功了:

SIEGE 4.0.5
Usage: siege [options]
       siege [options] URL
       siege -g URL
Options:
  -V, --version             VERSION, prints the version number.
  -h, --help                HELP, prints this section.
  -C, --config              CONFIGURATION, show the current config.
  -v, --verbose             VERBOSE, prints notification to screen.
  -q, --quiet               QUIET turns verbose off and suppresses output.
  -g, --get                 GET, pull down HTTP headers and display the
                            transaction. Great for application debugging.
  -p, --print               PRINT, like GET only it prints the entire page.
  -c, --concurrent=NUM      CONCURRENT users, default is 10
  -r, --reps=NUM            REPS, number of times to run the test.
  -t, --time=NUMm           TIMED testing where "m" is modifier S, M, or H
                            ex: --time=1H, one hour test.
  -d, --delay=NUM           Time DELAY, random delay before each requst
  -b, --benchmark           BENCHMARK: no delays between requests.
  -i, --internet            INTERNET user simulation, hits URLs randomly.
  -f, --file=FILE           FILE, select a specific URLS FILE.
  -R, --rc=FILE             RC, specify an siegerc file
  -l, --log[=FILE]          LOG to FILE. If FILE is not specified, the
                            default is used: PREFIX/var/siege.log
  -m, --mark="text"         MARK, mark the log file with a string.
                            between .001 and NUM. (NOT COUNTED IN STATS)
  -H, --header="text"       Add a header to request (can be many)
  -A, --user-agent="text"   Sets User-Agent in request
  -T, --content-type="text" Sets Content-Type in request
      --no-parser           NO PARSER, turn off the HTML page parser
      --no-follow           NO FOLLOW, do not follow HTTP redirects

Copyright (C) 2017 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

使用方法:

siege -c 200 -r 20 https://baidu.com
#-c 200 并发200个用户 -r 20 重复循环20

这是最基本的用法,如果需要更强的用法,参照帮助去尝试即可。


标签: cc 发包工具 siege


Ad:本站同款香港服务器 2H 1G 20G 400G 2M 最低只需要 ¥40 一月,地址: Pzea(xsx.net)

添加新评论