源碼
由於google code關閉,目前已經在Google code上搜不到slowhttptest,我在github上搜到了下面這個。
源碼:https://github.com/shekyan/slowhttptest
編譯安裝參考:https://github.com/shekyan/slowhttptest/wiki/InstallationAndUsage
參數中文說明
測試模式:
-Hslow headers 攻擊,緩慢發送\r\n,讓服務器一直等待
-Bslow Body 攻擊
-R範圍攻擊Apache killer
-Xslow read 攻擊,讀的慢,讓服務器發送緩存堵塞
報告生成選項:
-g生成socket狀態變化統計
-o file_prefix將輸出保存到file.html和file.csv中
-v level日誌等級,0-4:Fatal,Info,Error,Warning,Debug
普通選項:
-c connections目標連接數(50)
-i seconds數據發送間隔(10)
-l seconds測試一個目標的時間長度(240)
-r rate每秒多少個連接(50)
-s bytesContent-Length的值(4096)
-t verb請求中使用的動詞,如果是slow header攻擊,默認是GET;如果是slow body攻擊,默認是POST
-u URL目標URL(http://localhost/)
-x bytes每一個tick隨機生成的鍵值對最大長度,例如,-x 2 生成x-xx:xx是頭字段,或是類似&xx=xx的消息體,x是隨機字符(32)
探針/代理選項:
-d host:port所有數據走指定代理host:port
-e host:port 探針流量走指定代理host:port
-p seconds探針超時時長,服務器被認爲是網絡不可達(5)
範圍攻擊具體選項:
-a start左邊界值(5)
-b bytes右邊界值(2000)
slow read攻擊具體選項
-k num同一請求重複次數,當服務器支持持久化連接時用於放大響應長度(1)
-n seconds每次從接收緩衝區中讀取消息的時間間隔(1)
-w bytes從通知窗中獲取數據的起始位置(1)
-y bytes 從通知窗中獲取數據的結束位置(512)
-z bytes每次從接收緩衝區中讀取的長度(5)
此處參考:http://duallay.blog.51cto.com/635999/1678472
使用示例
slowhttptest -H -c 500 -l 200 -k 5 -p 10 -g -u http://xxxx.com:8088/
Test parameters |
---|
Test type |
SLOW HEADERS |
Number of connections |
500 |
Verb |
GET |
Content-Length header value |
4096 |
Extra data max length |
68 |
Interval between follow up data |
10 seconds |
Connections per seconds |
50 |
Timeout for probe connection |
10 |
Target test duration |
200 seconds |
Using proxy |
no proxy |