DDOS攻击脚本

版权声明:本文为博主原创文章,未经博主允许不得转载 https://blog.csdn.net/qq_41729148/article/details/89173040
netstat  查看网络连接数。如果一个IP地址对服务器建立很多连接数(比如一分钟产生了100个连接),就认为发生了DDO

使用详解

1安装httpd
2开启httpd
3向httpd默认得目录下放一个页面
4写ddos脚本
5模拟ddos进行攻击(网址可以改成自己本地IP或者是本地的回环地址127.0.0.1)
6脚本运行

ab命令:做压力测试的工具和性能的监控工具
语法: ab  -n 要产生的链接数总和   -c 同时打开的客户端数量  http://链接
yum install -y httpd
systemctl start httpd
echo "i am a student" > /var/www/html/index.html
vim ddos.sh
#!/bin/bash
netstat -ntu | awk '{print $5}' | cut -d: -f4 | sort | uniq -c | sort -n
ab -n 1000 -c 100 http://192.168.1.63/index.html
sh ddos.sh

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_41729148/article/details/89173040