Code Monkey home page Code Monkey logo

ddos's Introduction

DDoS

闲来无事,简单研究了一下DDoS攻击。原理大家都知道,如何实施才是问题。做了两个脚本削弱了访问强度,分别用于内网攻击和外网攻击。一般单个服务器或者相对较少服务器,只用一台主机发起攻击就能拒绝服务,内网效果更明显。

思路

主要解决了两个问题:

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

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

文件说明

├── get-proxy.py 获取代理服务器(快代理)
├── get-proxy-2.py 获取代理服务器(西刺免费代理IP)
├── result.txt 保存代理服务器信息(执行前两个脚本后,产生的中间文件)
├── ddos.py 单个IP攻击,常用于内网
├── ddos-proxy.py 利用代理服务器攻击,常用于外网
├── test.sh linux测试脚本
└── README.md

使用方法

获取最新代理服务器:

执行python3 get-proxy.py或者python3 get-proxy-2.py

开始攻击

ddos.py,执行python3 ddos.py http://www.xxx.com/ [safe]。其中safe是可选项,加上之后会保证服务器挂掉之后停止攻击。

ddos-proxy.py,执行python3 ddos-proxy.py http://www.xxx.com/,攻击不会停止。

请注意,目前只支持http协议,使用https会产生错误。

想要停止攻击:

pgrep python|xargs kill

在Mac上,也可以使用ctrl+\结束进程。

如果代理服务器需要更新,直接修改get-proxy.py文件中findProxy()方法中的i循环范围就可以了。也要注意代理网站随时会被查封,可自行寻找新的代理。

仅供学习使用,造成的后果作者概不负责。

ddos's People

Contributors

dantangfan avatar stevenjoezhang avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.