diff options
Diffstat (limited to 'scapy/spoof_ip.py')
| -rw-r--r-- | scapy/spoof_ip.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scapy/spoof_ip.py b/scapy/spoof_ip.py new file mode 100644 index 0000000..7f85786 --- /dev/null +++ b/scapy/spoof_ip.py @@ -0,0 +1,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")
|
