Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
闲来无事,简单研究了以下dos攻击。原理大家都知道,如何实施才是问题。做了两个脚本削弱了访问强度,分别用于内网攻击和外网攻击。一般单个服务器或者相对较少服务器,只用一台主机发起攻击就能拒绝服务,内网效果更明显。

##思路
## 思路

主要解决了两个问题
* 单个主机发起攻击链接数量问题。这里使用多线程,只请求数据,不接收数据,写上足够多的headder以满足各种可能的优势。请求数据的时候尽可能的去寻找页面内容含量最多的网页。

* 没有肉鸡怎么办?IP被封号怎么办?所以使用了代理服务器,怎么都封不过来。

##文件说明
## 文件说明

```
├── ddos.py 单个IP攻击,常用于内网
Expand All @@ -19,18 +19,26 @@
└── test-pro.sh linux测试脚本
```

##使用方法
## 使用方法

### 1)获取最新代理服务器:

```
python proxy.py
```

### 2)开始攻击

对ddos.py: `python ddos.py http://www.xxx.com/ [safe]`,safe是可选项,加上之后会保证服务器挂掉之后停止攻击

对proxy-py:`python proxy-ddos.py http://www.xxx.com`,攻击不会停止
对proxy-ddos.py:`python proxy-ddos.py http://www.xxx.com`攻击不会停止

想要停止攻击:
### 3)想要停止攻击:

'''
kill `pgrep python`
'''
```
pgrep python|xargs kill
```

代理服务器需要更新,直接修改proxy.py文件findIP()中的i循环大小就可以了。也要随时注意代理网站随时会被查封

*****供学习使用,造成的结果作者概不负责*******
**供学习使用,造成的结果作者概不负责**
2 changes: 1 addition & 1 deletion proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def spider_kuaidaili(index):
urls = []
page = opener.open(url % index).read()
page = BeautifulSoup(page)
proxys = page.tbody.findAll('tr')
proxys = page.findAll('tbody')[2].findAll('tr')
for p in proxys:
td = p.findAll('td')
host, port = td[0].string, td[1].string
Expand Down
2 changes: 1 addition & 1 deletion test-pro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done

sleep 30

kill `pgrep python`
pgrep python|xargs kill