summaryrefslogtreecommitdiff
path: root/scapy/spoof_ip.py
blob: 7f85786cc0d2dd0ad572756e52a708dda788f13e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python

import sys
from scapy.all import *

def spoof_ip(spoofed_ip,dest_ip):
    send(IP(src=spoofed_ip,dst=dest_ip)/ICMP(),count=10)

if __name__ == "__main__":
    try:
        spoof_ip(sys.argv[1],sys.argv[2])
    except PermissionError:
        print(f"{sys.argv[0]} nécessite les droits root")